diff --git a/icu4c/source/test/cintltst/ccapitst.c b/icu4c/source/test/cintltst/ccapitst.c index daa73bd5aeb..3c55396bd6f 100644 --- a/icu4c/source/test/cintltst/ccapitst.c +++ b/icu4c/source/test/cintltst/ccapitst.c @@ -1980,8 +1980,8 @@ TestJ932(void) static void bug1() { #if !UCONFIG_NO_LEGACY_CONVERSION - static char char_in[CHUNK_SIZE+32]; - static char char_out[CHUNK_SIZE*2]; + char char_in[CHUNK_SIZE+32]; + char char_out[CHUNK_SIZE*2]; /* GB 18030 equivalent of U+10000 is 90308130 */ static const char test_seq[]={ (char)0x90u, 0x30, (char)0x81u, 0x30 }; @@ -2095,8 +2095,8 @@ static void bug2() static void bug3() { #if !UCONFIG_NO_LEGACY_CONVERSION - static char char_in[CHUNK_SIZE*4]; - static char target[5]; + char char_in[CHUNK_SIZE*4]; + char target[5]; UErrorCode err = U_ZERO_ERROR; int32_t size; diff --git a/icu4c/source/test/cintltst/cmsccoll.c b/icu4c/source/test/cintltst/cmsccoll.c index 8b554a97a7c..cedf34daf8a 100644 --- a/icu4c/source/test/cintltst/cmsccoll.c +++ b/icu4c/source/test/cintltst/cmsccoll.c @@ -3189,7 +3189,7 @@ static void TestSurrogates(void) { static void TestPrefix(void) { uint32_t i; - static struct { + static const struct { const char *rules; const char *data[50]; const uint32_t len; @@ -3215,7 +3215,7 @@ static void TestPrefix(void) { /* JIS X 4061 collation order implementation */ static void TestNewJapanese(void) { - static const char *test1[] = { + static const char * const test1[] = { "\\u30b7\\u30e3\\u30fc\\u30ec", "\\u30b7\\u30e3\\u30a4", "\\u30b7\\u30e4\\u30a3", @@ -4453,7 +4453,7 @@ static void TestBeforePinyin(void) { } static void TestBeforeTightening(void) { - struct { + static const struct { const char *rules; UErrorCode expectedStatus; } tests[] = { diff --git a/icu4c/source/test/cintltst/cnmdptst.c b/icu4c/source/test/cintltst/cnmdptst.c index 24982323ade..b7ec28d5d53 100644 --- a/icu4c/source/test/cintltst/cnmdptst.c +++ b/icu4c/source/test/cintltst/cnmdptst.c @@ -797,7 +797,7 @@ static void TestSecondaryGrouping(void) { static void TestCurrencyKeywords(void) { - static const char *currencies[] = { + static const char * const currencies[] = { "ADD", "ADP", "AED", "AFA", "AFN", "AIF", "ALK", "ALL", "ALV", "ALX", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "AOS", "ARA", "ARM", "ARP", "ARS", "ATS", "AUD", "AUP", "AWG", "AZM", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", diff --git a/icu4c/source/test/cintltst/creststn.c b/icu4c/source/test/cintltst/creststn.c index 5c668181f44..b6c664dd736 100644 --- a/icu4c/source/test/cintltst/creststn.c +++ b/icu4c/source/test/cintltst/creststn.c @@ -3,7 +3,7 @@ * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ -/******************************************************************************** +/******************************************************************************* * * File CRESTST.C * @@ -11,7 +11,7 @@ * Name Date Description * Madhu Katragadda 05/09/2000 Ported Tests for New ResourceBundle API * Madhu Katragadda 05/24/2000 Added new tests to test RES_BINARY for collationElements -********************************************************************************* +******************************************************************************** */ @@ -2500,7 +2500,7 @@ static void TestGetKeywordValues(void) { } } -static void TestGetFunctionalEquivalentOf(const char *path, const char *resName, const char *keyword, UBool truncate, const char *testCases[]) { +static void TestGetFunctionalEquivalentOf(const char *path, const char *resName, const char *keyword, UBool truncate, const char * const testCases[]) { int32_t i; for(i=0;testCases[i];i+=3) { UBool expectAvail = (testCases[i][0]=='t')?TRUE:FALSE; @@ -2533,7 +2533,7 @@ static void TestGetFunctionalEquivalentOf(const char *path, const char *resName, } static void TestGetFunctionalEquivalent(void) { - static const char *collCases[] = { + static const char * const collCases[] = { /* avail locale equiv */ "f", "de_US_CALIFORNIA", "de", "t", "zh_TW@collation=stroke", "zh@collation=stroke", diff --git a/icu4c/source/test/cintltst/cucdtst.c b/icu4c/source/test/cintltst/cucdtst.c index 0aa15affa92..4b13c90a19d 100644 --- a/icu4c/source/test/cintltst/cucdtst.c +++ b/icu4c/source/test/cintltst/cucdtst.c @@ -3,14 +3,14 @@ * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ -/******************************************************************************** +/******************************************************************************* * * File CUCDTST.C * * Modification History: * Name Description * Madhu Katragadda Ported for C API, added tests for string functions -********************************************************************************* +******************************************************************************** */ #include @@ -2084,7 +2084,7 @@ TestAdditionalProperties() { }; /* test data for u_hasBinaryProperty() */ - static int32_t + static const int32_t props[][3]={ /* code point, property, value */ { 0x0627, UCHAR_ALPHABETIC, TRUE }, { 0x1034a, UCHAR_ALPHABETIC, TRUE }, diff --git a/icu4c/source/test/cintltst/eurocreg.c b/icu4c/source/test/cintltst/eurocreg.c index a070374b802..8e29d4c6815 100644 --- a/icu4c/source/test/cintltst/eurocreg.c +++ b/icu4c/source/test/cintltst/eurocreg.c @@ -46,7 +46,7 @@ void addTestEuroRegression(TestNode** root) * I could not find such "updates" for codepages 1362 and 1363 - we might want to supply them later. */ -char convertersToCheck[][15] = { +static const char convertersToCheck[][15] = { "cp1250", "cp1251", "cp1252", diff --git a/icu4c/source/test/cintltst/idnatest.c b/icu4c/source/test/cintltst/idnatest.c index d20e2676a70..88f12308cd8 100644 --- a/icu4c/source/test/cintltst/idnatest.c +++ b/icu4c/source/test/cintltst/idnatest.c @@ -1,7 +1,7 @@ /* ******************************************************************************* * - * Copyright (C) 2003-2005, International Business Machines + * Copyright (C) 2003-2006, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -221,7 +221,7 @@ testAPI(const UChar* src, const UChar* expected, const char* testName, free(tSrc); } -static UChar unicodeIn[][41] ={ +static const UChar unicodeIn[][41] ={ { 0x0644, 0x064A, 0x0647, 0x0645, 0x0627, 0x0628, 0x062A, 0x0643, 0x0644, 0x0645, 0x0648, 0x0634, 0x0639, 0x0631, 0x0628, 0x064A, 0x061F, 0x0000 @@ -341,7 +341,7 @@ static UChar unicodeIn[][41] ={ } }; -static const char *asciiIn[] = { +static const char * const asciiIn[] = { "xn--egbpdaj6bu4bxfgehfvwxn", "xn--ihqwcrb4cv8a8dqg056pqjye", "xn--Proprostnemluvesky-uyb24dma41a", @@ -369,7 +369,7 @@ static const char *asciiIn[] = { }; -static const char *domainNames[] = { +static const char * const domainNames[] = { "slip129-37-118-146.nc.us.ibm.net", "saratoga.pe.utexas.edu", "dial-120-45.ots.utexas.edu", diff --git a/icu4c/source/test/cintltst/spreptst.c b/icu4c/source/test/cintltst/spreptst.c index 60401468224..1652984b520 100644 --- a/icu4c/source/test/cintltst/spreptst.c +++ b/icu4c/source/test/cintltst/spreptst.c @@ -95,7 +95,7 @@ Test_nfs4_mixed_prep_data(void){ } -static struct ConformanceTestCases +static const struct ConformanceTestCases { const char *comment; const char *in;