From e8b6b950f0e409b8ea187aa347497a52175b1b66 Mon Sep 17 00:00:00 2001 From: Jungshik Shin Date: Fri, 24 Sep 2010 00:13:57 +0000 Subject: [PATCH] ICU-7980 fix a few coverity errors X-SVN-Rev: 28691 --- icu4c/source/i18n/plurrule.cpp | 3 +-- icu4c/source/i18n/ucurr.cpp | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/icu4c/source/i18n/plurrule.cpp b/icu4c/source/i18n/plurrule.cpp index 666c827702a..987bb243f47 100644 --- a/icu4c/source/i18n/plurrule.cpp +++ b/icu4c/source/i18n/plurrule.cpp @@ -1,6 +1,6 @@ /* ******************************************************************************* -* Copyright (C) 2007-2009, International Business Machines Corporation and +* Copyright (C) 2007-2010, International Business Machines Corporation and * others. All Rights Reserved. ******************************************************************************* * @@ -606,7 +606,6 @@ AndConstraint::updateRepeatLimit(int32_t maxLimit) { } else { if ( rangeHigh == -1 ) { - return(rangeLow>maxLimit? rangeLow : maxLimit); return uprv_max(rangeLow, maxLimit); } else{ diff --git a/icu4c/source/i18n/ucurr.cpp b/icu4c/source/i18n/ucurr.cpp index c219021d970..1fb24b14c72 100644 --- a/icu4c/source/i18n/ucurr.cpp +++ b/icu4c/source/i18n/ucurr.cpp @@ -1839,7 +1839,6 @@ ucurr_countCurrencies(const char* locale, { int32_t currCount = 0; int32_t resLen = 0; - const UChar* s = NULL; if (ec != NULL && U_SUCCESS(*ec)) { @@ -1876,7 +1875,6 @@ ucurr_countCurrencies(const char* locale, { // get the currency resource UResourceBundle *currencyRes = ures_getByIndex(countryArray, i, NULL, &localStatus); - s = ures_getStringByKey(currencyRes, "id", &resLen, &localStatus); // get the from date int32_t fromLength = 0;