mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-16 02:07:15 +00:00
ICU-21579 Fix warnings in number formatting code
This commit is contained in:
parent
a061dfea1f
commit
a56dde820d
2 changed files with 5 additions and 1 deletions
icu4c/source/i18n
|
@ -209,6 +209,8 @@ ufmtval_getString(
|
|||
if (pLength != nullptr) {
|
||||
*pLength = readOnlyAlias.length();
|
||||
}
|
||||
// Note: this line triggers -Wreturn-local-addr, but it is safe because toTempString is
|
||||
// defined to return memory owned by the ufmtval argument.
|
||||
return readOnlyAlias.getBuffer();
|
||||
}
|
||||
|
||||
|
|
|
@ -1358,7 +1358,9 @@ bool blueprint_helpers::parseFracSigOption(const StringSegment& segment, MacroPr
|
|||
priority = UNUM_ROUNDING_PRIORITY_STRICT;
|
||||
offset++;
|
||||
} else {
|
||||
U_ASSERT(offset < segment.length());
|
||||
// Invalid digits option for fraction rounder
|
||||
status = U_NUMBER_SKELETON_SYNTAX_ERROR;
|
||||
return false;
|
||||
}
|
||||
if (offset < segment.length()) {
|
||||
// Invalid digits option for fraction rounder
|
||||
|
|
Loading…
Add table
Reference in a new issue