]> granicus.if.org Git - icu/commitdiff
ICU-8595 Warning cleanup, UResType vs. int32_t
authorAndy Heninger <andy.heninger@gmail.com>
Sun, 10 Jul 2011 23:22:00 +0000 (23:22 +0000)
committerAndy Heninger <andy.heninger@gmail.com>
Sun, 10 Jul 2011 23:22:00 +0000 (23:22 +0000)
X-SVN-Rev: 30310

icu4c/source/common/uresbund.cpp

index bb03948b51a875fc8589ad1f7dbc704023cae8aa..de5048b059dfa7ddd5cae8c66ea03d64e0fd08cc 100644 (file)
@@ -976,7 +976,7 @@ static UResourceBundle *init_resb_result(const ResourceData *rdata, Resource r,
                             } else if(idx != -1) {
                                 /* if there is no key, but there is an index, try to get by the index */
                                 /* here we have either a table or an array, so get the element */
-                                UResType type = (UResType)RES_GET_TYPE(r);
+                                int32_t type = RES_GET_TYPE(r);
                                 if(URES_IS_TABLE(type)) {
                                     r = res_getTableItemByIndex(&(mainRes->fResData), r, idx, (const char **)&aKey);
                                 } else { /* array */
@@ -1685,7 +1685,6 @@ ures_getByKeyWithFallback(const UResourceBundle *resB,
     /*UResourceDataEntry *realData = NULL;*/
     const char *key = inKey;
     UResourceBundle *helper = NULL;
-    UResType type;
 
     if (status==NULL || U_FAILURE(*status)) {
         return fillIn;
@@ -1695,7 +1694,7 @@ ures_getByKeyWithFallback(const UResourceBundle *resB,
         return fillIn;
     }
 
-    type = (UResType)RES_GET_TYPE(resB->fRes);
+    int32_t type = RES_GET_TYPE(resB->fRes);
     if(URES_IS_TABLE(type)) {
         int32_t t;
         res = res_getTableItemByKey(&(resB->fResData), resB->fRes, &t, &key);
@@ -1763,7 +1762,6 @@ U_CAPI UResourceBundle* U_EXPORT2 ures_getByKey(const UResourceBundle *resB, con
     Resource res = RES_BOGUS;
     UResourceDataEntry *realData = NULL;
     const char *key = inKey;
-    UResType type;
 
     if (status==NULL || U_FAILURE(*status)) {
         return fillIn;
@@ -1773,7 +1771,7 @@ U_CAPI UResourceBundle* U_EXPORT2 ures_getByKey(const UResourceBundle *resB, con
         return fillIn;
     }
 
-    type = (UResType)RES_GET_TYPE(resB->fRes);
+    int32_t type = RES_GET_TYPE(resB->fRes);
     if(URES_IS_TABLE(type)) {
         int32_t t;
         res = res_getTableItemByKey(&(resB->fResData), resB->fRes, &t, &key);
@@ -1817,7 +1815,6 @@ U_CAPI const UChar* U_EXPORT2 ures_getStringByKey(const UResourceBundle *resB, c
     Resource res = RES_BOGUS;
     UResourceDataEntry *realData = NULL;
     const char* key = inKey;
-    UResType type;
 
     if (status==NULL || U_FAILURE(*status)) {
         return NULL;
@@ -1827,7 +1824,7 @@ U_CAPI const UChar* U_EXPORT2 ures_getStringByKey(const UResourceBundle *resB, c
         return NULL;
     }
 
-    type = (UResType)RES_GET_TYPE(resB->fRes);
+    int32_t type = RES_GET_TYPE(resB->fRes);
     if(URES_IS_TABLE(type)) {
         int32_t t=0;