From 569d7ec827b5b8b8af8e73dd8fdb1841d81e0fd9 Mon Sep 17 00:00:00 2001 From: George Rhoten Date: Fri, 1 Jun 2001 00:34:42 +0000 Subject: [PATCH] ICU-900 Fixed some compiler warnings. X-SVN-Rev: 4861 --- icu4c/source/test/cintltst/ccolltst.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/icu4c/source/test/cintltst/ccolltst.c b/icu4c/source/test/cintltst/ccolltst.c index 69484c2a90..27a2661295 100644 --- a/icu4c/source/test/cintltst/ccolltst.c +++ b/icu4c/source/test/cintltst/ccolltst.c @@ -12,16 +12,17 @@ * Madhu Katragadda Creation ********************************************************************************* */ -#include #include -#include #include "cintltst.h" #include "ccolltst.h" #include "unicode/ucol.h" #include "unicode/ustring.h" +#include "cmemory.h" UChar U_CALLCONV testInc(void *context); +void addCollTest(TestNode** root); + void addCollTest(TestNode** root) { addCollAPITest(root); @@ -67,8 +68,8 @@ void reportCResult( const UChar source[], const UChar target[], UCollationResult expectedResult ) { UChar *sResult, *sExpect; - sResult=(UChar*)malloc(sizeof(UChar) * 10); - sExpect=(UChar*)malloc(sizeof(UChar) * 10); + sResult=(UChar*)uprv_malloc(sizeof(UChar) * 10); + sExpect=(UChar*)uprv_malloc(sizeof(UChar) * 10); if (expectedResult < -1 || expectedResult > 1) { log_err("***** invalid call to reportCResult ****\n"); @@ -124,8 +125,8 @@ void reportCResult( const UChar source[], const UChar target[], log_verbose("SortKey2: %s\n", dumpSk(targetKey, sk)); } - free(sExpect); - free(sResult); + uprv_free(sExpect); + uprv_free(sResult); } UChar* appendCompareResult(UCollationResult result, UChar* target) @@ -153,7 +154,7 @@ UChar* appendCompareResult(UCollationResult result, UChar* target) UChar* CharsToUChars(const char* str) { /* Might be faster to just use uprv_strlen() as the preflight len - liu */ int32_t len = u_unescape(str, 0, 0); /* preflight */ - UChar *buf = (UChar*) malloc(sizeof(UChar) * len); + UChar *buf = (UChar*) uprv_malloc(sizeof(UChar) * len); u_unescape(str, buf, len); return buf; }