From: Andy Heninger Date: Sat, 18 Feb 2017 00:14:37 +0000 (+0000) Subject: ICU-12913 Add cast to avoid printf compile warning. X-Git-Tag: release-59-rc~144 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4ff013c080c73e4f2fcfdc2cc3d51189ed3bcf0f;p=icu ICU-12913 Add cast to avoid printf compile warning. X-SVN-Rev: 39688 --- diff --git a/icu4c/source/tools/toolutil/package.cpp b/icu4c/source/tools/toolutil/package.cpp index 12063b74001..e3354b35243 100644 --- a/icu4c/source/tools/toolutil/package.cpp +++ b/icu4c/source/tools/toolutil/package.cpp @@ -381,7 +381,7 @@ U_CDECL_END U_NAMESPACE_BEGIN -Package::Package() +Package::Package() : doAutoPrefix(FALSE), prefixEndsWithType(FALSE) { inPkgName[0]=0; pkgPrefix[0]=0; @@ -1281,7 +1281,7 @@ Package::sortItems() { } } -void Package::setItemCapacity(int32_t max) +void Package::setItemCapacity(int32_t max) { if(max<=itemMax) { return; @@ -1289,8 +1289,8 @@ void Package::setItemCapacity(int32_t max) Item *newItems = (Item*)uprv_malloc(max * sizeof(items[0])); Item *oldItems = items; if(newItems == NULL) { - fprintf(stderr, "icupkg: Out of memory trying to allocate %lu bytes for %d items\n", - (unsigned long)max*sizeof(items[0]), max); + fprintf(stderr, "icupkg: Out of memory trying to allocate %lu bytes for %d items\n", + (unsigned long)(max*sizeof(items[0])), max); exit(U_MEMORY_ALLOCATION_ERROR); } if(items && itemCount>0) {