]> granicus.if.org Git - icu/commitdiff
ICU-12028 Compiler warning cleanup.
authorAndy Heninger <andy.heninger@gmail.com>
Wed, 9 Dec 2015 02:11:07 +0000 (02:11 +0000)
committerAndy Heninger <andy.heninger@gmail.com>
Wed, 9 Dec 2015 02:11:07 +0000 (02:11 +0000)
X-SVN-Rev: 38116

icu4c/source/common/putil.cpp
icu4c/source/common/sharedobject.cpp
icu4c/source/test/intltest/numrgts.cpp

index 09f606f8f4f78423649e2d1b057a0abd5e542d25..58a1bb3ccd22e036f60baba918bcd9294e37dba9 100644 (file)
@@ -2204,6 +2204,7 @@ uprv_dlsym_func(void *lib, const char* sym, UErrorCode *status) {
 
 U_INTERNAL void * U_EXPORT2
 uprv_dl_open(const char *libName, UErrorCode *status) {
+    (void)libName;
     if(U_FAILURE(*status)) return NULL;
     *status = U_UNSUPPORTED_ERROR;
     return NULL;
@@ -2211,6 +2212,7 @@ uprv_dl_open(const char *libName, UErrorCode *status) {
 
 U_INTERNAL void U_EXPORT2
 uprv_dl_close(void *lib, UErrorCode *status) {
+    (void)lib;
     if(U_FAILURE(*status)) return;
     *status = U_UNSUPPORTED_ERROR;
     return;
@@ -2219,6 +2221,8 @@ uprv_dl_close(void *lib, UErrorCode *status) {
 
 U_INTERNAL UVoidFunction* U_EXPORT2
 uprv_dlsym_func(void *lib, const char* sym, UErrorCode *status) {
+  (void)lib;
+  (void)sym;
   if(U_SUCCESS(*status)) {
     *status = U_UNSUPPORTED_ERROR;
   }
index e5e034bec13b9e2b447b6f30884ff84480fe0da7..bffd8a3fc8801f15bde632348929d658aee90655 100644 (file)
@@ -26,6 +26,7 @@ SharedObject::addRef(UBool fromWithinCache) const {
         // cache global mutex is locked. In this way, we can be rest assured
         // that data races can't happen if the cache performs some task if
         // the hardRefCount is zero while the global cache mutex is locked.
+        (void)fromWithinCache;   // Suppress unused variable warning in non-debug builds.
         U_ASSERT(fromWithinCache);
         cachePtr->incrementItemsInUse();
     }
index aa0f2b4e0ee19fa7cf967b43d60966aab2914abf..752595c5a028471db609270308b9c84da2ee9d78 100644 (file)
@@ -2729,6 +2729,7 @@ void NumberFormatRegressionTest::TestJ691(void) {
     {                                                                     \
       char _msg[1000]; \
       int32_t len = sprintf (_msg,"File %s, line %d: Assertion Failed: " #x "==" #y "\n", __FILE__, __LINE__); \
+      (void)len;                                                         \
       U_ASSERT(len < (int32_t) sizeof(_msg));                            \
       assertEquals((const char*) _msg, x,y);                             \
     }