diff --git a/icu4c/source/common/putil.c b/icu4c/source/common/putil.c index 459dbe34cb..e86e3c66c2 100644 --- a/icu4c/source/common/putil.c +++ b/icu4c/source/common/putil.c @@ -58,6 +58,7 @@ #include "unicode/utypes.h" #include "unicode/putil.h" #include "unicode/ustring.h" +#include "putilimp.h" #include "uassert.h" #include "umutex.h" #include "cmemory.h" @@ -1897,7 +1898,6 @@ int_getDefaultCodepage() char *name = NULL; char *euro = NULL; const char *localeName = NULL; - const char *defaultTable = NULL; uprv_memset(codesetName, 0, sizeof(codesetName)); diff --git a/icu4c/source/common/resbund_cnv.cpp b/icu4c/source/common/resbund_cnv.cpp index a643161272..b7eddbf3fa 100644 --- a/icu4c/source/common/resbund_cnv.cpp +++ b/icu4c/source/common/resbund_cnv.cpp @@ -44,7 +44,7 @@ ResourceBundle::constructForLocale(const UnicodeString& path, { char name[300]; - if(path.length() >= sizeof(name)) { + if(path.length() >= (int32_t)sizeof(name)) { fResource = NULL; error = U_ILLEGAL_ARGUMENT_ERROR; } else if(!path.isEmpty()) { diff --git a/icu4c/source/common/unames.c b/icu4c/source/common/unames.c index 1ff98ec7f7..d53f77c5e5 100644 --- a/icu4c/source/common/unames.c +++ b/icu4c/source/common/unames.c @@ -24,6 +24,7 @@ #include "cstring.h" #include "ucln_cmn.h" #include "udataswp.h" +#include "uprops.h" /* prototypes ------------------------------------------------------------- */ diff --git a/icu4c/source/i18n/casetrn.cpp b/icu4c/source/i18n/casetrn.cpp index 3920e7b593..39469edb3b 100644 --- a/icu4c/source/i18n/casetrn.cpp +++ b/icu4c/source/i18n/casetrn.cpp @@ -144,7 +144,9 @@ void CaseMapTransliterator::handleTransliterate(Replaceable& text, return; } - UCaseContext csc={ &text }; + UCaseContext csc; + uprv_memset(&csc, 0, sizeof(csc)); + csc.p = &text; csc.start = offsets.contextStart; csc.limit = offsets.contextLimit; diff --git a/icu4c/source/i18n/dcfmtsym.cpp b/icu4c/source/i18n/dcfmtsym.cpp index 46f43aac80..74d658d7d4 100644 --- a/icu4c/source/i18n/dcfmtsym.cpp +++ b/icu4c/source/i18n/dcfmtsym.cpp @@ -154,7 +154,6 @@ DecimalFormatSymbols::initialize(const Locale& loc, UErrorCode& status, int32_t numberElementsStrLen[kFormatSymbolCount]; int32_t i = 0; for(i = 0; i TYPE_MAPPING_LEN) { + numberElementsLength = TYPE_MAPPING_LEN; + } - for (idx = 0; idx < (int32_t)(sizeof(TYPE_MAPPING)/sizeof(TYPE_MAPPING[0])); idx++) { + for (idx = 0; idx < numberElementsLength; idx++) { fSymbols[TYPE_MAPPING[idx][0]].setTo(TRUE, numberElements[TYPE_MAPPING[idx][1]], numberElementsStrLen[TYPE_MAPPING[idx][1]]); } diff --git a/icu4c/source/i18n/titletrn.cpp b/icu4c/source/i18n/titletrn.cpp index 57db64c1fd..dd3375b900 100644 --- a/icu4c/source/i18n/titletrn.cpp +++ b/icu4c/source/i18n/titletrn.cpp @@ -107,7 +107,9 @@ void TitlecaseTransliterator::handleTransliterate( // Convert things after a cased character toLower; things // after an uncased, non-case-ignorable character toTitle. Case-ignorable // characters are copied directly and do not change the mode. - UCaseContext csc={ &text }; + UCaseContext csc; + uprv_memset(&csc, 0, sizeof(csc)); + csc.p = &text; csc.start = offsets.contextStart; csc.limit = offsets.contextLimit;