From 4763cb63a004f2b5f1ee06ae224136a520fb5111 Mon Sep 17 00:00:00 2001 From: George Rhoten Date: Sat, 25 Mar 2006 23:00:58 +0000 Subject: [PATCH] ICU-4707 Fix some compiler warnings X-SVN-Rev: 19440 --- icu4c/source/test/cintltst/cloctst.c | 40 ++++---------------------- icu4c/source/test/cintltst/nfsprep.c | 42 +--------------------------- 2 files changed, 7 insertions(+), 75 deletions(-) diff --git a/icu4c/source/test/cintltst/cloctst.c b/icu4c/source/test/cintltst/cloctst.c index 8abfaa0b478..10518548201 100644 --- a/icu4c/source/test/cintltst/cloctst.c +++ b/icu4c/source/test/cintltst/cloctst.c @@ -3,14 +3,14 @@ * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ -/******************************************************************************** +/******************************************************************************* * * File CLOCTST.C * * Modification History: * Name Description * Madhu Katragadda Ported for C API -********************************************************************************* +******************************************************************************** */ #include "cloctst.h" #include @@ -208,7 +208,6 @@ void addLocaleTest(TestNode** root) TESTCASE(TestUninstalledISO3Names); TESTCASE(TestSimpleDisplayNames); TESTCASE(TestVariantParsing); - /*TESTCASE(MoreVariants);*/ TESTCASE(TestKeywordVariants); TESTCASE(TestKeywordVariantParsing); TESTCASE(TestCanonicalization); @@ -1356,35 +1355,6 @@ static void TestObsoleteNames(void) } -static void MoreVariants(void) -{ - struct { - const char *localeID; - const char *keyword; - const char *expectedValue; - } testCases[] = { - { "de_DE_EURO@collation=PHONEBOOK", "collation", "PHONEBOOK" }, - { "es_ES.utf8@euro", "collation", ""}, - { "es_ES.hello.utf8@euro", "", "" }, - { " s pa c e d _ more spaces _ spaced variant ", "", ""} - }; - - UErrorCode status = U_ZERO_ERROR; - - int32_t i = 0; - int32_t resultLen = 0; - char buffer[256]; - - for(i = 0; i < sizeof(testCases)/sizeof(testCases[0]); i++) { - *buffer = 0; - resultLen = uloc_getName(testCases[i].localeID, buffer, 256, &status); - if(uprv_strcmp(testCases[i].expectedValue, buffer) != 0) { - log_err("Expected to extract \"%s\" from \"%s\" for keyword \"%s\". Got \"%s\" instead\n", - testCases[i].expectedValue, testCases[i].localeID, testCases[i].keyword, buffer); - } - } -} - static void TestKeywordVariants(void) { struct { @@ -2485,11 +2455,12 @@ static void TestCollation() { for (i=0; i0){ - pos--; - } - parseError->offset = pos; - parseError->line = 0 ; /* we are not using line numbers */ - - /* for pre-context */ - start = (pos <=U_PARSE_CONTEXT_LEN)? 0 : (pos - (U_PARSE_CONTEXT_LEN-1)); - stop = pos; - - u_memcpy(parseError->preContext,rules+start,stop-start); - /* null terminate the buffer */ - parseError->preContext[stop-start] = 0; - - /* for post-context */ - start = pos; - if(startpostContext,rules+start,stop-start); - /* null terminate the buffer */ - parseError->postContext[stop-start]= 0; - } - -} - - /* sorted array for binary search*/ static const char* special_prefixes[]={ "\x0041\x004e\x004f\x004e\x0059\x004d\x004f\x0055\x0053",