From cabbcecf5c267dd5c91a79f62acbac64777353a4 Mon Sep 17 00:00:00 2001 From: Andy Heninger Date: Fri, 10 Jan 2014 19:20:16 +0000 Subject: [PATCH] ICU-10624 Swat clang compile warnings. X-SVN-Rev: 34861 --- icu4c/source/test/cintltst/callcoll.c | 4 ++-- icu4c/source/test/intltest/dtfmtrtts.cpp | 4 +--- icu4c/source/test/intltest/idnaconf.cpp | 3 +-- icu4c/source/test/intltest/incaltst.cpp | 5 +---- icu4c/source/test/intltest/numfmtst.cpp | 6 +++--- icu4c/source/test/intltest/restest.cpp | 3 +-- icu4c/source/test/intltest/restsnew.cpp | 4 ++-- icu4c/source/test/intltest/testidna.cpp | 4 ++-- icu4c/source/test/intltest/transtst.cpp | 4 +--- icu4c/source/test/intltest/tsmthred.cpp | 3 +-- icu4c/source/test/intltest/tzrulets.cpp | 4 +--- 11 files changed, 16 insertions(+), 28 deletions(-) diff --git a/icu4c/source/test/cintltst/callcoll.c b/icu4c/source/test/cintltst/callcoll.c index 6bbe22938ef..54ac8858ecb 100644 --- a/icu4c/source/test/cintltst/callcoll.c +++ b/icu4c/source/test/cintltst/callcoll.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2013, International Business Machines Corporation and + * Copyright (c) 1997-2014, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /******************************************************************************* @@ -1216,7 +1216,7 @@ TestJitterbug1098(){ "&\\'<\\\\", "&\\\"<'\\'", "&'\"'<\\'", - '\0' + NULL }; const UCollationResult results1098[] = { diff --git a/icu4c/source/test/intltest/dtfmtrtts.cpp b/icu4c/source/test/intltest/dtfmtrtts.cpp index 1f1115a449b..deda335c642 100644 --- a/icu4c/source/test/intltest/dtfmtrtts.cpp +++ b/icu4c/source/test/intltest/dtfmtrtts.cpp @@ -1,6 +1,6 @@ /*********************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2013, International Business Machines Corporation + * Copyright (c) 1997-2014, International Business Machines Corporation * and others. All Rights Reserved. ***********************************************************************/ @@ -28,8 +28,6 @@ #define INFINITE 0 #endif -static const UVersionInfo ICU_452 = {4,5,2,0}; - // Define this to test just a single locale //#define TEST_ONE_LOC "cs_CZ" diff --git a/icu4c/source/test/intltest/idnaconf.cpp b/icu4c/source/test/intltest/idnaconf.cpp index 5bf2f34303b..54f94dfa92c 100644 --- a/icu4c/source/test/intltest/idnaconf.cpp +++ b/icu4c/source/test/intltest/idnaconf.cpp @@ -1,7 +1,7 @@ /* ******************************************************************************* * - * Copyright (C) 2005-2009, International Business Machines + * Copyright (C) 2005-2014, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -25,7 +25,6 @@ static const UChar C_TAG[] = {0x3D, 0x3D, 0x3D, 0x3D, 0x3D, 0}; // ===== static const UChar C_NAMEZONE[] = {0x6E, 0x61, 0x6D, 0x65, 0x7A, 0x6F, 0x6E, 0x65, 0}; // namezone static const UChar C_NAMEBASE[] = {0x6E, 0x61, 0x6D, 0x65, 0x62, 0x61, 0x73, 0x65, 0}; // namebase -static const UChar C_NAMEUTF8[] = {0x6E, 0x61, 0x6D, 0x65, 0x75, 0x74, 0x66, 0x38, 0}; // nameutf8 static const UChar C_TYPE[] = {0x74, 0x79, 0x70, 0x65, 0}; // type static const UChar C_TOASCII[] = {0x74, 0x6F, 0x61, 0x73, 0x63, 0x69, 0x69, 0}; // toascii diff --git a/icu4c/source/test/intltest/incaltst.cpp b/icu4c/source/test/intltest/incaltst.cpp index 9614035af67..7627696e7b8 100644 --- a/icu4c/source/test/intltest/incaltst.cpp +++ b/icu4c/source/test/intltest/incaltst.cpp @@ -1,6 +1,6 @@ /*********************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2012, International Business Machines Corporation + * Copyright (c) 1997-2014, International Business Machines Corporation * and others. All Rights Reserved. ***********************************************************************/ @@ -54,9 +54,6 @@ static UnicodeString escape( const UnicodeString&src) // ***************************************************************************** //--- move to CalendarTest? -static const double JULIAN_EPOCH = -210866760000000.; - - // Turn this on to dump the calendar fields #define U_DEBUG_DUMPCALS diff --git a/icu4c/source/test/intltest/numfmtst.cpp b/icu4c/source/test/intltest/numfmtst.cpp index b83ef046b3e..dc5719c01e4 100644 --- a/icu4c/source/test/intltest/numfmtst.cpp +++ b/icu4c/source/test/intltest/numfmtst.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2013, International Business Machines Corporation and + * Copyright (c) 1997-2014, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /* Modification History: @@ -42,8 +42,6 @@ #define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof(array[0])) static const UChar EUR[] = {69,85,82,0}; // "EUR" -static const UChar JPY[] = {0x4A, 0x50, 0x59, 0}; -static const UChar CNY[] = {0x43, 0x4E, 0x59, 0}; static const UChar ISO_CURRENCY_USD[] = {0x55, 0x53, 0x44, 0}; // "USD" @@ -2631,6 +2629,8 @@ void NumberFormatTest::expectPad(DecimalFormat& fmt, const UnicodeString& pat, // This test is flaky b/c the symbols for CNY and JPY are equivalent in this locale - FIXME void NumberFormatTest::TestCompatibleCurrencies() { /* + static const UChar JPY[] = {0x4A, 0x50, 0x59, 0}; + static const UChar CNY[] = {0x43, 0x4E, 0x59, 0}; UErrorCode status = U_ZERO_ERROR; LocalPointer fmt( NumberFormat::createCurrencyInstance(Locale::getUS(), status)); diff --git a/icu4c/source/test/intltest/restest.cpp b/icu4c/source/test/intltest/restest.cpp index 49f4de96648..0711b01ec23 100644 --- a/icu4c/source/test/intltest/restest.cpp +++ b/icu4c/source/test/intltest/restest.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2009, International Business Machines Corporation and + * Copyright (c) 1997-2014, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -21,7 +21,6 @@ static const UChar kErrorUChars[] = { 0x45, 0x52, 0x52, 0x4f, 0x52, 0 }; static const int32_t kErrorLength = 5; -static const int32_t kERROR_COUNT = -1234567; //*************************************************************************************** diff --git a/icu4c/source/test/intltest/restsnew.cpp b/icu4c/source/test/intltest/restsnew.cpp index dbba470391e..e6240c0907e 100644 --- a/icu4c/source/test/intltest/restsnew.cpp +++ b/icu4c/source/test/intltest/restsnew.cpp @@ -1,5 +1,5 @@ /******************************************************************** - * Copyright (c) 1997-2009, International Business Machines + * Copyright (c) 1997-2014, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************/ @@ -1030,7 +1030,7 @@ NewResourceBundleTest::TestNewTypes() { ResourceBundle bundle(testdatapath, Locale("te_IN"),status); UnicodeString emptyStr = theBundle.getStringEx("emptystring", status); - if(!emptyStr.length()==0) { + if(emptyStr.length() != 0) { logln("Empty string returned invalid value\n"); } diff --git a/icu4c/source/test/intltest/testidna.cpp b/icu4c/source/test/intltest/testidna.cpp index c24dbe6067a..d798c5329ef 100644 --- a/icu4c/source/test/intltest/testidna.cpp +++ b/icu4c/source/test/intltest/testidna.cpp @@ -1,7 +1,7 @@ /* ******************************************************************************* * - * Copyright (C) 2003-2012, International Business Machines + * Copyright (C) 2003-2014, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -1312,7 +1312,7 @@ void TestIDNA::TestChaining(){ static const int loopCount = 100; static const int maxCharCount = 20; -static const int maxCodePoint = 0x10ffff; + static uint32_t randul() { diff --git a/icu4c/source/test/intltest/transtst.cpp b/icu4c/source/test/intltest/transtst.cpp index 41a1b789ed0..c6e7b41bcf6 100644 --- a/icu4c/source/test/intltest/transtst.cpp +++ b/icu4c/source/test/intltest/transtst.cpp @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 1999-2013, International Business Machines +* Copyright (C) 1999-2014, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * Date Name Description @@ -198,7 +198,6 @@ TransliteratorTest::runIndexedTest(int32_t index, UBool exec, } } -static const UVersionInfo ICU_39 = {3,9,4,0}; /** * Make sure every system transliterator can be instantiated. * @@ -4283,7 +4282,6 @@ static const char* BEGIN_END_RULES[] = { "::Upper(Lower);" "::([XYZ]);" }; -static const int32_t BEGIN_END_RULES_length = (int32_t)(sizeof(BEGIN_END_RULES) / sizeof(BEGIN_END_RULES[0])); /* (This entire test is commented out below and will need some heavy revision when we re-add diff --git a/icu4c/source/test/intltest/tsmthred.cpp b/icu4c/source/test/intltest/tsmthred.cpp index e253235fc69..72b6481bcd7 100644 --- a/icu4c/source/test/intltest/tsmthred.cpp +++ b/icu4c/source/test/intltest/tsmthred.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1999-2013, International Business Machines Corporation and + * Copyright (c) 1999-2014, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -629,7 +629,6 @@ UnicodeString showDifference(const UnicodeString& expected, const UnicodeString& const int kFormatThreadIterations = 100; // # of iterations per thread const int kFormatThreadThreads = 10; // # of threads to spawn -const int kFormatThreadPatience = 60; // time in seconds to wait for all threads #if !UCONFIG_NO_FORMATTING diff --git a/icu4c/source/test/intltest/tzrulets.cpp b/icu4c/source/test/intltest/tzrulets.cpp index 77d8ba881f3..3a5b25e9f16 100644 --- a/icu4c/source/test/intltest/tzrulets.cpp +++ b/icu4c/source/test/intltest/tzrulets.cpp @@ -1,6 +1,6 @@ /* ******************************************************************************* -* Copyright (C) 2007-2012, International Business Machines Corporation and * +* Copyright (C) 2007-2014, International Business Machines Corporation and * * others. All Rights Reserved. * ******************************************************************************* */ @@ -30,8 +30,6 @@ #define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break #define HOUR (60*60*1000) -static const UVersionInfo ICU_453 = {4,5,3,0}; - static const char *const TESTZIDS[] = { "AGT", "America/New_York", -- 2.40.0