diff --git a/icu4c/source/i18n/decimfmtimpl.cpp b/icu4c/source/i18n/decimfmtimpl.cpp index 4b743960e5..b1f00325da 100644 --- a/icu4c/source/i18n/decimfmtimpl.cpp +++ b/icu4c/source/i18n/decimfmtimpl.cpp @@ -1382,8 +1382,8 @@ DecimalFormatImpl::toNumberPattern( DigitInterval maxInterval; // Only for significant digits - int32_t sigMin; - int32_t sigMax; + int32_t sigMin = 0; /* initialize to avoid compiler warning */ + int32_t sigMax = 0; /* initialize to avoid compiler warning */ // These are all the digits to be displayed. For significant digits, // this interval always starts at the 1's place an extends left. diff --git a/icu4c/source/i18n/digitformatter.cpp b/icu4c/source/i18n/digitformatter.cpp index 675b5c429d..48338850f9 100644 --- a/icu4c/source/i18n/digitformatter.cpp +++ b/icu4c/source/i18n/digitformatter.cpp @@ -177,7 +177,7 @@ UnicodeString &DigitFormatter::format( int32_t digitsLeftOfDecimal = interval.getMostSignificantExclusive(); int32_t lastDigitPos = interval.getLeastSignificantInclusive(); int32_t intBegin = appendTo.length(); - int32_t fracBegin; + int32_t fracBegin = 0; /* initialize to avoid compiler warning */ // Emit "0" instead of empty string. if (digitsLeftOfDecimal == 0 && lastDigitPos == 0) { diff --git a/icu4c/source/i18n/uspoof_conf.cpp b/icu4c/source/i18n/uspoof_conf.cpp index f478afad83..c400233727 100644 --- a/icu4c/source/i18n/uspoof_conf.cpp +++ b/icu4c/source/i18n/uspoof_conf.cpp @@ -396,6 +396,7 @@ void ConfusabledataBuilder::outputData(UErrorCode &status) { for (i=0; ielementAti(i); UChar32 codePoint = ConfusableDataUtils::keyToCodePoint(key); + (void)previousCodePoint; // Suppress unused variable warning. // strictly greater because there can be only one entry per code point U_ASSERT(codePoint > previousCodePoint); keys[i] = key;