From: Shane F. Carr Date: Thu, 21 Feb 2019 02:40:30 +0000 (-0600) Subject: ICU-20159 Fixing more GCC warnings. X-Git-Tag: release-64-rc~46 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7d30fc9b46165fa7f05a9700024ecf1e3103f7cd;p=icu ICU-20159 Fixing more GCC warnings. --- diff --git a/icu4c/source/common/ubidiln.cpp b/icu4c/source/common/ubidiln.cpp index 6febabb88cf..3545f4e111c 100644 --- a/icu4c/source/common/ubidiln.cpp +++ b/icu4c/source/common/ubidiln.cpp @@ -545,7 +545,7 @@ static int32_t getRunFromLogicalIndex(UBiDi *pBiDi, int32_t logicalIndex) { * negative number of BiDi control characters within this run. */ U_CFUNC UBool -ubidi_getRuns(UBiDi *pBiDi, UErrorCode *pErrorCode) { +ubidi_getRuns(UBiDi *pBiDi, UErrorCode*) { /* * This method returns immediately if the runs are already set. This * includes the case of length==0 (handled in setPara).. diff --git a/icu4c/source/common/ustr_titlecase_brkiter.cpp b/icu4c/source/common/ustr_titlecase_brkiter.cpp index ef623482639..056b40eb417 100644 --- a/icu4c/source/common/ustr_titlecase_brkiter.cpp +++ b/icu4c/source/common/ustr_titlecase_brkiter.cpp @@ -99,7 +99,7 @@ void WholeStringBreakIterator::setText(UText *text, UErrorCode &errorCode) { } } } -void WholeStringBreakIterator::adoptText(CharacterIterator* it) { +void WholeStringBreakIterator::adoptText(CharacterIterator*) { UPRV_UNREACHABLE; // should not be called } diff --git a/icu4c/source/i18n/measfmt.cpp b/icu4c/source/i18n/measfmt.cpp index afa7f7a0726..0b2ba8fdd82 100644 --- a/icu4c/source/i18n/measfmt.cpp +++ b/icu4c/source/i18n/measfmt.cpp @@ -47,7 +47,6 @@ U_NAMESPACE_BEGIN -static constexpr int32_t MEAS_UNIT_COUNT = 146; // see assertion in MeasureFormatCacheData constructor static constexpr int32_t WIDTH_INDEX_COUNT = UMEASFMT_WIDTH_NARROW + 1; UOBJECT_DEFINE_RTTI_IMPLEMENTATION(MeasureFormat) @@ -160,9 +159,6 @@ private: MeasureFormatCacheData::MeasureFormatCacheData() : integerFormat(nullptr), numericDateFormatters(nullptr) { - // Please update MEAS_UNIT_COUNT if it gets out of sync with the true count! - U_ASSERT(MEAS_UNIT_COUNT == MeasureUnit::getIndexCount()); - for (int32_t i = 0; i < WIDTH_INDEX_COUNT; ++i) { widthFallback[i] = UMEASFMT_WIDTH_COUNT; }