From 0a9c28990a14c652f7f535f89dfa3a9f8741b4c2 Mon Sep 17 00:00:00 2001 From: Andy Heninger Date: Thu, 24 Apr 2014 00:33:39 +0000 Subject: [PATCH] ICU-10861 Fix several ICU4C compile warnings. X-SVN-Rev: 35650 --- icu4c/source/i18n/scientificformathelper.cpp | 4 ---- icu4c/source/test/intltest/rbbiapts.cpp | 2 +- icu4c/source/test/letest/SimpleFontInstance.cpp | 3 ++- icu4c/source/test/letest/xmlreader.cpp | 4 ++-- icu4c/source/tools/pkgdata/pkgdata.cpp | 3 +++ 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/icu4c/source/i18n/scientificformathelper.cpp b/icu4c/source/i18n/scientificformathelper.cpp index 8b07e69545a..b6390ad556f 100644 --- a/icu4c/source/i18n/scientificformathelper.cpp +++ b/icu4c/source/i18n/scientificformathelper.cpp @@ -24,10 +24,6 @@ static UChar kSuperscriptDigits[] = {0x2070, 0xB9, 0xB2, 0xB3, 0x2074, 0x2075, 0 static UChar kSuperscriptPlusSign = 0x207A; static UChar kSuperscriptMinusSign = 0x207B; -static UnicodeString getMultiplicationSymbol(const DecimalFormatSymbols &dfs) { - return dfs.getConstSymbol(DecimalFormatSymbols::kExponentMultiplicationSymbol); -} - ScientificFormatHelper::ScientificFormatHelper( const DecimalFormatSymbols &dfs, UErrorCode &status) : fPreExponent(), fStaticSets(NULL) { diff --git a/icu4c/source/test/intltest/rbbiapts.cpp b/icu4c/source/test/intltest/rbbiapts.cpp index 734ae966510..1925fdf882c 100644 --- a/icu4c/source/test/intltest/rbbiapts.cpp +++ b/icu4c/source/test/intltest/rbbiapts.cpp @@ -1179,7 +1179,7 @@ void RBBIAPITest::TestRefreshInputText() { } -#if !UCONFIG_NO_BREAK_ITERATION && U_HAVE_STD_STRING +#if !UCONFIG_NO_BREAK_ITERATION && U_HAVE_STD_STRING && !UCONFIG_NO_FILTERED_BREAK_ITERATION static void prtbrks(BreakIterator* brk, const UnicodeString &ustr, IntlTest &it) { static const UChar PILCROW=0x00B6, CHSTR=0x3010, CHEND=0x3011; // lenticular brackets it.logln(UnicodeString("String:'")+ustr+UnicodeString("'")); diff --git a/icu4c/source/test/letest/SimpleFontInstance.cpp b/icu4c/source/test/letest/SimpleFontInstance.cpp index 8051bf5c699..d88bf925f69 100644 --- a/icu4c/source/test/letest/SimpleFontInstance.cpp +++ b/icu4c/source/test/letest/SimpleFontInstance.cpp @@ -1,7 +1,7 @@ /* ******************************************************************************* * - * Copyright (C) 1999-2013, International Business Machines + * Copyright (C) 1999-2014, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -60,6 +60,7 @@ void SimpleFontInstance::getGlyphAdvance(LEGlyphID glyph, LEPoint &advance) cons advance.fX = 0; } #else + (void)glyph; // Suppress unused parameter compiler warning. advance.fX = xUnitsToPoints(2048); #endif diff --git a/icu4c/source/test/letest/xmlreader.cpp b/icu4c/source/test/letest/xmlreader.cpp index c84dc8ce28c..2c1d5ce7375 100644 --- a/icu4c/source/test/letest/xmlreader.cpp +++ b/icu4c/source/test/letest/xmlreader.cpp @@ -1,7 +1,7 @@ /* ******************************************************************************* * - * Copyright (C) 1999-2007, International Business Machines + * Copyright (C) 1999-2014, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -174,7 +174,7 @@ void readTestFile(const char *testFilePath, TestCaseCallback callback) const UXMLElement *element; int32_t ec = 0; int32_t charCount = 0; - int32_t typoFlags = 3; // kerning + ligatures... + // int32_t typoFlags = 3; // kerning + ligatures... UScriptCode scriptCode; le_int32 languageCode = -1; UnicodeString text, glyphs, indices, positions; diff --git a/icu4c/source/tools/pkgdata/pkgdata.cpp b/icu4c/source/tools/pkgdata/pkgdata.cpp index b53ec3d8cec..6b3713603d5 100644 --- a/icu4c/source/tools/pkgdata/pkgdata.cpp +++ b/icu4c/source/tools/pkgdata/pkgdata.cpp @@ -1292,6 +1292,9 @@ static int32_t pkg_generateLibraryFile(const char *targetDir, const char mode, c UBool freeCmd = FALSE; int32_t length = 0; + (void)specialHandling; // Suppress unused variable compiler warnings on platforms where all usage + // of this parameter is #ifdefed out. + /* This is necessary because if packaging is done without assembly code, objectFile might be extremely large * containing many object files and so the calling function should supply a command buffer that is large * enough to handle this. Otherwise, use the default size.