Skip to content

Commit

Permalink
ICU-22832 Fix msan complain about use-of-uninitialized-value
Browse files Browse the repository at this point in the history
  • Loading branch information
taiyang-li authored and markusicu committed Aug 19, 2024
1 parent 40189ff commit 0253c82
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions icu4c/source/common/ustrcase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ int32_t toLower(int32_t caseLocale, uint32_t options,
} else {
c = lead;
}
const char16_t *s;
const char16_t *s = nullptr;
if (caseLocale >= 0) {
csc->cpStart = cpStart;
csc->cpLimit = srcIndex;
Expand Down Expand Up @@ -369,7 +369,7 @@ int32_t toUpper(int32_t caseLocale, uint32_t options,
c = lead;
}
csc->cpLimit = srcIndex;
const char16_t *s;
const char16_t *s = nullptr;
c = ucase_toFullUpper(c, utf16_caseContextIterator, csc, &s, caseLocale);
if (c >= 0) {
destIndex = appendUnchanged(dest, destIndex, destCapacity,
Expand Down Expand Up @@ -579,8 +579,8 @@ ustrcase_internalToTitle(int32_t caseLocale, uint32_t options, BreakIterator *it
}

if (c == u'I' || c == u'Í') {
titleLimit = maybeTitleDutchIJ(src, c, titleStart + 1, index,
dest, destIndex, destCapacity, options,
titleLimit = maybeTitleDutchIJ(src, c, titleStart + 1, index,
dest, destIndex, destCapacity, options,
edits);
}
}
Expand Down

0 comments on commit 0253c82

Please sign in to comment.