]> granicus.if.org Git - icu/commitdiff
ICU-8992 Compiler Warning cleanup for gcc 4.6.1
authorAndy Heninger <andy.heninger@gmail.com>
Mon, 6 Feb 2012 19:57:08 +0000 (19:57 +0000)
committerAndy Heninger <andy.heninger@gmail.com>
Mon, 6 Feb 2012 19:57:08 +0000 (19:57 +0000)
X-SVN-Rev: 31329

30 files changed:
icu4c/source/common/loclikely.cpp
icu4c/source/common/rbbi.cpp
icu4c/source/common/ucnv_u8.c
icu4c/source/common/ucnvmbcs.c
icu4c/source/common/ucol_swp.cpp
icu4c/source/common/uloc_tag.c
icu4c/source/common/uresbund.cpp
icu4c/source/common/ushape.cpp
icu4c/source/i18n/calendar.cpp
icu4c/source/i18n/dtptngen.cpp
icu4c/source/i18n/numsys.cpp
icu4c/source/i18n/persncal.cpp
icu4c/source/i18n/tzgnames.cpp
icu4c/source/i18n/ucal.cpp
icu4c/source/i18n/ucol_elm.cpp
icu4c/source/i18n/ucol_tok.cpp
icu4c/source/i18n/ucurr.cpp
icu4c/source/layout/IndicReordering.cpp
icu4c/source/layout/OpenTypeLayoutEngine.cpp
icu4c/source/tools/ctestfw/ctest.c
icu4c/source/tools/genrb/parse.cpp
icu4c/source/tools/genrb/wrtjava.c
icu4c/source/tools/genrb/wrtxml.cpp
icu4c/source/tools/gensprep/store.c
icu4c/source/tools/icuinfo/icuinfo.cpp
icu4c/source/tools/toolutil/package.cpp
icu4c/source/tools/toolutil/pkg_gencmn.c
icu4c/source/tools/toolutil/ppucd.cpp
icu4c/source/tools/toolutil/swapimpl.cpp
icu4c/source/tools/toolutil/udbgutil.cpp

index edee9086f261bf2a1a26b37defbd2aab0cf71c82..1d2c251ebde425bd17aa82a287b2004894fda3b1 100644 (file)
@@ -1,7 +1,7 @@
 /*
 *******************************************************************************
 *
-*   Copyright (C) 1997-2011, International Business Machines
+*   Copyright (C) 1997-2012, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 *******************************************************************************
@@ -595,7 +595,6 @@ createLikelySubtagsString(
      **/
     char tagBuffer[ULOC_FULLNAME_CAPACITY];
     char likelySubtagsBuffer[ULOC_FULLNAME_CAPACITY];
