ICU-21249 Fix warnings about uninitialized variables in locid.cpp
This commit is contained in:
parent
9b9db682e1
commit
6c9655060b
@ -1252,11 +1252,11 @@ AliasReplacer::replaceLanguage(
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* replacedLanguage;
|
const char* replacedLanguage = nullptr;
|
||||||
const char* replacedScript;
|
const char* replacedScript = nullptr;
|
||||||
const char* replacedRegion;
|
const char* replacedRegion = nullptr;
|
||||||
const char* replacedVariant;
|
const char* replacedVariant = nullptr;
|
||||||
const char* replacedExtensions;
|
const char* replacedExtensions = nullptr;
|
||||||
parseLanguageReplacement(replacement,
|
parseLanguageReplacement(replacement,
|
||||||
replacedLanguage,
|
replacedLanguage,
|
||||||
replacedScript,
|
replacedScript,
|
||||||
@ -1266,7 +1266,7 @@ AliasReplacer::replaceLanguage(
|
|||||||
toBeFreed,
|
toBeFreed,
|
||||||
status);
|
status);
|
||||||
replacedLanguage =
|
replacedLanguage =
|
||||||
uprv_strcmp(replacedLanguage, "und") == 0 ?
|
(replacedLanguage != nullptr && uprv_strcmp(replacedLanguage, "und") == 0) ?
|
||||||
language : replacedLanguage;
|
language : replacedLanguage;
|
||||||
replacedScript = deleteOrReplace(script, nullptr, replacedScript);
|
replacedScript = deleteOrReplace(script, nullptr, replacedScript);
|
||||||
replacedRegion = deleteOrReplace(region, searchRegion, replacedRegion);
|
replacedRegion = deleteOrReplace(region, searchRegion, replacedRegion);
|
||||||
|
Loading…
Reference in New Issue
Block a user