From 3c6aa96907d544bd5a8666d39e9c632a280805b3 Mon Sep 17 00:00:00 2001 From: George Rhoten Date: Thu, 29 Mar 2001 20:32:09 +0000 Subject: [PATCH] ICU-900 Fixed some compiler warnings. X-SVN-Rev: 4400 --- icu4c/source/test/intltest/numfmtst.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/icu4c/source/test/intltest/numfmtst.cpp b/icu4c/source/test/intltest/numfmtst.cpp index 9199f4740de..0a503da5bf5 100644 --- a/icu4c/source/test/intltest/numfmtst.cpp +++ b/icu4c/source/test/intltest/numfmtst.cpp @@ -55,7 +55,7 @@ NumberFormatTest::TestPatterns(void) if (U_FAILURE(status)) { errln("FAIL: Could not construct DecimalFormatSymbols"); return; } const char* pat[] = { "#.#", "#.", ".#", "#" }; - int32_t pat_length = sizeof(pat) / sizeof(pat[0]); + int32_t pat_length = (int32_t)(sizeof(pat) / sizeof(pat[0])); const char* newpat[] = { "#0.#", "#0.", "#.0", "#" }; const char* num[] = { "0", "0.", ".0", "0" }; for (int32_t i=0; i 300 double val[] = { 0.01234, 123456789, 1.23e300, -3.141592653e-271 }; - int32_t val_length = sizeof(val) / sizeof(val[0]); + int32_t val_length = (int32_t)(sizeof(val) / sizeof(val[0])); const char* valFormat[] = { // 0.####E0 @@ -150,7 +150,7 @@ NumberFormatTest::TestExponential(void) #endif int32_t lval[] = { 0, -1, 1, 123456789 }; - int32_t lval_length = sizeof(lval) / sizeof(lval[0]); + int32_t lval_length = (int32_t)(sizeof(lval) / sizeof(lval[0])); const char* lvalFormat[] = { // 0.####E0 @@ -586,7 +586,7 @@ void NumberFormatTest::TestScientific(void) { // Test pattern round-trip const char* PAT[] = { "#E0", "0.####E0", "00.000E00", "##0.####E000", "0.###E0;[0.###E0]" }; - int32_t PAT_length = sizeof(PAT) / sizeof(PAT[0]); + int32_t PAT_length = (int32_t)(sizeof(PAT) / sizeof(PAT[0])); int32_t DIGITS[] = { // min int, max int, min frac, max frac 0, 1, 0, 0, // "#E0"