-    int32_t tagBufferLength = 0;
 
     if(U_FAILURE(*err)) {
         goto error;
@@ -608,7 +607,7 @@ createLikelySubtagsString(
 
         const char* likelySubtags = NULL;
 
-        tagBufferLength = createTagString(
+        createTagString(
             lang,
             langLength,
             script,
@@ -661,7 +660,7 @@ createLikelySubtagsString(
 
         const char* likelySubtags = NULL;
 
-        tagBufferLength = createTagString(
+        createTagString(
             lang,
             langLength,
             script,
index 7bc18f1e33a12e29ae74c6a0ed4cea274cd8bfd3..f76d02ae294c2aaf3593639661b2196e5b9fb1df 100644 (file)
@@ -1,6 +1,6 @@
 /*
 ***************************************************************************
-*   Copyright (C) 1999-2011 International Business Machines Corporation
+*   Copyright (C) 1999-2012 International Business Machines Corporation
 *   and others. All rights reserved.
 ***************************************************************************
 */
@@ -988,7 +988,7 @@ enum RBBIRunMode {
 //-----------------------------------------------------------------------------------
 int32_t RuleBasedBreakIterator::handleNext(const RBBIStateTable *statetable) {
     int32_t             state;
-    int16_t             category        = 0;
+    uint16_t            category        = 0;
     RBBIRunMode         mode;
     
     RBBIStateTableRow  *row;
@@ -1205,7 +1205,7 @@ continueOn:
 //-----------------------------------------------------------------------------------
 int32_t RuleBasedBreakIterator::handlePrevious(const RBBIStateTable *statetable) {
     int32_t             state;
-    int16_t             category        = 0;
+    uint16_t            category        = 0;
     RBBIRunMode         mode;
     RBBIStateTableRow  *row;
     UChar32             c;
index 8b265cb0fc486cf2a57744077c11ab769878a2a9..1b6249274bb922712f450ad9669e0918f430c746 100644 (file)
@@ -1,6 +1,6 @@
 /*  
 **********************************************************************
-*   Copyright (C) 2002-2011, International Business Machines
+*   Copyright (C) 2002-2012, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 **********************************************************************
 *   file name:  ucnv_u8.c
@@ -752,7 +752,7 @@ static void
 ucnv_UTF8FromUTF8(UConverterFromUnicodeArgs *pFromUArgs,
                   UConverterToUnicodeArgs *pToUArgs,
                   UErrorCode *pErrorCode) {
-    UConverter *utf8, *cnv;
+    UConverter *utf8;
     const uint8_t *source, *sourceLimit;
     uint8_t *target;
     int32_t targetCapacity;
@@ -765,7 +765,6 @@ ucnv_UTF8FromUTF8(UConverterFromUnicodeArgs *pFromUArgs,
 
     /* set up the local pointers */
     utf8=pToUArgs->converter;
-    cnv=pFromUArgs->converter;
     source=(uint8_t *)pToUArgs->source;
     sourceLimit=(uint8_t *)pToUArgs->sourceLimit;
     target=(uint8_t *)pFromUArgs->target;
index 18101ce4cac9feb4c23d056ae7fca2356b108a88..4258dbdb0960170c85d8039dbb80e28655d1e988 100644 (file)
@@ -1,7 +1,7 @@
 /*
 ******************************************************************************
 *
-*   Copyright (C) 2000-2011, International Business Machines
+*   Copyright (C) 2000-2012, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 ******************************************************************************
@@ -5180,7 +5180,7 @@ ucnv_DBCSFromUTF8(UConverterFromUnicodeArgs *pFromUArgs,
 
     uint32_t stage2Entry;
     uint32_t asciiRoundtrips;
-    uint16_t value, minValue;
+    uint16_t value;
     UBool hasSupplementary;
 
     /* set up the local pointers */
@@ -5200,13 +5200,6 @@ ucnv_DBCSFromUTF8(UConverterFromUnicodeArgs *pFromUArgs,
     }
     asciiRoundtrips=cnv->sharedData->mbcs.asciiRoundtrips;
 
-    if(cnv->useFallback) {
-        /* use all roundtrip and fallback results */
-        minValue=0x800;
-    } else {
-        /* use only roundtrips and fallbacks from private-use characters */
-        minValue=0xc00;
-    }
     hasSupplementary=(UBool)(cnv->sharedData->mbcs.unicodeMask&UCNV_HAS_SUPPLEMENTARY);
 
     /* get the converter state from the UTF-8 UConverter */
index b4ced0ea9291ed0b9729e8c67dffc97c1fe1073c..b33268c8fef578c319634fb9c18d4869d90d36a2 100644 (file)
@@ -1,7 +1,7 @@
 /*
 *******************************************************************************
 *
-*   Copyright (C) 2003-2011, International Business Machines
+*   Copyright (C) 2003-2012, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 *******************************************************************************
@@ -106,7 +106,6 @@ utrie_swap(const UDataSwapper *ds,
 U_CAPI UBool U_EXPORT2
 ucol_looksLikeCollationBinary(const UDataSwapper *ds,
                               const void *inData, int32_t length) {
-    const uint8_t *inBytes;
     const UCATableHeader *inHeader;
     UCATableHeader header;
 
@@ -114,7 +113,6 @@ ucol_looksLikeCollationBinary(const UDataSwapper *ds,
         return FALSE;
     }
 
-    inBytes=(const uint8_t *)inData;
     inHeader=(const UCATableHeader *)inData;
 
     /*
index e477ce39a09ff93fa2722efbbaa2167e4fd48501..5db5e8f41333627e43c2b84e18661bb932949b68 100644 (file)
@@ -1,6 +1,6 @@
 /*
 **********************************************************************
-*   Copyright (C) 2009-2011, International Business Machines
+*   Copyright (C) 2009-2012, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 **********************************************************************
 */
@@ -2022,7 +2022,6 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta
     ExtensionListEntry *pExtension;
     AttributeListEntry *pAttribute;
     char *pExtValueSubtag, *pExtValueSubtagEnd;
-    char *pAttrValue;
     int32_t i;
     UBool isLDMLExtension, reqLDMLType, privateuseVar = FALSE;
 
@@ -2099,7 +2098,6 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta
     pExtValueSubtag = NULL;
     pExtValueSubtagEnd = NULL;
     pAttribute = NULL;
-    pAttrValue = NULL;
     isLDMLExtension = FALSE;
     reqLDMLType = FALSE;
 
index 450f43fdd2fc62600b5bbc945149c9dd41b3f970..107426de4991a322a2c187ad73fba1ba14527de6 100644 (file)
@@ -1,6 +1,6 @@
 /*
 ******************************************************************************
-* Copyright (C) 1997-2011, International Business Machines Corporation and   *
+* Copyright (C) 1997-2012, International Business Machines Corporation and   *
 * others. All Rights Reserved.                                               *
 ******************************************************************************
 *
@@ -323,7 +323,7 @@ static UResourceDataEntry *init_entry(const char *localeID, const char *path, UE
     char aliasName[100] = { 0 };
     int32_t aliasLen = 0;
     /*UBool isAlias = FALSE;*/
-    UHashTok hashkey;
+    /*UHashTok hashkey; */
 
     if(U_FAILURE(*status)) {
         return NULL;
@@ -342,7 +342,7 @@ static UResourceDataEntry *init_entry(const char *localeID, const char *path, UE
     find.fPath = (char *)path;
 
     /* calculate the hash value of the entry */
-    hashkey.pointer = (void *)&find;
+    /*hashkey.pointer = (void *)&find;*/
     /*hashValue = hashEntry(hashkey);*/
 
     /* check to see if we already have this entry */
index 65a0d33e8a4cb32035c7ed88a8daee794dcad604..c09c13228f4a9df6d0122af202d32dfe7e5361af 100644 (file)
@@ -1,7 +1,7 @@
 /*
  ******************************************************************************
  *
- *   Copyright (C) 2000-2011, International Business Machines
+ *   Copyright (C) 2000-2012, International Business Machines
  *   Corporation and others.  All Rights Reserved.
  *
  ******************************************************************************
@@ -913,8 +913,8 @@ expandCompositCharAtBegin(UChar *dest, int32_t sourceLength, int32_t destSize,UE
             if( countl>0 && isLamAlefChar(dest[i])) {
                 tempbuffer[j] = LAM_CHAR;
                 /* to ensure the array index is within the range */
-                U_ASSERT(dest[i]-0xFEF5 >= 0
-                    && dest[i]-0xFEF5 < sizeof(convertLamAlef)/sizeof(convertLamAlef[0]));
+                U_ASSERT(dest[i] >= 0xFEF5u
+                    && dest[i]-0xFEF5u < sizeof(convertLamAlef)/sizeof(convertLamAlef[0]));
                 tempbuffer[j-1] = convertLamAlef[ dest[i] - 0xFEF5 ];
                 j--;
                 countl--;
@@ -1306,8 +1306,8 @@ shapeUnicode(UChar *dest, int32_t sourceLength,
                         tashkeelFound  = 1;
                     } else {
                         /* to ensure the array index is within the range */
-                        U_ASSERT(dest[i]-0x064B >= 0
-                            && dest[i]-0x064B < sizeof(IrrelevantPos)/sizeof(IrrelevantPos[0]));
+                        U_ASSERT(dest[i] >= 0x064Bu
+                            && dest[i]-0x064Bu < sizeof(IrrelevantPos)/sizeof(IrrelevantPos[0]));
                         dest[i] =  0xFE70 + IrrelevantPos[(dest[i] - 0x064B)] + Shape;
                     }
                 }else if ((currLink & APRESENT) > 0) {
index df2ee1d9c1b8b761d41c8e0585646996df585a2b..10d6be35f32f36a85013d5f1ff08601e938c8393 100644 (file)
@@ -1,6 +1,6 @@
 /*
 *******************************************************************************
-* Copyright (C) 1997-2011, International Business Machines Corporation and    *
+* Copyright (C) 1997-2012, International Business Machines Corporation and    *
 * others. All Rights Reserved.                                                *
 *******************************************************************************
 *
@@ -247,8 +247,7 @@ static ECalType getCalendarTypeForLocale(const char *locid) {
     regionLen = uloc_getCountry(canonicalName, region, sizeof(region) - 1, &status);
     if (regionLen == 0) {
         char fullLoc[256];
-        int32_t fullLocLen = 0;
-        fullLocLen = uloc_addLikelySubtags(locid, fullLoc, sizeof(fullLoc) - 1, &status);
+        uloc_addLikelySubtags(locid, fullLoc, sizeof(fullLoc) - 1, &status);
         regionLen = uloc_getCountry(fullLoc, region, sizeof(region) - 1, &status);
     }
     if (U_FAILURE(status)) {
index 3201cdded8f4cea1ccff2b80ae8ef6456dda1d22..8717db086cb23c432870525fe81ccecdf1068fb0 100644 (file)
@@ -406,7 +406,6 @@ void
 DateTimePatternGenerator::addICUPatterns(const Locale& locale, UErrorCode& status) {
     UnicodeString dfPattern;
     UnicodeString conflictingString;
-    UDateTimePatternConflict conflictingStatus;
     DateFormat* df;
 
     if (U_FAILURE(status)) {
@@ -419,7 +418,7 @@ DateTimePatternGenerator::addICUPatterns(const Locale& locale, UErrorCode& statu
         df = DateFormat::createDateInstance(style, locale);
         SimpleDateFormat* sdf;
         if (df != NULL && (sdf = dynamic_cast<SimpleDateFormat*>(df)) != NULL) {
-            conflictingStatus = addPattern(sdf->toPattern(dfPattern), FALSE, conflictingString, status);
+            addPattern(sdf->toPattern(dfPattern), FALSE, conflictingString, status);
         }
         // TODO Maybe we should return an error when the date format isn't simple.
         delete df;
@@ -429,7 +428,7 @@ DateTimePatternGenerator::addICUPatterns(const Locale& locale, UErrorCode& statu
 
         df = DateFormat::createTimeInstance(style, locale);
         if (df != NULL && (sdf = dynamic_cast<SimpleDateFormat*>(df)) != NULL) {
-            conflictingStatus = addPattern(sdf->toPattern(dfPattern), FALSE, conflictingString, status);
+            addPattern(sdf->toPattern(dfPattern), FALSE, conflictingString, status);
             // HACK for hh:ss
             if ( i==DateFormat::kMedium ) {
                 hackPattern = dfPattern;
@@ -445,7 +444,6 @@ DateTimePatternGenerator::addICUPatterns(const Locale& locale, UErrorCode& statu
 
 void
 DateTimePatternGenerator::hackTimes(const UnicodeString& hackPattern, UErrorCode& status)  {
-    UDateTimePatternConflict conflictingStatus;
     UnicodeString conflictingString;
 
     fp->set(hackPattern);
@@ -476,7 +474,7 @@ DateTimePatternGenerator::hackTimes(const UnicodeString& hackPattern, UErrorCode
                             break;
                         }
                         mmss+= field;
-                        conflictingStatus = addPattern(mmss, FALSE, conflictingString, status);
+                        addPattern(mmss, FALSE, conflictingString, status);
                         break;
                     }
                     else {
@@ -500,7 +498,6 @@ DateTimePatternGenerator::addCLDRData(const Locale& locale, UErrorCode& err) {
     UResourceBundle *patBundle, *fieldBundle, *fBundle;
     UnicodeString rbPattern, value, field;
     UnicodeString conflictingPattern;
-    UDateTimePatternConflict conflictingStatus;
     const char *key=NULL;
     int32_t i;
 
@@ -633,7 +630,7 @@ DateTimePatternGenerator::addCLDRData(const Locale& locale, UErrorCode& err) {
             setAvailableFormat(retKey, err);
             // Add pattern with its associated skeleton. Override any duplicate derived from std patterns,
             // but not a previous availableFormats entry:
-            conflictingStatus = addPatternWithSkeleton(format, &retKey, TRUE, conflictingPattern, err);
+            addPatternWithSkeleton(format, &retKey, TRUE, conflictingPattern, err);
         }
 #if defined(U_USE_ASCII_BUNDLE_ITERATOR)
         ures_a_close(&aiter);
@@ -676,7 +673,7 @@ DateTimePatternGenerator::addCLDRData(const Locale& locale, UErrorCode& err) {
                     setAvailableFormat(retKey, err);
                     // Add pattern with its associated skeleton. Override any duplicate derived from std patterns,
                     // but not a previous availableFormats entry:
-                    conflictingStatus = addPatternWithSkeleton(format, &retKey, TRUE, conflictingPattern, err);
+                    addPatternWithSkeleton(format, &retKey, TRUE, conflictingPattern, err);
                 }
             }
 #if defined(U_USE_ASCII_BUNDLE_ITERATOR)
@@ -821,11 +818,10 @@ DateTimePatternGenerator::getDecimal() const {
 void
 DateTimePatternGenerator::addCanonicalItems() {
     UnicodeString  conflictingPattern;
-    UDateTimePatternConflict conflictingStatus;
     UErrorCode status = U_ZERO_ERROR;
 
     for (int32_t i=0; i<UDATPG_FIELD_COUNT; i++) {
-        conflictingStatus = addPattern(UnicodeString(Canonical_Items[i]), FALSE, conflictingPattern, status);
+        addPattern(UnicodeString(Canonical_Items[i]), FALSE, conflictingPattern, status);
     }
 }
 
index 2fb1abf2b22b110b857ba693e961134a3f2ce1aa..afbb77d3f3f724139cc8a491808b27ff515a0ee0 100644 (file)
@@ -1,6 +1,6 @@
 /*
 *******************************************************************************
-* Copyright (C) 2010-2011, International Business Machines Corporation and
+* Copyright (C) 2010-2012, International Business Machines Corporation and
 * others. All Rights Reserved.
 *******************************************************************************
 *
@@ -262,7 +262,6 @@ UBool NumberingSystem::isValidDigitString(const UnicodeString& str) {
 
     StringCharacterIterator it(str);
     UChar32 c;
-    UChar32 prev = 0;
     int32_t i = 0;
 
     for ( it.setToStart(); it.hasNext(); ) {
@@ -271,7 +270,6 @@ UBool NumberingSystem::isValidDigitString(const UnicodeString& str) {
           return FALSE;
        }
        i++;
-       prev = c;
     }
     return TRUE;   
 }
index 51303417aa95e1ddc529b9ebde8de1a65859f308..3ab36efe4c6847eea5ee7de25d0253a15cfc3316 100644 (file)
@@ -1,6 +1,6 @@
 /*
  ******************************************************************************
- * Copyright (C) 2003-2008, International Business Machines Corporation
+ * Copyright (C) 2003-2012, International Business Machines Corporation
  * and others. All Rights Reserved.
  ******************************************************************************
  *
@@ -86,11 +86,10 @@ jalali_to_julian(int year, int month, int day)
 
 static void julian_to_jalali (int32_t daysNo, int *h_y, int *h_m, int *h_d) 
 {
-    int year=0, month=0, day=0,scalarDays=0;
+    int year=0, month=0, day=0;
     int i;
 
     daysNo+=856493;
-    scalarDays=daysNo;
     year=(daysNo/1029983)*2820;
     daysNo=daysNo%1029983;
 
index 293eae1b2cc77a48592c3e4244c4eff4663458d2..4b19cf713f1d96eeed54be39222edd11a59f80dc 100644 (file)
@@ -1,6 +1,6 @@
 /*
 *******************************************************************************
-* Copyright (C) 2011, International Business Machines Corporation and
+* Copyright (C) 2012, International Business Machines Corporation and
 * others. All Rights Reserved.
 *******************************************************************************
 */
@@ -869,7 +869,7 @@ TimeZoneGenericNames::findBestMatch(const UnicodeString& text, int32_t start, ui
     int32_t bestMatchLen = 0;
     UTimeZoneTimeType bestMatchTimeType = UTZFMT_TIME_TYPE_UNKNOWN;
     UnicodeString bestMatchTzID;
-    UBool isLongStandard = FALSE;   // workaround - see the comments below
+    // UBool isLongStandard = FALSE;   // workaround - see the comments below
     UBool isStandard = FALSE;       // TODO: Temporary hack (on hack) for short standard name/location name conflict (found in zh_Hant), should be removed after CLDR 21m1 integration
 
     if (tznamesMatches != NULL) {
@@ -888,7 +888,7 @@ TimeZoneGenericNames::findBestMatch(const UnicodeString& text, int32_t start, ui
                 UTimeZoneNameType nameType = tznamesMatches->getNameType(i);
                 switch (nameType) {
                 case UTZNM_LONG_STANDARD:
-                    isLongStandard = TRUE;
+                    // isLongStandard = TRUE;
                 case UTZNM_SHORT_STANDARD:  // this one is never used for generic, but just in case
                     isStandard = TRUE;      // TODO: Remove this later, see the comments above.
                     bestMatchTimeType = UTZFMT_TIME_TYPE_STANDARD;
index 0d3b3aeac4b46d2a4cd4b4e9b06292bece557f34..5267785280616e3389dca0d89f8903aab88934da 100644 (file)
@@ -639,8 +639,7 @@ ucal_getKeywordValuesForLocale(const char * /* key */, const char* locale, UBool
     prefRegionLength = uloc_getCountry(locale, prefRegion, sizeof(prefRegion), status);
     if (prefRegionLength == 0) {
         char loc[ULOC_FULLNAME_CAPACITY] = "";
-        int32_t locLength = 0;
-        locLength = uloc_addLikelySubtags(locale, loc, sizeof(loc), status);
+        uloc_addLikelySubtags(locale, loc, sizeof(loc), status);
         
         prefRegionLength = uloc_getCountry(loc, prefRegion, sizeof(prefRegion), status);
     }
index e9e83b6f0e4356cbef39d1532ff5d5b595878683..3a92e1d02a1f0458587d0ed8b20f3135c392b081 100644 (file)
@@ -1,7 +1,7 @@
 /*
 *******************************************************************************
 *
-*   Copyright (C) 2001-2011, International Business Machines
+*   Copyright (C) 2001-2012, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 *******************************************************************************
@@ -806,13 +806,12 @@ static void uprv_uca_unsafeCPAddCCNZ(tempUCATable *t, UErrorCode *status) {
         const UHashElement *e = NULL;
         UCAElements *element = NULL;
         UChar NFCbuf[256];
-        uint32_t NFCbufLen = 0;
         while((e = uhash_nextElement(t->prefixLookup, &i)) != NULL) {
             element = (UCAElements *)e->value.pointer;
             // codepoints here are in the NFD form. We need to add the
             // first code point of the NFC form to unsafe, because
             // strcoll needs to backup over them.
-            NFCbufLen = unorm_normalize(element->cPoints, element->cSize, UNORM_NFC, 0,
+            unorm_normalize(element->cPoints, element->cSize, UNORM_NFC, 0,
                 NFCbuf, 256, status);
             unsafeCPSet(t->unsafeCP, NFCbuf[0]);
         }
@@ -1873,7 +1872,7 @@ uprv_uca_addTailCanonicalClosures(tempUCATable *t,
     UChar  comp[256];
     CompData precomp[256];   // precomposed array
     int32_t  precompLen = 0; // count for precomp
-    int32_t i, len, decompLen, curClass, replacedPos;
+    int32_t i, len, decompLen, replacedPos;
     tempTailorContext c;
 
     if ( cmLookup == NULL ) {
@@ -1903,7 +1902,7 @@ uprv_uca_addTailCanonicalClosures(tempUCATable *t,
             // Save the current precomposed char and its class to find any
             // other combining mark combinations.
             precomp[precompLen].cp=comp[0];
-            curClass = precomp[precompLen].cClass =
+            precomp[precompLen].cClass =
                        index[nfcImpl->getFCD16(decomp[1]) & 0xff];
             precompLen++;
             replacedPos=0;
index b70c3145330d6571b27957ca2672ca0eeef86707..ca40cc603be0a8deef18f3aae5879a9588da6ecb 100644 (file)
@@ -1,7 +1,7 @@
 /*
 *******************************************************************************
 *
-*   Copyright (C) 2001-2011, International Business Machines
+*   Copyright (C) 2001-2012, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 *******************************************************************************
@@ -1549,7 +1549,7 @@ inline UColToken *getVirginBefore(UColTokenParser *src, UColToken *sourceToken,
     collIterate s;
     uint32_t baseCE = UCOL_NOT_FOUND, baseContCE = UCOL_NOT_FOUND;
     uint32_t CE, SecondCE;
-    uint32_t invPos;
+    // uint32_t invPos;
     if(sourceToken != NULL) {
         uprv_init_collIterate(src->UCA, src->source+((sourceToken->source)&0xFFFFFF), 1, &s, status);
     } else {
@@ -1608,7 +1608,7 @@ inline UColToken *getVirginBefore(UColTokenParser *src, UColToken *sourceToken,
         }
 
     } else {
-        invPos = ucol_inv_getPrevCE(src, baseCE, baseContCE, &CE, &SecondCE, strength);
+        /* invPos = */ ucol_inv_getPrevCE(src, baseCE, baseContCE, &CE, &SecondCE, strength);
 
         // we got the previous CE. Now we need to see if the difference between
         // the two CEs is really of the requested strength.
index 60024c1df0449b0e4eb47f9131e6bfb3cdad6cda..707aa480a95c2602302b272d4a65dc3d5e67c8cb 100644 (file)
@@ -2000,14 +2000,13 @@ ucurr_countCurrencies(const char* locale,
                  UErrorCode* ec)
 {
     int32_t currCount = 0;
-    int32_t resLen = 0;
 
     if (ec != NULL && U_SUCCESS(*ec)) 
     {
         // local variables
         UErrorCode localStatus = U_ZERO_ERROR;
         char id[ULOC_FULLNAME_CAPACITY];
-        resLen = uloc_getKeywordValue(locale, "currency", id, ULOC_FULLNAME_CAPACITY, &localStatus);
+        uloc_getKeywordValue(locale, "currency", id, ULOC_FULLNAME_CAPACITY, &localStatus);
         // get country or country_variant in `id'
         /*uint32_t variantType =*/ idForLocale(locale, id, sizeof(id), ec);
 
@@ -2274,8 +2273,7 @@ U_CAPI UEnumeration *U_EXPORT2 ucurr_getKeywordValuesForLocale(const char *key,
     prefRegionLength = uloc_getCountry(locale, prefRegion, sizeof(prefRegion), status);
     if (prefRegionLength == 0) {
         char loc[ULOC_FULLNAME_CAPACITY] = "";
-        int32_t locLength = 0;
-        locLength = uloc_addLikelySubtags(locale, loc, sizeof(loc), status);
+        uloc_addLikelySubtags(locale, loc, sizeof(loc), status);
         
         prefRegionLength = uloc_getCountry(loc, prefRegion, sizeof(prefRegion), status);
     }
index 6f4753a8336773a90e17f82425776983485ba9bb..d64d8ed043f92334e3a5c2aa94617e93a7af9219 100644 (file)
@@ -1,6 +1,6 @@
 /*
 / *
- * (C) Copyright IBM Corp. 1998-2011 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2012 - All Rights Reserved
  *
  */
 
@@ -1199,7 +1199,6 @@ void IndicReordering::getDynamicProperties( DynamicProperties *, const IndicClas
 
 
     LEUnicode currentChar;
-    LEUnicode virama;
     LEUnicode workChars[2];
     LEGlyphStorage workGlyphs;
 
@@ -1207,14 +1206,17 @@ void IndicReordering::getDynamicProperties( DynamicProperties *, const IndicClas
 
     //le_int32 offset = 0;
 
+#if 0
+// TODO:  Should this section of code have actually been doing something?
     // First find the relevant virama for the script we are dealing with
-
+    LEUnicode virama;
     for ( currentChar = classTable->firstChar ; currentChar <= classTable->lastChar ; currentChar++ ) {
         if ( classTable->isVirama(currentChar)) {
             virama = currentChar;
             break;
         }
     }
+#endif
 
     for ( currentChar = classTable->firstChar ; currentChar <= classTable->lastChar ; currentChar++ ) {
         if ( classTable->isConsonant(currentChar)) {
index 13479b44cea8acb040c3f0ff6c00a2d55aa4ea7b..9b0c94a2a589976dd184f18d164224a70af946a1 100644 (file)
@@ -1,7 +1,7 @@
 
 /*
  *
- * (C) Copyright IBM Corp. 1998-2010 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2012 - All Rights Reserved
  *
  */
 
@@ -300,7 +300,7 @@ le_int32 OpenTypeLayoutEngine::computeGlyphs(const LEUnicode chars[], le_int32 o
 {
     LEUnicode *outChars = NULL;
     LEGlyphStorage fakeGlyphStorage;
-    le_int32 outCharCount, outGlyphCount, fakeGlyphCount;
+    le_int32 outCharCount, outGlyphCount;
 
     if (LE_FAILURE(success)) {
         return 0;
@@ -318,11 +318,13 @@ le_int32 OpenTypeLayoutEngine::computeGlyphs(const LEUnicode chars[], le_int32 o
     }
 
     if (outChars != NULL) {
-        fakeGlyphCount = glyphProcessing(outChars, 0, outCharCount, outCharCount, rightToLeft, fakeGlyphStorage, success);
+        // le_int32 fakeGlyphCount = 
+        glyphProcessing(outChars, 0, outCharCount, outCharCount, rightToLeft, fakeGlyphStorage, success);
         LE_DELETE_ARRAY(outChars); // FIXME: a subclass may have allocated this, in which case this delete might not work...
         //adjustGlyphs(outChars, 0, outCharCount, rightToLeft, fakeGlyphs, fakeGlyphCount);
     } else {
-        fakeGlyphCount = glyphProcessing(chars, offset, count, max, rightToLeft, fakeGlyphStorage, success);
+        // le_int32 fakeGlyphCount =
+        glyphProcessing(chars, offset, count, max, rightToLeft, fakeGlyphStorage, success);
         //adjustGlyphs(chars, offset, count, rightToLeft, fakeGlyphs, fakeGlyphCount);
     }
 
index 22b626b78fb42170dad74dc3505212a14550cb57..474e75423e9d4317424569e74577e71a3a1d7932 100644 (file)
@@ -1,7 +1,7 @@
 /*
 ********************************************************************************
 *
-*   Copyright (C) 1996-2011, International Business Machines
+*   Copyright (C) 1996-2012, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 ********************************************************************************
@@ -902,8 +902,7 @@ int T_CTEST_EXPORT2
 initArgs( int argc, const char* const argv[], ArgHandlerPtr argHandler, void *context)
 {
     int                i;
-    int                doList = FALSE;
-       int                argSkip = 0;
+    int                argSkip = 0;
 
     VERBOSITY = FALSE;
     ERR_MSG = TRUE;
@@ -928,7 +927,7 @@ initArgs( int argc, const char* const argv[], ArgHandlerPtr argHandler, void *co
         }
         else if (strcmp( argv[i], "-l" )==0 )
         {
-            doList = TRUE;
+            /* doList = TRUE; */
         }
         else if (strcmp( argv[i], "-e1") == 0)
         {
index 0a7aacad518856756c6505867c0e3dbdf5a9a093..b9e393c2881e8b88305fa2b51d272a44a14e7203 100644 (file)
@@ -1,7 +1,7 @@
 /*
 *******************************************************************************
 *
-*   Copyright (C) 1998-2011, International Business Machines
+*   Copyright (C) 1998-2012, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 *******************************************************************************
@@ -834,7 +834,6 @@ addCollation(ParseState* state, struct SResource  *result, uint32_t startline, U
     enum   ETokenType  token;
     char               subtag[1024];
     UVersionInfo       version;
-    UBool              override = FALSE;
     uint32_t           line;
     GenrbData genrbdata;
     /* '{' . (name resource)* '}' */
@@ -901,12 +900,7 @@ addCollation(ParseState* state, struct SResource  *result, uint32_t startline, U
         }
         else if (uprv_strcmp(subtag, "Override") == 0)
         {
-            override = FALSE;
-
-            if (u_strncmp(member->u.fString.fChars, trueValue, u_strlen(trueValue)) == 0)
-            {
-                override = TRUE;
-            }
+            // UBool override = (u_strncmp(member->u.fString.fChars, trueValue, u_strlen(trueValue)) == 0);
             table_add(result, member, line, status);
 
         }
@@ -1591,7 +1585,6 @@ parseImport(ParseState* state, char *tag, uint32_t startline, const struct UStri
     char             *filename;
     uint32_t          line;
     char     *fullname = NULL;
-    int32_t numRead = 0;
     filename = getInvariantString(state, &line, NULL, status);
 
     if (U_FAILURE(*status))
@@ -1686,7 +1679,7 @@ parseImport(ParseState* state, char *tag, uint32_t startline, const struct UStri
         return NULL;
     }
 
-    numRead = T_FileStream_read  (file, data, len);
+    /* int32_t numRead = */ T_FileStream_read  (file, data, len);
     T_FileStream_close (file);
 
     result = bin_open(state->bundle, tag, len, data, fullname, comment, status);
index 4b74c2f6967bf9e2206d7e87b2a0d5e1549670a2..ff6f63b030c8aaa8bb6a84f4520f1735a80f7d24 100644 (file)
@@ -1,7 +1,7 @@
 /*
 *******************************************************************************
 *
-*   Copyright (C) 2000-2011, International Business Machines
+*   Copyright (C) 2000-2012, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 *******************************************************************************
@@ -325,8 +325,6 @@ array_write_java( struct SResource *res, UErrorCode *status) {
     uint32_t  i         = 0;
     const char* arr ="new String[] { \n";
     struct SResource *current = NULL;
-    struct SResource *first =NULL;
-    UBool decrementTabs = FALSE;
     UBool allStrings    = TRUE;
 
     if (U_FAILURE(*status)) {
@@ -351,13 +349,11 @@ array_write_java( struct SResource *res, UErrorCode *status) {
             write_tabs(out);
             T_FileStream_write(out, object, (int32_t)uprv_strlen(object));
             tabCount++;
-            decrementTabs = TRUE;
         }else{
             write_tabs(out);
             T_FileStream_write(out, arr, (int32_t)uprv_strlen(arr));
             tabCount++;
         }
-        first=current;
         while (current != NULL) {
             /*if(current->fType==URES_STRING){
                 write_tabs(out);
@@ -510,9 +506,7 @@ static UBool start = TRUE;
 static void
 table_write_java(struct SResource *res, UErrorCode *status) {
     uint32_t  i         = 0;
-    UBool allStrings =TRUE;
     struct SResource *current = NULL;
-    struct SResource *save = NULL;
     const char* obj = "new Object[][]{\n";
 
     if (U_FAILURE(*status)) {
@@ -526,7 +520,7 @@ table_write_java(struct SResource *res, UErrorCode *status) {
             tabCount++;
         }
         start = FALSE;
-        save = current = res->u.fTable.fFirst;
+        current = res->u.fTable.fFirst;
         i       = 0;
 
 
@@ -541,7 +535,6 @@ table_write_java(struct SResource *res, UErrorCode *status) {
 
 
             tabCount++;
-            allStrings=FALSE;
 
             write_tabs(out);
             if(currentKeyString != NULL) {
index 52c04ea671456c222dcc2d57f18c431a533df0ae..7e760534a5a73eae885851328a486b7d9e6cbdbe 100644 (file)
@@ -1,7 +1,7 @@
 /*
 *******************************************************************************
 *
-*   Copyright (C) 2002-2009, International Business Machines
+*   Copyright (C) 2002-2012, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 *******************************************************************************
@@ -674,12 +674,10 @@ array_write_xml(struct SResource *res, const char* id, const char* language, UEr
     int index = 0;
 
     struct SResource *current = NULL;
-    struct SResource *first =NULL;
 
     sid = printContainer(res, group, array_restype, NULL, id, status);
 
     current = res->u.fArray.fFirst;
-    first=current;
 
     while (current != NULL) {
         char c[256] = {0};
@@ -910,7 +908,6 @@ table_write_xml(struct SResource *res, const char* id, const char* language, UBo
     uint32_t  i         = 0;
 
     struct SResource *current = NULL;
-    struct SResource *save = NULL;
     char* sid = NULL;
 
     if (U_FAILURE(*status)) {
@@ -923,7 +920,7 @@ table_write_xml(struct SResource *res, const char* id, const char* language, UBo
         sid[0] = '\0';
     }
 
-    save = current = res->u.fTable.fFirst;
+    current = res->u.fTable.fFirst;
     i = 0;
 
     while (current != NULL) {
index b20317971dc1cc72cbe5de49b7b131fbc9b200c6..49ea02eb5f7bdd78e1ba9add1b48ebcc1c4d2ad8 100644 (file)
@@ -1,7 +1,7 @@
 /*
 *******************************************************************************
 *
-*   Copyright (C) 1999-2011, International Business Machines
+*   Copyright (C) 1999-2012, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 *******************************************************************************
@@ -551,12 +551,10 @@ storeRange(uint32_t start, uint32_t end, UStringPrepType type,UErrorCode* status
 /* folding value: just store the offset (16 bits) if there is any non-0 entry */
 static uint32_t U_CALLCONV
 getFoldedValue(UNewTrie *trie, UChar32 start, int32_t offset) {
-    uint32_t foldedValue, value;
+    uint32_t value;
     UChar32 limit=0;
     UBool inBlockZero;
 
-    foldedValue=0;
-
     limit=start+0x400;
     while(start<limit) {
         value=utrie_get32(trie, start, &inBlockZero);
index 52d79052eee202b71f8be3c83e550963d6820b43..4c59b908a4d8128f21613b0bfebe0708aa05e37a 100644 (file)
@@ -1,7 +1,7 @@
 /*
 *******************************************************************************
 *
-*   Copyright (C) 1999-2011, International Business Machines
+*   Copyright (C) 1999-2012, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 *******************************************************************************
@@ -62,11 +62,8 @@ void cmd_millis()
   printf("Milliseconds since Epoch: %.0f\n", uprv_getUTCtime());
 }
 
-void cmd_version(UBool noLoad, UErrorCode &errorCode)
+void cmd_version(UBool /* noLoad */, UErrorCode &errorCode)
 {
-  char str[2000];
-    UVersionInfo icu;
-    
 
     do_init();
 
index c76c6918bad723dffda3ddaeb96e973b1d10fca8..a6ed246825726552063d302167cde5d747fe4248 100644 (file)
@@ -1,7 +1,7 @@
 /*
 *******************************************************************************
 *
-*   Copyright (C) 1999-2011, International Business Machines
+*   Copyright (C) 1999-2012, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 *******************************************************************************
@@ -1236,7 +1236,7 @@ void Package::setItemCapacity(int32_t max)
   Item *newItems = (Item*)uprv_malloc(max * sizeof(items[0]));
   Item *oldItems = items;
   if(newItems == NULL) {
-    fprintf(stderr, "icupkg: Out of memory trying to allocate %u bytes for %d items\n", max*sizeof(items[0]), max);
+    fprintf(stderr, "icupkg: Out of memory trying to allocate %lu bytes for %d items\n", max*sizeof(items[0]), max);
     exit(U_MEMORY_ALLOCATION_ERROR);
   }
   if(items && itemCount>0) {
index 09454d2fde53e38f69636f17603429998df7c7d0..ced82138d2e0cf553e5363ff76bc1cba071b8b8e 100644 (file)
@@ -1,5 +1,5 @@
 /******************************************************************************
- *   Copyright (C) 2008-2011, International Business Machines
+ *   Copyright (C) 2008-2012, International Business Machines
  *   Corporation and others.  All Rights Reserved.
  *******************************************************************************
  */
@@ -523,6 +523,8 @@ pathToFullPath(const char *path, const char *source) {
         fullPath[0] = 0;
     }
     n = (int32_t)uprv_strlen(fullPath);
+    fullPath[n] = 0;       /* Suppress compiler warning for unused variable n    */
+                           /*  when conditional code below is not compiled.      */
     uprv_strcat(fullPath, path);
 
 #if (U_FILE_ALT_SEP_CHAR != U_TREE_ENTRY_SEP_CHAR)
index 6d6e77c37a36981d96dcc8cdc8599e6eeeb576f0..c2a1b77d4b7dc5b1e6ff1269f2bb484244f3eaec 100644 (file)
@@ -106,7 +106,10 @@ PreparsedUCD::readLine(UErrorCode &errorCode) {
     if(U_FAILURE(errorCode)) { return NO_LINE; }
     // Select the next available line buffer.
     while(!isLineBufferAvailable(lineIndex)) {
-        lineIndex= (lineIndex==kNumLineBuffers-1) ? lineIndex=0 : lineIndex+1;
+        ++lineIndex;
+        if (lineIndex == kNumLineBuffers) {
+            lineIndex = 0;
+        }
     }
     char *line=lines[lineIndex];
     *line=0;
index 81e1c17405f149bff917be73b3089da036d1dd5a..90c1eb41e059c4a9869c194a869122a3683bc7b9 100644 (file)
@@ -750,7 +750,7 @@ udata_swap(const UDataSwapper *ds,
            UErrorCode *pErrorCode) {
     char dataFormatChars[4];
     const UDataInfo *pInfo;
-    int32_t headerSize, i, swappedLength;
+    int32_t i, swappedLength;
 
     if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
         return 0;
@@ -763,7 +763,7 @@ udata_swap(const UDataSwapper *ds,
      * information. Otherwise we would have to pass some of the information
      * and not be able to use the UDataSwapFn signature.
      */
-    headerSize=udata_swapDataHeader(ds, inData, -1, NULL, pErrorCode);
+    udata_swapDataHeader(ds, inData, -1, NULL, pErrorCode);
 
     /*
      * If we wanted udata_swap() to also handle non-loadable data like a UTrie,
index e92bb41dffd6c1ebd2b739268916de7bef6835f1..610f43a8fa87bbf59c724b8205bf3989e6b5c1f6 100644 (file)
@@ -1,6 +1,6 @@
 /********************************************************************
  * COPYRIGHT:
- * Copyright (c) 2007-2011, International Business Machines Corporation and
+ * Copyright (c) 2007-2012, International Business Machines Corporation and
  * others. All Rights Reserved.
  ********************************************************************/
 
@@ -529,7 +529,7 @@ U_CAPI int32_t udbg_getSystemParameterValueByIndex(int32_t i, char *buffer, int3
   if(i>=0 && i< (int32_t)U_SYSPARAM_COUNT) {
     return systemParams[i].paramFunction(&(systemParams[i]),buffer,bufferCapacity,status);
   } else {
-    return NULL;
+    return 0;
   }
 }