Skip to content

Commit 7ed3f0c

Browse files
roubertmarkusicu
authored andcommitted
ICU-23247 Move variable declaration to avoid unused variable.
1 parent 3fb6d22 commit 7ed3f0c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

icu4c/source/common/putil.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,9 +1430,6 @@ static void U_CALLCONV dataDirectoryInitFn() {
14301430
}
14311431

14321432
const char *path = nullptr;
1433-
#if defined(ICU_DATA_DIR_PREFIX_ENV_VAR)
1434-
char datadir_path_buffer[PATH_MAX];
1435-
#endif
14361433

14371434
/*
14381435
When ICU_NO_USER_DATA_OVERRIDE is defined, users aren't allowed to
@@ -1462,6 +1459,9 @@ static void U_CALLCONV dataDirectoryInitFn() {
14621459
* set their own path.
14631460
*/
14641461
#if defined(ICU_DATA_DIR) || defined(U_ICU_DATA_DEFAULT_DIR)
1462+
# if defined(ICU_DATA_DIR_PREFIX_ENV_VAR)
1463+
char datadir_path_buffer[PATH_MAX];
1464+
# endif
14651465
if(path==nullptr || *path==0) {
14661466
# if defined(ICU_DATA_DIR_PREFIX_ENV_VAR)
14671467
const char *prefix = getenv(ICU_DATA_DIR_PREFIX_ENV_VAR);

0 commit comments

Comments
 (0)