]> granicus.if.org Git - icu/commitdiff
ICU-9672 Add casts to avoid warnings
authorPeter Edberg <pedberg@unicode.org>
Wed, 17 Oct 2012 21:54:06 +0000 (21:54 +0000)
committerPeter Edberg <pedberg@unicode.org>
Wed, 17 Oct 2012 21:54:06 +0000 (21:54 +0000)
X-SVN-Rev: 32650

icu4c/source/i18n/utmscale.c

index 33f5d9212d07897cf9541d9121833d993b48de7e..8db051d2cde3afee5d9f9be8493c8cfc2b150caa 100644 (file)
@@ -1,6 +1,6 @@
 /*
 *******************************************************************************
-* Copyright (C) 2004-2006, International Business Machines Corporation and
+* Copyright (C) 2004-2012, International Business Machines Corporation and
 * others. All Rights Reserved.
 *******************************************************************************
 */
@@ -60,7 +60,7 @@ utmscale_fromInt64(int64_t otherTime, UDateTimeScale timeScale, UErrorCode *stat
         return 0;
     }
 
-    if (timeScale < 0 || timeScale >= UDTS_MAX_SCALE) {
+    if ((int32_t)timeScale < 0 || timeScale >= UDTS_MAX_SCALE) {
         *status = U_ILLEGAL_ARGUMENT_ERROR;
         return 0;
     }
@@ -84,7 +84,7 @@ utmscale_toInt64(int64_t universalTime, UDateTimeScale timeScale, UErrorCode *st
         return 0;
     }
 
-    if (timeScale < 0 || timeScale >= UDTS_MAX_SCALE) {
+    if ((int32_t)timeScale < 0 || timeScale >= UDTS_MAX_SCALE) {
         *status = U_ILLEGAL_ARGUMENT_ERROR;
         return 0;
     }