diff --git a/icu4c/source/common/ucase.h b/icu4c/source/common/ucase.h index e03b311870f8..af7387360880 100644 --- a/icu4c/source/common/ucase.h +++ b/icu4c/source/common/ucase.h @@ -357,7 +357,7 @@ enum { /* definitions for 16-bit case properties word ------------------------------ */ U_CFUNC const UTrie2 * U_EXPORT2 -ucase_getTrie(); +ucase_getTrie(void); /* 2-bit constants for types of cased characters */ #define UCASE_TYPE_MASK 3 diff --git a/icu4c/source/common/unicode/ulocbuilder.h b/icu4c/source/common/unicode/ulocbuilder.h index f2e98612f0a0..9b147292f49e 100644 --- a/icu4c/source/common/unicode/ulocbuilder.h +++ b/icu4c/source/common/unicode/ulocbuilder.h @@ -74,7 +74,7 @@ typedef struct ULocaleBuilder ULocaleBuilder; * @draft ICU 74 */ U_CAPI ULocaleBuilder* U_EXPORT2 -ulocbld_open(); +ulocbld_open(void); /** * Close the builder and destroy it's internal states. diff --git a/icu4c/source/samples/cal/cal.c b/icu4c/source/samples/cal/cal.c index 95fe48ff837b..2725d44aa807 100644 --- a/icu4c/source/samples/cal/cal.c +++ b/icu4c/source/samples/cal/cal.c @@ -201,7 +201,7 @@ main(int argc, /* Usage information */ static void -usage() +usage(void) { puts("Usage: icucal [OPTIONS] [[MONTH] YEAR]"); puts(""); @@ -219,7 +219,7 @@ usage() /* Version information */ static void -version() +version(void) { printf("icucal version %s (ICU version %s), created by Stephen F. Booth.\n", CAL_VERSION, U_ICU_VERSION); diff --git a/icu4c/source/samples/date/date.c b/icu4c/source/samples/date/date.c index a8abb369b765..065ec71bf848 100644 --- a/icu4c/source/samples/date/date.c +++ b/icu4c/source/samples/date/date.c @@ -186,7 +186,7 @@ main(int argc, /* Usage information */ static void -usage() +usage(void) { puts("Usage: icudate [OPTIONS]"); puts("Options:"); @@ -207,7 +207,7 @@ usage() /* Version information */ static void -version() +version(void) { UErrorCode status = U_ZERO_ERROR; const char *tzVer; diff --git a/icu4c/source/samples/layout/gnomeglue.h b/icu4c/source/samples/layout/gnomeglue.h index 13e434e1acea..29b29dac6fe9 100644 --- a/icu4c/source/samples/layout/gnomeglue.h +++ b/icu4c/source/samples/layout/gnomeglue.h @@ -25,7 +25,7 @@ typedef void fm_fontMap; U_CDECL_BEGIN -gs_guiSupport *gs_gnomeGuiSupportOpen(); +gs_guiSupport *gs_gnomeGuiSupportOpen(void); void gs_gnomeGuiSupportClose(gs_guiSupport *guiSupport); rs_surface *rs_gnomeRenderingSurfaceOpen(GtkWidget *theWidget); diff --git a/icu4c/source/test/cintltst/callcoll.c b/icu4c/source/test/cintltst/callcoll.c index ff9023db0379..855ce5d8b6a6 100644 --- a/icu4c/source/test/cintltst/callcoll.c +++ b/icu4c/source/test/cintltst/callcoll.c @@ -739,7 +739,7 @@ void genericRulesStarter(const char *rules, const char * const s[], uint32_t siz genericRulesStarterWithResult(rules, s, size, UCOL_LESS); } -static void TestTertiary() +static void TestTertiary(void) { int32_t len,i; UCollator *myCollation; @@ -764,7 +764,7 @@ static void TestTertiary() myCollation = 0; } -static void TestPrimary( ) +static void TestPrimary(void) { int32_t len,i; UCollator *myCollation; @@ -790,7 +790,7 @@ static void TestPrimary( ) myCollation = 0; } -static void TestSecondary() +static void TestSecondary(void) { int32_t i; int32_t len; @@ -815,7 +815,7 @@ static void TestSecondary() myCollation = 0; } -static void TestIdentical() +static void TestIdentical(void) { int32_t i; int32_t len; @@ -839,7 +839,7 @@ static void TestIdentical() myCollation = 0; } -static void TestExtra() +static void TestExtra(void) { int32_t i, j; int32_t len; @@ -1173,7 +1173,7 @@ static void TestSurrogates(void) * */ static void -TestInvalidRules(){ +TestInvalidRules(void){ #define MAX_ERROR_STATES 2 static const char* rulesArr[MAX_ERROR_STATES] = { @@ -1219,7 +1219,7 @@ TestInvalidRules(){ } static void -TestJitterbug1098(){ +TestJitterbug1098(void){ UChar rule[1000]; UCollator* c1 = NULL; UErrorCode status = U_ZERO_ERROR; diff --git a/icu4c/source/test/cintltst/capitst.c b/icu4c/source/test/cintltst/capitst.c index 5d76ea0548a2..4797096310b7 100644 --- a/icu4c/source/test/cintltst/capitst.c +++ b/icu4c/source/test/cintltst/capitst.c @@ -271,7 +271,7 @@ void TestGetDefaultRules(){ /* Collator Properties ucol_open, ucol_strcoll, getStrength/setStrength getDecomposition/setDecomposition, getDisplayName*/ -void TestProperty() +void TestProperty(void) { UCollator *col, *ruled; const UChar *rules; @@ -449,7 +449,7 @@ void TestProperty() } /* Test RuleBasedCollator and getRules*/ -void TestRuleBasedColl() +void TestRuleBasedColl(void) { UCollator *col1, *col2, *col3, *col4; UCollationElements *iter1, *iter2; @@ -562,7 +562,7 @@ void TestRuleBasedColl() ucol_close(col1); } -void TestCompare() +void TestCompare(void) { UErrorCode status = U_ZERO_ERROR; UCollator *col; @@ -612,7 +612,7 @@ void TestCompare() --------------------------------------------- tests decomposition setting */ -void TestDecomposition() { +void TestDecomposition(void) { UErrorCode status = U_ZERO_ERROR; UCollator *en_US, *el_GR, *vi_VN; en_US = ucol_open("en_US", &status); @@ -651,7 +651,7 @@ void TestDecomposition() { #define CLONETEST_COLLATOR_COUNT 4 -void TestSafeClone() { +void TestSafeClone(void) { UChar test1[6]; UChar test2[6]; static const UChar umlautUStr[] = {0x00DC, 0}; @@ -808,7 +808,7 @@ void TestSafeClone() { } } -void TestClone() { +void TestClone(void) { UChar test1[6]; UChar test2[6]; static const UChar umlautUStr[] = {0x00DC, 0}; @@ -926,7 +926,7 @@ void TestClone() { } } -void TestCloneBinary(){ +void TestCloneBinary(void){ UErrorCode err = U_ZERO_ERROR; UCollator * col = ucol_open("en_US", &err); UCollator * c; @@ -1046,7 +1046,7 @@ static void TestBengaliSortKey(void) TestOpenVsOpenRules ensures that collators from ucol_open and ucol_openRules will generate identical sort keys */ -void TestOpenVsOpenRules(){ +void TestOpenVsOpenRules(void){ /* create an array of all the locales */ int32_t numLocales = uloc_countAvailable(); @@ -1189,7 +1189,7 @@ void TestOpenVsOpenRules(){ ---------------------------------------------------------------------------- ctor -- Tests the getSortKey */ -void TestSortKey() +void TestSortKey(void) { uint8_t *sortk1 = NULL, *sortk2 = NULL, *sortk3 = NULL, *sortkEmpty = NULL; int32_t sortklen, osortklen; @@ -1334,7 +1334,7 @@ void TestSortKey() free(sortk2); } -void TestHashCode() +void TestHashCode(void) { uint8_t *sortk1, *sortk2, *sortk3; int32_t sortk1len, sortk2len, sortk3len; @@ -1388,7 +1388,7 @@ void TestHashCode() * Tests the UCollatorElements API. * */ -void TestElemIter() +void TestElemIter(void) { int32_t offset; int32_t order1, order2, order3; @@ -1518,7 +1518,7 @@ doAssert( (ucol_tertiaryOrder(order1) != ucol_tertiaryOrder(order3)), "The terti log_verbose("testing CollationElementIterator ends...\n"); } -void TestGetLocale() { +void TestGetLocale(void) { UErrorCode status = U_ZERO_ERROR; const char *rules = "&akey, (const char *)((struct teststruct *)string2)->key)); } -void TestBounds() { +void TestBounds(void) { UErrorCode status = U_ZERO_ERROR; UCollator *coll = ucol_open("sh", &status); @@ -1861,7 +1861,7 @@ void TestSortKeyBufferOverrun(void) { ucol_close(coll); } -static void TestAttribute() +static void TestAttribute(void) { UErrorCode error = U_ZERO_ERROR; UCollator *coll = ucol_open(NULL, &error); @@ -1964,7 +1964,7 @@ static void TestAttribute() ucol_close(coll); } -void TestGetTailoredSet() { +void TestGetTailoredSet(void) { struct { const char *rules; const char *tests[20]; diff --git a/icu4c/source/test/cintltst/cbiapts.c b/icu4c/source/test/cintltst/cbiapts.c index 7fc43289a944..147bdc968458 100644 --- a/icu4c/source/test/cintltst/cbiapts.c +++ b/icu4c/source/test/cintltst/cbiapts.c @@ -156,7 +156,7 @@ static void freeToUCharStrings(void **hook) { #if !UCONFIG_NO_FILE_IO -static void TestBreakIteratorCAPI() +static void TestBreakIteratorCAPI(void) { UErrorCode status = U_ZERO_ERROR; UBreakIterator *word, *sentence, *line, *character, *b, *bogus; @@ -633,7 +633,7 @@ static UBreakIterator * testOpenRules(char *rules) { * TestBreakIteratorRules - Verify that a break iterator can be created from * a set of source rules. */ -static void TestBreakIteratorRules() { +static void TestBreakIteratorRules(void) { /* Rules will keep together any run of letters not including 'a', OR * keep together 'abc', but only when followed by 'def', OTHERWISE * just return one char at a time. @@ -720,7 +720,7 @@ static void TestBreakIteratorRules() { ubrk_close(bi); } -static void TestBreakIteratorRuleError() { +static void TestBreakIteratorRuleError(void) { /* * TestBreakIteratorRuleError - Try to create a BI from rules with syntax errors, * check that the error is reported correctly. @@ -754,7 +754,7 @@ static void TestBreakIteratorRuleError() { /* * TestsBreakIteratorStatusVals() Test the ubrk_getRuleStatusVec() function */ -static void TestBreakIteratorStatusVec() { +static void TestBreakIteratorStatusVec(void) { #define RULE_STRING_LENGTH 200 UChar rules[RULE_STRING_LENGTH]; diff --git a/icu4c/source/test/cintltst/ccaltst.c b/icu4c/source/test/cintltst/ccaltst.c index 0744ba14abfa..33d5c39bf2dd 100644 --- a/icu4c/source/test/cintltst/ccaltst.c +++ b/icu4c/source/test/cintltst/ccaltst.c @@ -112,7 +112,7 @@ static const UCalGetTypeTest ucalGetTypeTests[] = { { NULL, 0, NULL } /* terminator */ }; -static void TestCalendar() +static void TestCalendar(void) { UCalendar *caldef = 0, *caldef2 = 0, *calfr = 0, *calit = 0, *calfrclone = 0; UEnumeration* uenum = NULL; @@ -527,7 +527,7 @@ static void TestCalendar() /*------------------------------------------------------*/ /*Testing the getMillis, setMillis, setDate and setDateTime functions extensively*/ -static void TestGetSetDateAPI() +static void TestGetSetDateAPI(void) { UCalendar *caldef = 0, *caldef2 = 0, *caldef3 = 0; UChar tzID[4]; @@ -795,7 +795,7 @@ static void TestGetSetDateAPI() /** * Confirm the functioning of the calendar field related functions. */ -static void TestFieldGetSet() +static void TestFieldGetSet(void) { UCalendar *cal = 0; UChar tzID[4]; @@ -955,7 +955,7 @@ static const TransitionItem transitionItems[] = { /** * Execute adding and rolling in Calendar extensively, */ -static void TestAddRollExtensive() +static void TestAddRollExtensive(void) { const TransitionItem * itemPtr; UCalendar *cal = 0; @@ -1149,7 +1149,7 @@ static void TestAddRollExtensive() /*------------------------------------------------------ */ /*Testing the Limits for various Fields of Calendar*/ -static void TestGetLimits() +static void TestGetLimits(void) { UCalendar *cal = 0; int32_t min, max, gr_min, le_max, ac_min, ac_max, val; @@ -1245,7 +1245,7 @@ static void TestGetLimits() * Test that the days of the week progress properly when add is called repeatedly * for increments of 24 days. */ -static void TestDOWProgression() +static void TestDOWProgression(void) { int32_t initialDOW, DOW, newDOW, expectedDOW; UCalendar *cal = 0; @@ -1311,7 +1311,7 @@ static void TestDOWProgression() /** * Confirm that the offset between local time and GMT behaves as expected. */ -static void TestGMTvsLocal() +static void TestGMTvsLocal(void) { log_verbose("\nTesting the offset between the GMT and local time\n"); testZones(1999, 1, 1, 12, 0, 0); @@ -1551,7 +1551,7 @@ static void verify2(const char* msg, UCalendar* c, UDateFormat* dat, int32_t yea } -void TestGregorianChange() { +void TestGregorianChange(void) { static const UChar utc[] = { 0x45, 0x74, 0x63, 0x2f, 0x47, 0x4d, 0x54, 0 }; /* "Etc/GMT" */ const int32_t dayMillis = 86400 * INT64_C(1000); /* 1 day = 86400 seconds */ UCalendar *cal; @@ -1615,7 +1615,7 @@ void TestGregorianChange() { ucal_close(cal); } -static void TestGetKeywordValuesForLocale() { +static void TestGetKeywordValuesForLocale(void) { #define PREFERRED_SIZE 26 #define MAX_NUMBER_OF_KEYWORDS 5 const char *PREFERRED[PREFERRED_SIZE][MAX_NUMBER_OF_KEYWORDS+1] = { @@ -1816,7 +1816,7 @@ static const UChar logDateFormat[] = { 0x0045,0x0045,0x0045,0x0020,0x004D,0x004D 0x0073,0x0073,0x002E,0x0053,0x0053,0x0053,0 }; /* "EEE MMM dd yyyy G HH:mm:ss.SSS" */ enum { kFormattedDateMax = 2*UPRV_LENGTHOF(logDateFormat) }; -static void TestWeekend() { +static void TestWeekend(void) { const TestWeekendDatesList * testDatesPtr = testDates; const TestDaysOfWeekList * testDaysPtr = testDays; int32_t count, subCount; @@ -1956,7 +1956,7 @@ static const TFDItem tfdItems[] = { { NULL, NULL, 0.0, 0.0, false, 0, 0, 0, 0, 0, 0 } /* terminator */ }; -void TestFieldDifference() { +void TestFieldDifference(void) { const TFDItem * tfdItemPtr; for (tfdItemPtr = tfdItems; tfdItemPtr->timezone != NULL; tfdItemPtr++) { UErrorCode status = U_ZERO_ERROR; @@ -2031,7 +2031,7 @@ void TestFieldDifference() { } } -void TestAmbiguousWallTime() { +void TestAmbiguousWallTime(void) { UErrorCode status = U_ZERO_ERROR; UChar tzID[32]; UCalendar* ucal; @@ -2162,7 +2162,7 @@ static const EraTestItem eraTestItems[] = { static const UChar zoneGMT[] = { 0x47,0x4D,0x54,0 }; -void TestAddRollEra0AndEraBounds() { +void TestAddRollEra0AndEraBounds(void) { const EraTestItem * eraTestItemPtr; for (eraTestItemPtr = eraTestItems; eraTestItemPtr->locale != NULL; eraTestItemPtr++) { UErrorCode status = U_ZERO_ERROR; @@ -2385,7 +2385,7 @@ static const TZTransitionItem tzTransitionItems[] = { { NULL, NULL, 0, 0, 0, false, false } /* terminator */ }; -void TestGetTZTransition() { +void TestGetTZTransition(void) { UErrorCode status = U_ZERO_ERROR; UCalendar * ucal = ucal_open(zoneGMT, -1, "en", UCAL_GREGORIAN, &status); if ( U_SUCCESS(status) ) { @@ -2455,7 +2455,7 @@ static const UChar sBogusWithVariantCharacters[] = /* Bogus with Variant charact {0x48,0xE8,0x2113,0x2113,0xF4,0x20,0x57,0xF4,0x159,0x2113,0x3B4,0x00}; #endif -void TestGetWindowsTimeZoneID() { +void TestGetWindowsTimeZoneID(void) { UErrorCode status; UChar winID[64]; int32_t len; @@ -2489,7 +2489,7 @@ void TestGetWindowsTimeZoneID() { } } -void TestGetTimeZoneIDByWindowsID() { +void TestGetTimeZoneIDByWindowsID(void) { UErrorCode status; UChar tzID[64]; int32_t len; @@ -2543,7 +2543,7 @@ void TestGetTimeZoneIDByWindowsID() { // The following currently assumes that Reiwa is the last known/valid era. // Filed ICU-20551 to generalize this when we have more time... -void TestJpnCalAddSetNextEra() { +void TestJpnCalAddSetNextEra(void) { UErrorCode status = U_ZERO_ERROR; UCalendar *jCal = ucal_open(NULL, 0, "ja_JP@calendar=japanese", UCAL_DEFAULT, &status); if ( U_FAILURE(status) ) { @@ -2588,7 +2588,7 @@ void TestJpnCalAddSetNextEra() { } } -void TestUcalOpenBufferRead() { +void TestUcalOpenBufferRead(void) { // ICU-21004: The issue shows under valgrind or as an Address Sanitizer failure. UErrorCode status = U_ZERO_ERROR; // string length: 157 + 1 + 100 = 258 @@ -2602,7 +2602,7 @@ void TestUcalOpenBufferRead() { * Testing ucal_getTimeZoneOffsetFromLocal */ void -TestGetTimeZoneOffsetFromLocal() { +TestGetTimeZoneOffsetFromLocal(void) { static const UChar utc[] = u"Etc/GMT"; const int32_t HOUR = 60*60*1000; @@ -2814,7 +2814,7 @@ TestGetTimeZoneOffsetFromLocal() { } void -TestFWWithISO8601() { +TestFWWithISO8601(void) { /* UCAL_SUNDAY is 1, UCAL_MONDAY is 2, ..., UCAL_SATURDAY is 7 */ const char* LOCALES[] = { "", @@ -2843,7 +2843,7 @@ TestFWWithISO8601() { } void -TestGetIanaTimeZoneID() { +TestGetIanaTimeZoneID(void) { const UChar* UNKNOWN = u"Etc/Unknown"; typedef struct { const UChar* id; diff --git a/icu4c/source/test/cintltst/ccapitst.c b/icu4c/source/test/cintltst/ccapitst.c index 48ad77c92f2b..c8bbea539176 100644 --- a/icu4c/source/test/cintltst/ccapitst.c +++ b/icu4c/source/test/cintltst/ccapitst.c @@ -241,7 +241,7 @@ static void ListNames(void) { } -static void TestConvert() +static void TestConvert(void) { #if !UCONFIG_NO_LEGACY_CONVERSION char myptr[4]; @@ -1153,7 +1153,7 @@ static void TestFlushCache(void) { * aliases map back to itself. Check some hard-coded UTF-8 and * ISO_2022 aliases to make sure they work. */ -static void TestAlias() { +static void TestAlias(void) { int32_t i, ncnv; UErrorCode status = U_ZERO_ERROR; @@ -1341,7 +1341,7 @@ static void TestDuplicateAlias(void) { /* Test safe clone callback */ -static uint32_t TSCC_nextSerial() +static uint32_t TSCC_nextSerial(void) { static uint32_t n = 1; @@ -1492,7 +1492,7 @@ static void TSCC_print_log(TSCCContext *q, const char *name) } } -static void TestConvertSafeCloneCallback() +static void TestConvertSafeCloneCallback(void) { UErrorCode err = U_ZERO_ERROR; TSCCContext from1, to1; @@ -1671,7 +1671,7 @@ containsAnyOtherByte(uint8_t *p, int32_t length, uint8_t b) { return false; } -static void TestConvertSafeClone() +static void TestConvertSafeClone(void) { /* one 'regular' & all the 'private stateful' converters */ static const char *const names[] = { @@ -1909,7 +1909,7 @@ static void TestConvertSafeClone() } -static void TestConvertClone() +static void TestConvertClone(void) { /* one 'regular' & all the 'private stateful' converters */ static const char *const names[] = { @@ -2040,7 +2040,7 @@ static void TestConvertClone() } } -static void TestCCSID() { +static void TestCCSID(void) { #if !UCONFIG_NO_LEGACY_CONVERSION UConverter *cnv; UErrorCode errorCode; @@ -2104,7 +2104,7 @@ TestJ932(void) * * Bug report and test code provided by Edward J. Batutis. */ -static void bug1() +static void bug1(void) { #if !UCONFIG_NO_LEGACY_CONVERSION char char_in[CHUNK_SIZE+32]; @@ -2150,7 +2150,7 @@ static void bug1() } /* bug2: pre-flighting loop bug: simple overflow causes bug */ -static void bug2() +static void bug2(void) { /* US-ASCII "1234567890" */ static const char source[]={ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39 }; @@ -2224,7 +2224,7 @@ static void bug2() * bug3: when the characters expand going from source to target codepage * you get bug3 in addition to bug2 */ -static void bug3() +static void bug3(void) { #if !UCONFIG_NO_LEGACY_CONVERSION && !UCONFIG_ONLY_HTML_CONVERSION char char_in[CHUNK_SIZE*4]; @@ -2394,7 +2394,7 @@ convertExMultiStreaming(UConverter *srcCnv, UConverter *targetCnv, 7, testName, expectCode); } -static void TestConvertEx() { +static void TestConvertEx(void) { #if !UCONFIG_NO_LEGACY_CONVERSION static const uint8_t utf8[]={ @@ -2788,7 +2788,7 @@ static void testFromBadUTF8(UConverter *utf8Cnv, UConverter *cnv, const char *co } /* Test illegal UTF-8 input. */ -static void TestConvertExFromUTF8() { +static void TestConvertExFromUTF8(void) { static const char *const converterNames[]={ #if !UCONFIG_NO_LEGACY_CONVERSION "windows-1252", @@ -2831,7 +2831,7 @@ static void TestConvertExFromUTF8() { ucnv_close(utf8Cnv); } -static void TestConvertExFromUTF8_C5F0() { +static void TestConvertExFromUTF8_C5F0(void) { static const char *const converterNames[]={ #if !UCONFIG_NO_LEGACY_CONVERSION "windows-1251", @@ -2917,7 +2917,7 @@ static void TestConvertExFromUTF8_C5F0() { } static void -TestConvertAlgorithmic() { +TestConvertAlgorithmic(void) { #if !UCONFIG_NO_LEGACY_CONVERSION static const uint8_t utf8[]={ @@ -3340,7 +3340,7 @@ testSwap(const char *name, UBool swap) { } static void -TestEBCDICSwapLFNL() { +TestEBCDICSwapLFNL(void) { static const struct { const char *name; UBool swap; @@ -3365,7 +3365,7 @@ TestEBCDICSwapLFNL() { } #endif -static void TestFromUCountPending(){ +static void TestFromUCountPending(void){ #if !UCONFIG_NO_LEGACY_CONVERSION UErrorCode status = U_ZERO_ERROR; /* const UChar expectedUnicode[] = { 0x20ac, 0x0005, 0x0006, 0x000b, 0xdbc4, 0xde34, 0xd84d, 0xdc56, 0xfffd}; */ @@ -3469,7 +3469,7 @@ static void TestFromUCountPending(){ } static void -TestToUCountPending(){ +TestToUCountPending(void){ #if !UCONFIG_NO_LEGACY_CONVERSION UErrorCode status = U_ZERO_ERROR; static const struct { @@ -3667,7 +3667,7 @@ compareNames(const char **names) { } static void -TestCompareNames() { +TestCompareNames(void) { static const char *equalUTF8[]={ "=", "UTF-8", "utf_8", "u*T@f08", "Utf 8", NULL }; static const char *equalIBM[]={ "=", "ibm-37", "IBM037", "i-B-m 00037", "ibm-0037", "IBM00037", NULL }; static const char *lessMac[]={ "<", "macos-0_1-10.2", "macos-1-10.0.2", "macos-1-10.2", NULL }; @@ -3680,7 +3680,7 @@ TestCompareNames() { } static void -TestSubstString() { +TestSubstString(void) { static const UChar surrogate[1]={ 0xd900 }; char buffer[16]; @@ -3771,7 +3771,7 @@ TestSubstString() { } static void -InvalidArguments() { +InvalidArguments(void) { UConverter *cnv; UErrorCode errorCode; char charBuffer[2] = {1, 1}; @@ -3824,7 +3824,7 @@ InvalidArguments() { ucnv_close(cnv); } -static void TestGetName() { +static void TestGetName(void) { static const char *const names[] = { "Unicode", "UTF-16", "UnicodeBigUnmarked", "UTF-16BE", @@ -3848,7 +3848,7 @@ static void TestGetName() { } } -static void TestUTFBOM() { +static void TestUTFBOM(void) { static const UChar a16[] = { 0x61 }; static const char *const names[] = { "UTF-16", diff --git a/icu4c/source/test/cintltst/ccurrtst.c b/icu4c/source/test/cintltst/ccurrtst.c index f2111f4e2280..f54af9cf9881 100644 --- a/icu4c/source/test/cintltst/ccurrtst.c +++ b/icu4c/source/test/cintltst/ccurrtst.c @@ -37,7 +37,7 @@ void addCurrencyCollTest(TestNode** root) } -void currTest() +void currTest(void) { /* All the currency symbols, in UCA order*/ static const UChar currency[][2] = diff --git a/icu4c/source/test/cintltst/cdateintervalformattest.c b/icu4c/source/test/cintltst/cdateintervalformattest.c index 4c535830aa3c..298dcae4247f 100644 --- a/icu4c/source/test/cintltst/cdateintervalformattest.c +++ b/icu4c/source/test/cintltst/cdateintervalformattest.c @@ -94,7 +94,7 @@ enum { kFormatBufLen = 128 }; -static void TestDateIntervalFormat() +static void TestDateIntervalFormat(void) { const DateIntervalFormatTestItem * testItemPtr; UErrorCode status = U_ZERO_ERROR; @@ -317,7 +317,7 @@ static const LocaleAndSkeletonItem locSkelItems[] = { enum { kSizeUBuf = 96, kSizeBBuf = 192 }; -static void TestFPos_SkelWithSeconds() +static void TestFPos_SkelWithSeconds(void) { const LocaleAndSkeletonItem * locSkelItemPtr; for (locSkelItemPtr = locSkelItems; locSkelItemPtr->locale != NULL; locSkelItemPtr++) { @@ -359,7 +359,7 @@ static void TestFPos_SkelWithSeconds() } } -static void TestFormatToResult() { +static void TestFormatToResult(void) { UErrorCode ec = U_ZERO_ERROR; UDateIntervalFormat* fmt = udtitvfmt_open("de", u"dMMMMyHHmm", -1, zoneGMT, -1, &ec); UFormattedDateInterval* fdi = udtitvfmt_openResult(&ec); @@ -420,7 +420,7 @@ static void TestFormatToResult() { udtitvfmt_closeResult(fdi); } -static void TestFormatCalendarToResult() { +static void TestFormatCalendarToResult(void) { UErrorCode ec = U_ZERO_ERROR; UCalendar* ucal1 = ucal_open(zoneGMT, -1, "de", UCAL_DEFAULT, &ec); ucal_setMillis(ucal1, Date201009270800, &ec); diff --git a/icu4c/source/test/cintltst/cdattst.c b/icu4c/source/test/cintltst/cdattst.c index c390f1e4ad6c..c1880f0975a4 100644 --- a/icu4c/source/test/cintltst/cdattst.c +++ b/icu4c/source/test/cintltst/cdattst.c @@ -78,7 +78,7 @@ void addDateForTest(TestNode** root) TESTCASE(TestHourCycle); } /* Testing the DateFormat API */ -static void TestDateFormat() +static void TestDateFormat(void) { UDateFormat *def, *fr, *it, *de, *def1, *fr_pat; UDateFormat *any; @@ -438,7 +438,7 @@ enum { kDateOrTimeOutMax = 96, kDateAndTimeOutMax = 192 }; static const UDate minutesTolerance = 2 * 60.0 * 1000.0; static const UDate daysTolerance = 2 * 24.0 * 60.0 * 60.0 * 1000.0; -static void TestRelativeDateFormat() +static void TestRelativeDateFormat(void) { UDate today = 0.0; const UDateFormatStyle * stylePtr; @@ -588,7 +588,7 @@ static void TestRelativeDateFormat() } /*Testing udat_getSymbols() and udat_setSymbols() and udat_countSymbols()*/ -static void TestSymbols() +static void TestSymbols(void) { UDateFormat *def, *fr, *zhChiCal, *esMX; UErrorCode status = U_ZERO_ERROR; @@ -862,7 +862,7 @@ free(pattern); /** * Test DateFormat(Calendar) API */ -static void TestDateFormatCalendar() { +static void TestDateFormatCalendar(void) { UDateFormat *date=0, *time=0, *full=0; UCalendar *cal=0; UChar buf[256]; @@ -989,7 +989,7 @@ static void TestDateFormatCalendar() { /** * Test parsing two digit year against "YY" vs. "YYYY" patterns */ -static void TestCalendarDateParse() { +static void TestCalendarDateParse(void) { int32_t result; UErrorCode ec = U_ZERO_ERROR; @@ -1069,7 +1069,7 @@ static void TestCalendarDateParse() { /*INTERNAL FUNCTIONS USED*/ -static int getCurrentYear() { +static int getCurrentYear(void) { static int currentYear = 0; if (currentYear == 0) { UErrorCode status = U_ZERO_ERROR; @@ -1302,7 +1302,7 @@ static UBool _aux2ExtremeDates(UDateFormat* fmt, UDate small, UDate large, * 0.75*10^30, etc. A logarithmic search will find 10^15, then 10^7.5 * and 10^22.5, etc. */ -static void TestExtremeDates() { +static void TestExtremeDates(void) { UDateFormat *fmt; UErrorCode ec; UChar buf[256]; diff --git a/icu4c/source/test/cintltst/cdetst.c b/icu4c/source/test/cintltst/cdetst.c index 697633c96069..778fa297e66f 100644 --- a/icu4c/source/test/cintltst/cdetst.c +++ b/icu4c/source/test/cintltst/cdetst.c @@ -99,7 +99,7 @@ void addGermanCollTest(TestNode** root) } -static void TestTertiary( ) +static void TestTertiary(void) { int32_t i; @@ -119,7 +119,7 @@ static void TestTertiary( ) ucol_close(myCollation); } -static void TestPrimary() +static void TestPrimary(void) { int32_t i; diff --git a/icu4c/source/test/cintltst/cdtdptst.c b/icu4c/source/test/cintltst/cdtdptst.c index 5bc0c152a9c5..174c469558a5 100644 --- a/icu4c/source/test/cintltst/cdtdptst.c +++ b/icu4c/source/test/cintltst/cdtdptst.c @@ -50,7 +50,7 @@ void addDtFrDepTest(TestNode** root) /** * Test the parsing of 2-digit years. */ -void TestTwoDigitYearDSTParse() +void TestTwoDigitYearDSTParse(void) { UDateFormat *fullFmt, *fmt; UErrorCode status = U_ZERO_ERROR; @@ -114,7 +114,7 @@ void TestTwoDigitYearDSTParse() * correctly. In some instances, this means not being parsed at all, and * returning an appropriate error. */ -void TestPartialParse994() +void TestPartialParse994(void) { int32_t pos; UDateFormat *f; @@ -197,7 +197,7 @@ void tryPat994(UDateFormat* format, const char* pattern, const char* s, UDate ex * Verify the behavior of patterns in which digits for different fields run together * without intervening separators. */ -void TestRunTogetherPattern985() +void TestRunTogetherPattern985(void) { int32_t pos; UChar *pattern=NULL, *now=NULL, *then=NULL; @@ -231,7 +231,7 @@ void TestRunTogetherPattern985() * Verify the handling of Czech June and July, which have the unique attribute that * one is a proper prefix substring of the other. */ -void TestCzechMonths459() +void TestCzechMonths459(void) { int32_t lneed, pos; UChar *pattern=NULL, *tzID=NULL; @@ -305,7 +305,7 @@ void TestCzechMonths459() /** * Test the handling of single quotes in patterns. */ -void TestQuotePattern161() +void TestQuotePattern161(void) { UDateFormat *format = NULL; UCalendar *cal = NULL; diff --git a/icu4c/source/test/cintltst/cdtrgtst.c b/icu4c/source/test/cintltst/cdtrgtst.c index 5ee21e294abb..54bdc7228fd1 100644 --- a/icu4c/source/test/cintltst/cdtrgtst.c +++ b/icu4c/source/test/cintltst/cdtrgtst.c @@ -52,7 +52,7 @@ void addDateForRgrTest(TestNode** root) /** * @bug 4029195 */ -void Test4029195() +void Test4029195(void) { int32_t resultlength, resultlengthneeded; UChar *fmdt, *todayS, *rt; @@ -128,7 +128,7 @@ void Test4029195() * @bug 4056591 * Verify the function of the [s|g]et2DigitYearStart() API. */ -void Test4056591() +void Test4056591(void) { int i; UCalendar *cal; @@ -210,7 +210,7 @@ void Test4056591() * SimpleDateFormat does not properly parse date strings without delimiters * @bug 4059917 */ -void Test4059917() +void Test4059917(void) { UDateFormat* def; UChar *myDate; @@ -311,7 +311,7 @@ void aux917( UDateFormat *fmt, UChar* str) /** * @bug 4060212 */ -void Test4060212() +void Test4060212(void) { int32_t pos; UCalendar *cal; @@ -359,7 +359,7 @@ void Test4060212() /** * @bug 4061287 */ -void Test4061287() +void Test4061287(void) { UBool ok; int32_t pos; @@ -411,7 +411,7 @@ void Test4061287() /** * @bug 4073003 */ -void Test4073003() +void Test4073003(void) { int32_t pos,i; UDate d,dd; @@ -480,7 +480,7 @@ void Test4073003() /** * @bug 4162071 **/ -void Test4162071() +void Test4162071(void) { int32_t pos; UDate x; diff --git a/icu4c/source/test/cintltst/cestst.c b/icu4c/source/test/cintltst/cestst.c index 228fe811ba67..38c432c2dd88 100644 --- a/icu4c/source/test/cintltst/cestst.c +++ b/icu4c/source/test/cintltst/cestst.c @@ -84,7 +84,7 @@ void addSpanishCollTest(TestNode** root) } -static void TestTertiary( ) +static void TestTertiary(void) { int32_t i; @@ -103,7 +103,7 @@ static void TestTertiary( ) ucol_close(myCollation); } -static void TestPrimary() +static void TestPrimary(void) { int32_t i; diff --git a/icu4c/source/test/cintltst/cfintst.c b/icu4c/source/test/cintltst/cfintst.c index d81d90c6396b..8b8b35c62a1d 100644 --- a/icu4c/source/test/cintltst/cfintst.c +++ b/icu4c/source/test/cintltst/cfintst.c @@ -75,7 +75,7 @@ void addFinnishCollTest(TestNode** root) } -static void TestTertiary( ) +static void TestTertiary(void) { int32_t i; @@ -93,7 +93,7 @@ static void TestTertiary( ) ucol_close(myCollation); } -static void TestPrimary() +static void TestPrimary(void) { int32_t i; diff --git a/icu4c/source/test/cintltst/cfrtst.c b/icu4c/source/test/cintltst/cfrtst.c index de356466e11b..a4e358620dbe 100644 --- a/icu4c/source/test/cintltst/cfrtst.c +++ b/icu4c/source/test/cintltst/cfrtst.c @@ -143,7 +143,7 @@ void addFrenchCollTest(TestNode** root) } -static void TestTertiary( ) +static void TestTertiary(void) { int32_t i; @@ -168,7 +168,7 @@ static void TestTertiary( ) ucol_close(myCollation); } -static void TestSecondary() +static void TestSecondary(void) { int32_t i,j, testAcuteSize; UCollationResult expected=UCOL_EQUAL; @@ -199,7 +199,7 @@ static void TestSecondary() ucol_close(myCollation); } -static void TestExtra() +static void TestExtra(void) { int32_t i, j; UErrorCode status = U_ZERO_ERROR; @@ -220,7 +220,7 @@ static void TestExtra() ucol_close(myCollation); } -static void TestGetSortKey() { +static void TestGetSortKey(void) { /* This is meant to test a buffer reallocation crash while using French secondary sorting with a large buffer. The fact that Japanese characters are used is irrelevant. */ diff --git a/icu4c/source/test/cintltst/cg7coll.c b/icu4c/source/test/cintltst/cg7coll.c index e857afbdd0a0..1bc827ede7fe 100644 --- a/icu4c/source/test/cintltst/cg7coll.c +++ b/icu4c/source/test/cintltst/cg7coll.c @@ -135,7 +135,7 @@ void addRuleBasedCollTest(TestNode** root) } -static void TestG7Locales() +static void TestG7Locales(void) { UCollator *myCollation; UErrorCode status = U_ZERO_ERROR; @@ -195,7 +195,7 @@ static void TestG7Locales() } } -static void TestDemo1() +static void TestDemo1(void) { UCollator *myCollation; int32_t j, n; @@ -226,7 +226,7 @@ static void TestDemo1() ucol_close(myCollation); } -static void TestDemo2() +static void TestDemo2(void) { UCollator *myCollation; int32_t j, n; @@ -255,7 +255,7 @@ static void TestDemo2() ucol_close(myCollation); } -static void TestDemo3() +static void TestDemo3(void) { UCollator *myCollation; int32_t j, n; @@ -285,7 +285,7 @@ static void TestDemo3() ucol_close(myCollation); } -static void TestDemo4() +static void TestDemo4(void) { UCollator *myCollation; int32_t j, n; diff --git a/icu4c/source/test/cintltst/chashtst.c b/icu4c/source/test/cintltst/chashtst.c index 2ea34939b28d..a4b774d93a1c 100644 --- a/icu4c/source/test/cintltst/chashtst.c +++ b/icu4c/source/test/cintltst/chashtst.c @@ -155,7 +155,7 @@ static void TestBasic(void) { uhash_close(hash); } -static void TestAllowZero() { +static void TestAllowZero(void) { UErrorCode status = U_ZERO_ERROR; UHashtable *hash = uhash_open(hashChars, isEqualChars, NULL, &status); if (U_FAILURE(status)) { diff --git a/icu4c/source/test/cintltst/cintltst.c b/icu4c/source/test/cintltst/cintltst.c index 7afdb60af5fb..4c6d5fc6dec7 100644 --- a/icu4c/source/test/cintltst/cintltst.c +++ b/icu4c/source/test/cintltst/cintltst.c @@ -295,7 +295,7 @@ static void ctest_appendToDataDirectory(const char *toAppend) */ /* returns the path to icu/source/data */ -const char * ctest_dataSrcDir() +const char * ctest_dataSrcDir(void) { static const char *dataSrcDir = NULL; @@ -362,7 +362,7 @@ const char * ctest_dataSrcDir() } /* returns the path to icu/source/data/out */ -const char *ctest_dataOutDir() +const char *ctest_dataOutDir(void) { static const char *dataOutDir = NULL; @@ -439,7 +439,7 @@ const char *ctest_dataOutDir() * picked up via a static (build time) reference, but the * tests dynamically load some data. */ -void ctest_setICU_DATA() { +void ctest_setICU_DATA(void) { /* No location for the data dir was identifiable. * Add other fallbacks for the test data location here if the need arises @@ -454,7 +454,7 @@ void ctest_setICU_DATA() { * The ICU data directory must be preserved across these operations. * Here is a helper function to assist with that. */ -static char *safeGetICUDataDirectory() { +static char *safeGetICUDataDirectory(void) { const char *dataDir = u_getDataDirectory(); /* Returned string vanashes with u_cleanup */ char *retStr = NULL; if (dataDir != NULL) { @@ -464,7 +464,7 @@ static char *safeGetICUDataDirectory() { return retStr; } -UBool ctest_resetICU() { +UBool ctest_resetICU(void) { UErrorCode status = U_ZERO_ERROR; char *dataDir = safeGetICUDataDirectory(); @@ -675,7 +675,7 @@ void *ctst_malloc(size_t size) { } #ifdef CTST_LEAK_CHECK -static void ctst_freeAll() { +static void ctst_freeAll(void) { int i; if(ctst_free == false) { /* only free up to the allocated mark */ for(i=0; idisplayLocale != NULL; itemPtr++) { @@ -1252,7 +1252,7 @@ static void TestDisplayNameBrackets() * TestIllegalArgumentWhenNoDataWithNoSubstitute */ -static void TestIllegalArgumentWhenNoDataWithNoSubstitute() +static void TestIllegalArgumentWhenNoDataWithNoSubstitute(void) { #if !UCONFIG_NO_FORMATTING UErrorCode status = U_ZERO_ERROR; @@ -1320,7 +1320,7 @@ static void TestIllegalArgumentWhenNoDataWithNoSubstitute() #if !UCONFIG_NO_FILE_IO && !UCONFIG_NO_LEGACY_CONVERSION /* test for uloc_getISOLanguages, uloc_getISOCountries */ -static void TestISOFunctions() +static void TestISOFunctions(void) { const char* const* str=uloc_getISOLanguages(); const char* const* str1=uloc_getISOCountries(); @@ -1452,7 +1452,7 @@ static void TestISOFunctions() } #endif -static void setUpDataTable() +static void setUpDataTable(void) { int32_t i,j; dataTable = (UChar***)(calloc(sizeof(UChar**),LOCALE_INFO_SIZE)); @@ -1465,7 +1465,7 @@ static void setUpDataTable() } } -static void cleanUpDataTable() +static void cleanUpDataTable(void) { int32_t i,j; if(dataTable != NULL) { @@ -1483,7 +1483,7 @@ static void cleanUpDataTable() /** * @bug 4011756 4011380 */ -static void TestISO3Fallback() +static void TestISO3Fallback(void) { const char* test="xx_YY"; @@ -1505,7 +1505,7 @@ static void TestISO3Fallback() /** * @bug 4118587 */ -static void TestSimpleDisplayNames() +static void TestSimpleDisplayNames(void) { /* This test is different from TestDisplayNames because TestDisplayNames checks @@ -1550,7 +1550,7 @@ static void TestSimpleDisplayNames() /** * @bug 4118595 */ -static void TestUninstalledISO3Names() +static void TestUninstalledISO3Names(void) { /* This test checks to make sure getISO3Language and getISO3Country work right even for locales that are not installed (and some installed ones). */ @@ -1583,7 +1583,7 @@ static void TestUninstalledISO3Names() } -static void TestVariantParsing() +static void TestVariantParsing(void) { static const char* en_US_custom="en_US_De Anza_Cupertino_California_United States_Earth"; static const char* dispName="English (United States, DE ANZA_CUPERTINO_CALIFORNIA_UNITED STATES_EARTH)"; @@ -3250,7 +3250,7 @@ static UBool isLocaleAvailable(UResourceBundle* resIndex, const char* loc){ return true; } -static void TestCalendar() { +static void TestCalendar(void) { #if !UCONFIG_NO_FORMATTING int i; UErrorCode status = U_ZERO_ERROR; @@ -3286,7 +3286,7 @@ static void TestCalendar() { #endif } -static void TestDateFormat() { +static void TestDateFormat(void) { #if !UCONFIG_NO_FORMATTING int i; UErrorCode status = U_ZERO_ERROR; @@ -3329,7 +3329,7 @@ static void TestDateFormat() { #endif } -static void TestCollation() { +static void TestCollation(void) { #if !UCONFIG_NO_COLLATION int i; UErrorCode status = U_ZERO_ERROR; @@ -3401,7 +3401,7 @@ static const char* ULayoutTypeToString(ULayoutType type) return "Unknown enum value for ULayoutType!"; } -static void TestOrientation() +static void TestOrientation(void) { static const OrientationStruct toTest [] = { { "ar", ULOC_LAYOUT_RTL, ULOC_LAYOUT_TTB }, @@ -3454,7 +3454,7 @@ static void TestOrientation() } } -static void TestULocale() { +static void TestULocale(void) { int i; UErrorCode status = U_ZERO_ERROR; UResourceBundle *resIndex = ures_open(NULL,"res_index", &status); @@ -3494,7 +3494,7 @@ static void TestULocale() { } -static void TestUResourceBundle() { +static void TestUResourceBundle(void) { const char* us1; const char* us2; @@ -3542,7 +3542,7 @@ static void TestUResourceBundle() { ures_close(resIndex); } -static void TestDisplayName() { +static void TestDisplayName(void) { UChar oldCountry[256] = {'\0'}; UChar newCountry[256] = {'\0'}; @@ -3584,7 +3584,7 @@ static void TestDisplayName() { } } -static void TestGetLocaleForLCID() { +static void TestGetLocaleForLCID(void) { int32_t i, length, lengthPre; const char* testLocale = 0; UErrorCode status = U_ZERO_ERROR; @@ -6030,7 +6030,7 @@ static int32_t getBufferSize(const errorData* data, int32_t actualSize) } } -static void TestLikelySubtags() +static void TestLikelySubtags(void) { char buffer[ULOC_FULLNAME_CAPACITY + ULOC_KEYWORD_AND_VALUES_CAPACITY + 1]; int32_t i = 0; @@ -6929,7 +6929,7 @@ static void TestUnicodeDefines(void) { TEST_UNICODE_DEFINE(ULOC_KEYWORD_ITEM_SEPARATOR, ULOC_KEYWORD_ITEM_SEPARATOR_UNICODE); } -static void TestIsRightToLeft() { +static void TestIsRightToLeft(void) { // API test only. More test cases in intltest/LocaleTest. if(uloc_isRightToLeft("root") || !uloc_isRightToLeft("EN-HEBR")) { log_err("uloc_isRightToLeft() failed"); @@ -6955,7 +6955,7 @@ static const BadLocaleItem badLocaleItems[] = { enum { kUBufDispNameMax = 128, kBBufDispNameMax = 256 }; -static void TestBadLocaleIDs() { +static void TestBadLocaleIDs(void) { const BadLocaleItem* itemPtr; for (itemPtr = badLocaleItems; itemPtr->badLocaleID != NULL; itemPtr++) { UChar ubufExpect[kUBufDispNameMax], ubufGet[kUBufDispNameMax]; @@ -6979,7 +6979,7 @@ static void TestBadLocaleIDs() { // Test case for ICU-20370. // The issue shows as an Address Sanitizer failure. -static void TestBug20370() { +static void TestBug20370(void) { const char *localeID = "x-privatebutreallylongtagfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar"; uint32_t lcid = uloc_getLCID(localeID); if (lcid != 0) { @@ -6989,7 +6989,7 @@ static void TestBug20370() { // Test case for ICU-20149 // Handle the duplicate U extension attribute -static void TestBug20149() { +static void TestBug20149(void) { const char *localeID = "zh-u-foo-foo-co-pinyin"; char locale[256]; UErrorCode status = U_ZERO_ERROR; @@ -7144,7 +7144,7 @@ static const UldnLocAndOpts uldnLocAndOpts[] = { enum { kUNameBuf = 128, kBNameBuf = 256 }; -static void TestUldnNameVariants() { +static void TestUldnNameVariants(void) { const UldnLocAndOpts * uloPtr; for (uloPtr = uldnLocAndOpts; uloPtr->displayLocale != NULL; uloPtr++) { UErrorCode status = U_ZERO_ERROR; @@ -7228,7 +7228,7 @@ static void TestUldnNameVariants() { } #endif -static void TestUsingDefaultWarning() { +static void TestUsingDefaultWarning(void) { UChar buff[256]; char errorOutputBuff[256]; UErrorCode status = U_ZERO_ERROR; @@ -7301,7 +7301,7 @@ static void TestUsingDefaultWarning() { // Test case for ICU-20575 // This test checks if the environment variable LANG is set, // and if so ensures that both C and C.UTF-8 cause ICU's default locale to be en_US_POSIX. -static void TestCDefaultLocale() { +static void TestCDefaultLocale(void) { const char *defaultLocale = uloc_getDefault(); char *env_var = getenv("LANG"); if (env_var == NULL) { @@ -7318,7 +7318,7 @@ static void TestCDefaultLocale() { } // Test case for ICU-21449 -static void TestBug21449InfiniteLoop() { +static void TestBug21449InfiniteLoop(void) { UErrorCode status = U_ZERO_ERROR; const char* invalidLocaleId = RES_PATH_SEPARATOR_S; diff --git a/icu4c/source/test/cintltst/cnormtst.c b/icu4c/source/test/cintltst/cnormtst.c index 24946e2eb628..6f933ac3d28d 100644 --- a/icu4c/source/test/cintltst/cnormtst.c +++ b/icu4c/source/test/cintltst/cnormtst.c @@ -212,23 +212,23 @@ static void TestNormCases(UNormalizationMode mode, } } -void TestDecomp() { +void TestDecomp(void) { TestNormCases(UNORM_NFD, canonTests, UPRV_LENGTHOF(canonTests)); } -void TestCompatDecomp() { +void TestCompatDecomp(void) { TestNormCases(UNORM_NFKD, compatTests, UPRV_LENGTHOF(compatTests)); } -void TestCanonDecompCompose() { +void TestCanonDecompCompose(void) { TestNormCases(UNORM_NFC, canonTests, UPRV_LENGTHOF(canonTests)); } -void TestCompatDecompCompose() { +void TestCompatDecompCompose(void) { TestNormCases(UNORM_NFKC, compatTests, UPRV_LENGTHOF(compatTests)); } -void TestFCD() { +void TestFCD(void) { TestNormCases(UNORM_FCD, fcdTests, UPRV_LENGTHOF(fcdTests)); } @@ -285,7 +285,7 @@ static void TestNull_check(UChar *src, int32_t srcLen, log_verbose("unorm_normalize(%s) with 0x0000: OK\n", name); } -void TestNull() +void TestNull(void) { UChar source_comp[] = { 0x0061, 0x0000, 0x0044, 0x0307 }; @@ -322,7 +322,7 @@ void TestNull() } -static void TestQuickCheckResultNO() +static void TestQuickCheckResultNO(void) { const UChar CPNFD[] = {0x00C5, 0x0407, 0x1E00, 0x1F57, 0x220C, 0x30AE, 0xAC00, 0xD7A3, 0xFB36, 0xFB4E}; @@ -369,7 +369,7 @@ static void TestQuickCheckResultNO() } -static void TestQuickCheckResultYES() +static void TestQuickCheckResultYES(void) { const UChar CPNFD[] = {0x00C6, 0x017F, 0x0F74, 0x1000, 0x1E9A, 0x2261, 0x3075, 0x4000, 0x5000, 0xF000}; @@ -441,7 +441,7 @@ static void TestQuickCheckResultYES() } } -static void TestQuickCheckResultMAYBE() +static void TestQuickCheckResultMAYBE(void) { const UChar CPNFC[] = {0x0306, 0x0654, 0x0BBE, 0x102E, 0x1161, 0x116A, 0x1173, 0x1175, 0x3099, 0x309A}; @@ -472,7 +472,7 @@ static void TestQuickCheckResultMAYBE() } } -static void TestQuickCheckStringResult() +static void TestQuickCheckStringResult(void) { int count; UChar *d = NULL; @@ -528,7 +528,7 @@ static void TestQuickCheckStringResult() } } -void TestQuickCheck() +void TestQuickCheck(void) { TestQuickCheckResultNO(); TestQuickCheckResultYES(); @@ -605,7 +605,7 @@ static void TestIsNormalized(void) { } } -void TestCheckFCD() +void TestCheckFCD(void) { UErrorCode status = U_ZERO_ERROR; static const UChar FAST_[] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, @@ -711,7 +711,7 @@ void TestCheckFCD() } static void -TestAPI() { +TestAPI(void) { static const UChar in[]={ 0x68, 0xe4 }; UChar out[20]={ 0xffff, 0xffff, 0xffff, 0xffff }; UErrorCode errorCode; @@ -767,7 +767,7 @@ enum { }; static void -TestNormCoverage() { +TestNormCoverage(void) { UChar input[1000], expect[1000], output[1000]; UErrorCode errorCode; int32_t i, length, inLength, expectLength, hangulPrefixLength, preflightLength; @@ -1148,7 +1148,7 @@ _testIter(const UChar *src, int32_t srcLength, } static void -TestNextPrevious() { +TestNextPrevious(void) { static const UChar src[]={ /* input string */ 0xa0, 0xe4, 0x63, 0x302, 0x327, 0xac00, 0x3133 @@ -1363,7 +1363,7 @@ TestFCNFKCClosure(void) { } static void -TestQuickCheckPerCP() { +TestQuickCheckPerCP(void) { UErrorCode errorCode; UChar32 c, lead, trail; UChar s[U16_MAX_LENGTH], nfd[16]; @@ -1487,7 +1487,7 @@ TestComposition(void) { } static void -TestGetDecomposition() { +TestGetDecomposition(void) { UChar decomp[32]; int32_t length; @@ -1530,7 +1530,7 @@ TestGetDecomposition() { } static void -TestGetRawDecomposition() { +TestGetRawDecomposition(void) { UChar decomp[32]; int32_t length; @@ -1595,7 +1595,7 @@ TestGetRawDecomposition() { } static void -TestAppendRestoreMiddle() { +TestAppendRestoreMiddle(void) { UChar a[20]={ 0x61, 0x62, 0x63, 0x41, 0x327, 0 }; /* last chars are 'A' and 'cedilla' NFC */ static const UChar b[]={ 0x30A, 0x64, 0x65, 0x66, 0 }; /* first char is 'ring above' NFC */ /* NFC: C5 is 'A with ring above' */ @@ -1632,7 +1632,7 @@ TestAppendRestoreMiddle() { } static void -TestGetEasyToUseInstance() { +TestGetEasyToUseInstance(void) { static const UChar in[]={ 0xA0, /* -> 0020 */ 0xC7, 0x301 /* = 1E08 = 0043 0327 0301 */ @@ -1716,7 +1716,7 @@ TestGetEasyToUseInstance() { } static void -TestAPICoverage() { +TestAPICoverage(void) { UErrorCode errorCode = U_ZERO_ERROR; const UNormalizer2 *n2 = unorm2_getNFDInstance(&errorCode); if (U_FAILURE(errorCode)) { diff --git a/icu4c/source/test/cintltst/cnumtst.c b/icu4c/source/test/cintltst/cnumtst.c index 17bfbde3c40f..63bb8c2dc7e4 100644 --- a/icu4c/source/test/cintltst/cnumtst.c +++ b/icu4c/source/test/cintltst/cnumtst.c @@ -131,7 +131,7 @@ void addNumForTest(TestNode** root) /* test Parse int 64 */ -static void TestInt64Parse() +static void TestInt64Parse(void) { UErrorCode st = U_ZERO_ERROR; @@ -175,7 +175,7 @@ static void TestInt64Parse() } /* test Number Format API */ -static void TestNumberFormat() +static void TestNumberFormat(void) { UChar *result=NULL; UChar temp1[512]; @@ -1097,7 +1097,7 @@ static const ParseCurrencyItem parseCurrencyItems[] = { { NULL, NULL, NULL, NULL, 0, 0, 0.0, 0, 0, 0.0, NULL } }; -static void TestParseCurrency() +static void TestParseCurrency(void) { const ParseCurrencyItem * itemPtr; for (itemPtr = parseCurrencyItems; itemPtr->locale != NULL; ++itemPtr) { @@ -1208,7 +1208,7 @@ static const SpelloutParseTest spelloutParseTests[] = { { NULL, NULL, NULL, 0, 0, 0, 0 } /* terminator */ }; -static void TestSpelloutNumberParse() +static void TestSpelloutNumberParse(void) { const SpelloutParseTest * testPtr; for (testPtr = spelloutParseTests; testPtr->testname != NULL; ++testPtr) { @@ -1231,7 +1231,7 @@ static void TestSpelloutNumberParse() } } -static void TestSignificantDigits() +static void TestSignificantDigits(void) { UChar temp[128]; int32_t resultlengthneeded; @@ -1273,7 +1273,7 @@ static void TestSignificantDigits() unum_close(fmt); } -static void TestSigDigRounding() +static void TestSigDigRounding(void) { UErrorCode status = U_ZERO_ERROR; UChar expected[128]; @@ -1310,7 +1310,7 @@ static void TestSigDigRounding() unum_close(fmt); } -static void TestNumberFormatPadding() +static void TestNumberFormatPadding(void) { UChar *result=NULL; UChar temp1[512]; @@ -1433,7 +1433,7 @@ withinErr(double a, double b, double err) { return uprv_fabs(a - b) < uprv_fabs(a * err); } -static void TestInt64Format() { +static void TestInt64Format(void) { UChar temp1[512]; UChar result[512]; UNumberFormat *fmt; @@ -1706,7 +1706,7 @@ static void test_fmt(UNumberFormat* fmt, UBool isDecimal) { } } -static void TestNonExistentCurrency() { +static void TestNonExistentCurrency(void) { UNumberFormat *format; UErrorCode status = U_ZERO_ERROR; UChar currencySymbol[8]; @@ -1730,7 +1730,7 @@ static void TestNonExistentCurrency() { unum_close(format); } -static void TestRBNFFormat() { +static void TestRBNFFormat(void) { UErrorCode status; UParseError perr; UChar pat[1024]; @@ -1840,7 +1840,7 @@ static void TestRBNFFormat() { } } -static void TestRBNFRounding() { +static void TestRBNFRounding(void) { UChar fmtbuf[FORMAT_BUF_CAPACITY]; UChar expectedBuf[FORMAT_BUF_CAPACITY]; int32_t len; @@ -3035,7 +3035,7 @@ static void TestVariousStylesAndAttributes(void) { static const UChar currpat[] = { 0xA4,0x23,0x2C,0x23,0x23,0x30,0x2E,0x30,0x30,0}; static const UChar parsetxt[] = { 0x78,0x30,0x79,0x24,0 }; /* x0y$ */ -static void TestParseCurrPatternWithDecStyle() { +static void TestParseCurrPatternWithDecStyle(void) { UErrorCode status = U_ZERO_ERROR; UNumberFormat *unumfmt = unum_open(UNUM_DECIMAL, NULL, 0, "en_US", NULL, &status); if (U_FAILURE(status)) { @@ -3162,7 +3162,7 @@ static void TestFormatForFields(void) { } } -static void Test12052_NullPointer() { +static void Test12052_NullPointer(void) { UErrorCode status = U_ZERO_ERROR; static const UChar input[] = u"199a"; UChar currency[200] = {0}; diff --git a/icu4c/source/test/cintltst/cpluralrulestest.c b/icu4c/source/test/cintltst/cpluralrulestest.c index e2b4e3629784..6ce6cd1c42a8 100644 --- a/icu4c/source/test/cintltst/cpluralrulestest.c +++ b/icu4c/source/test/cintltst/cpluralrulestest.c @@ -76,7 +76,7 @@ enum { kKeywordBufLen = 32 }; -static void TestPluralRules() +static void TestPluralRules(void) { const PluralRulesTestItem * testItemPtr; log_verbose("\nTesting uplrules_open() and uplrules_select() with various parameters\n"); @@ -133,7 +133,7 @@ static void TestPluralRules() } } -static void TestOrdinalRules() { +static void TestOrdinalRules(void) { U_STRING_DECL(two, "two", 3); UChar keyword[8]; int32_t length; @@ -195,7 +195,7 @@ static const KeywordsForLang getKeywordsItems[] = { { NULL, { NULL } } }; -static void TestGetKeywords() { +static void TestGetKeywords(void) { /* * We don't know the order in which the enumeration will return keywords, * so we have an array with known keywords in a fixed order and then @@ -260,7 +260,7 @@ static void TestGetKeywords() { } } -static void TestFormatted() { +static void TestFormatted(void) { UErrorCode ec = U_ZERO_ERROR; UNumberFormatter* unumf = NULL; UFormattedNumber* uresult = NULL; @@ -300,7 +300,7 @@ static void TestFormatted() { unumf_closeResult(uresult); } -static void TestSelectRange() { +static void TestSelectRange(void) { UErrorCode ec = U_ZERO_ERROR; UNumberRangeFormatter* unumrf = NULL; UFormattedNumberRange* uresult = NULL; diff --git a/icu4c/source/test/cintltst/crelativedateformattest.c b/icu4c/source/test/cintltst/crelativedateformattest.c index 55643b92ff66..bb75f1814789 100644 --- a/icu4c/source/test/cintltst/crelativedateformattest.c +++ b/icu4c/source/test/cintltst/crelativedateformattest.c @@ -348,7 +348,7 @@ static const RelDateTimeFormatTestItem fmtTestItems[] = { enum { kUBufMax = 64, kBBufMax = 256 }; -static void TestRelDateFmt() +static void TestRelDateFmt(void) { const RelDateTimeFormatTestItem *itemPtr; log_verbose("\nTesting ureldatefmt_open(), ureldatefmt_format(), ureldatefmt_formatNumeric() with various parameters\n"); @@ -429,7 +429,7 @@ static void TestRelDateFmt() } } -static void TestNumericField() +static void TestNumericField(void) { const RelDateTimeFormatTestItem *itemPtr; log_verbose("\nTesting ureldatefmt_open(), ureldatefmt_formatForFields(), ureldatefmt_formatNumericForFields() with various parameters\n"); @@ -591,7 +591,7 @@ static const CombineDateTimeTestItem combTestItems[] = { { NULL, (UDateRelativeDateTimeFormatterStyle)0, (UDisplayContext)0, NULL, NULL, NULL } /* terminator */ }; -static void TestCombineDateTime() +static void TestCombineDateTime(void) { const CombineDateTimeTestItem *itemPtr; log_verbose("\nTesting ureldatefmt_combineDateAndTime() with various parameters\n"); @@ -645,7 +645,7 @@ static void TestCombineDateTime() } } -static void TestFields() { +static void TestFields(void) { UErrorCode ec = U_ZERO_ERROR; URelativeDateTimeFormatter* fmt = ureldatefmt_open( "en-us", diff --git a/icu4c/source/test/cintltst/crestst.c b/icu4c/source/test/cintltst/crestst.c index 2ccd2fc98eb6..7d0476462e66 100644 --- a/icu4c/source/test/cintltst/crestst.c +++ b/icu4c/source/test/cintltst/crestst.c @@ -150,7 +150,7 @@ void TestAliasConflict(void) { } -void TestResourceBundles() +void TestResourceBundles(void) { // The test expectation only works if the default locale is not one of the // locale bundle in the testdata which have those info. Therefore, we skip @@ -180,7 +180,7 @@ void TestResourceBundles() log_verbose("Passed:= %d Failed= %d \n", pass, fail); } -void TestConstruction1() +void TestConstruction1(void) { UResourceBundle *test1 = 0, *test2 = 0; const UChar *result1, *result2; @@ -431,12 +431,12 @@ UBool testTag(const char* frag, return (UBool)(passNum == pass); } -void record_pass() +void record_pass(void) { ++pass; } -void record_fail() +void record_fail(void) { ++fail; } @@ -446,7 +446,7 @@ void record_fail() * are set correctly */ -static void TestFallback() +static void TestFallback(void) { UErrorCode status = U_ZERO_ERROR; UResourceBundle *fr_FR = NULL; diff --git a/icu4c/source/test/cintltst/creststn.c b/icu4c/source/test/cintltst/creststn.c index cb251ea3cdac..4438bd88e238 100644 --- a/icu4c/source/test/cintltst/creststn.c +++ b/icu4c/source/test/cintltst/creststn.c @@ -51,7 +51,7 @@ static int32_t fail; */ static uint32_t -randul() +randul(void) { uint32_t l=0; int32_t i; @@ -72,7 +72,7 @@ randul() * Return a random double x where 0.0 <= x < 1.0. */ static double -randd() +randd(void) { return ((double)randul()) / UINT32_MAX; } @@ -403,7 +403,7 @@ static void TestAliasConflict(void) { } } -static void TestDecodedBundle(){ +static void TestDecodedBundle(void){ UErrorCode error = U_ZERO_ERROR; @@ -479,7 +479,7 @@ static void TestDecodedBundle(){ ures_close(resB); } -static void TestNewTypes() { +static void TestNewTypes(void) { UResourceBundle* theBundle = NULL; char action[256]; const char* testdatapath; @@ -781,7 +781,7 @@ static void TestNewTypes() { } -static void TestEmptyTypes() { +static void TestEmptyTypes(void) { UResourceBundle* theBundle = NULL; char action[256]; const char* testdatapath; @@ -926,7 +926,7 @@ static void TestEmptyTypes() { ures_close(theBundle); } -static void TestEmptyBundle(){ +static void TestEmptyBundle(void){ UErrorCode status = U_ZERO_ERROR; const char* testdatapath=NULL; UResourceBundle *resb=0, *dResB=0; @@ -950,7 +950,7 @@ static void TestEmptyBundle(){ ures_close(resb); } -static void TestBinaryCollationData(){ +static void TestBinaryCollationData(void){ #if !UCONFIG_NO_COLLATION UErrorCode status=U_ZERO_ERROR; const char* locale="te"; @@ -1008,7 +1008,7 @@ static void TestBinaryCollationData(){ #endif } -static void TestAPI() { +static void TestAPI(void) { UErrorCode status=U_ZERO_ERROR; int32_t len=0; const char* key=NULL; @@ -1170,7 +1170,7 @@ static void TestAPI() { free(utestdatapath); } -static void TestErrorConditions(){ +static void TestErrorConditions(void){ UErrorCode status=U_ZERO_ERROR; const char *key=NULL; const UChar *value=NULL; @@ -1405,7 +1405,7 @@ static void TestErrorConditions(){ } -static void TestGetVersion(){ +static void TestGetVersion(void){ UVersionInfo minVersionArray = {0x01, 0x00, 0x00, 0x00}; UVersionInfo maxVersionArray = {0x50, 0xff, 0xcf, 0xcf}; UVersionInfo versionArray; @@ -1443,7 +1443,7 @@ static void TestGetVersion(){ } -static void TestGetVersionColl(){ +static void TestGetVersionColl(void){ #if !UCONFIG_NO_COLLATION UVersionInfo minVersionArray = {0x00, 0x00, 0x00, 0x00}; UVersionInfo maxVersionArray = {0x50, 0x80, 0xcf, 0xcf}; @@ -1507,7 +1507,7 @@ static void TestGetVersionColl(){ #endif /* !UCONFIG_NO_COLLATION */ } -static void TestResourceBundles() +static void TestResourceBundles(void) { // The test expectation only works if the default locale is not one of the // locale bundle in the testdata which have those info. Therefore, we skip @@ -1539,7 +1539,7 @@ static void TestResourceBundles() } -static void TestConstruction1() +static void TestConstruction1(void) { // The test expectation only works if the default locale is not one of the // locale bundle in the testdata which have those info. Therefore, we skip @@ -2054,17 +2054,17 @@ static UBool testTag(const char* frag, return (UBool)(failNum == fail); } -static void record_pass() +static void record_pass(void) { ++pass; } -static void record_fail() +static void record_fail(void) { ++fail; } -static void TestPreventFallback() { +static void TestPreventFallback(void) { UResourceBundle* theBundle = NULL; const char* testdatapath; UErrorCode status = U_ZERO_ERROR; @@ -2124,7 +2124,7 @@ static void TestPreventFallback() { * are set correctly */ -static void TestFallback() +static void TestFallback(void) { UErrorCode status = U_ZERO_ERROR; UResourceBundle *fr_FR = NULL; @@ -3039,7 +3039,7 @@ tres_getString(const UResourceBundle *resB, * UTF-16 ures_getStringXYZ() that are called internally. */ static void -TestGetUTF8String() { +TestGetUTF8String(void) { UResourceBundle *res; const char *testdatapath; char buffer8[16]; diff --git a/icu4c/source/test/cintltst/cstrtest.c b/icu4c/source/test/cintltst/cstrtest.c index d8006fd1c8e7..d6c762f9fd7f 100644 --- a/icu4c/source/test/cintltst/cstrtest.c +++ b/icu4c/source/test/cintltst/cstrtest.c @@ -170,7 +170,7 @@ static void TestAPI(void) /* test invariant-character handling */ static void -TestInvariant() { +TestInvariant(void) { /* all invariant graphic chars and some control codes (not \n!) */ const char invariantChars[]= "\t\r \"%&'()*+,-./" @@ -306,7 +306,7 @@ static int32_t getSign(int32_t n) { } static void -TestCompareInvEbcdicAsAscii() { +TestCompareInvEbcdicAsAscii(void) { static const char *const invStrings[][2]={ /* invariant-character strings in ascending ASCII order */ /* EBCDIC native */ @@ -359,7 +359,7 @@ static const UChar *asciiInvChars = u"0123456789 \"%&'()*+,-./:;<=>?_"; static void -TestLocaleAtSign() { +TestLocaleAtSign(void) { static const char *invLocale = "de-Latn_DE@PHONEBOOK"; for (int32_t i = 0;; ++i) { char ic = invLocale[i]; @@ -374,7 +374,7 @@ TestLocaleAtSign() { // The at sign is not an invariant character. static void -TestNoInvariantAtSign() { +TestNoInvariantAtSign(void) { for (int32_t i = 0;; ++i) { char ic = nativeInvChars[i]; UBool actual = uprv_isAtSign(ic); @@ -386,7 +386,7 @@ TestNoInvariantAtSign() { } static void -TestInvCharToAscii() { +TestInvCharToAscii(void) { for (int32_t i = 0;; ++i) { char ic = nativeInvChars[i]; uint8_t ac = (uint8_t)asciiInvChars[i]; diff --git a/icu4c/source/test/cintltst/cturtst.c b/icu4c/source/test/cintltst/cturtst.c index 31eebc49481f..b3b4ba322167 100644 --- a/icu4c/source/test/cintltst/cturtst.c +++ b/icu4c/source/test/cintltst/cturtst.c @@ -90,7 +90,7 @@ void addTurkishCollTest(TestNode** root) } -static void TestTertiary( ) +static void TestTertiary(void) { int32_t i; @@ -110,7 +110,7 @@ static void TestTertiary( ) ucol_close(myCollation); } -static void TestPrimary() +static void TestPrimary(void) { int32_t i; diff --git a/icu4c/source/test/cintltst/cucdapi.c b/icu4c/source/test/cintltst/cucdapi.c index 4f9986017664..9b7c6ebf3c71 100644 --- a/icu4c/source/test/cintltst/cucdapi.c +++ b/icu4c/source/test/cintltst/cucdapi.c @@ -46,7 +46,7 @@ static void assertEqualScripts(const char *msg, } } -void TestUScriptCodeAPI(){ +void TestUScriptCodeAPI(void){ int i =0; int numErrors =0; { @@ -518,7 +518,7 @@ void TestUScriptCodeAPI(){ } } -void TestHasScript() { +void TestHasScript(void) { if(!( !uscript_hasScript(0x063f, USCRIPT_COMMON) && uscript_hasScript(0x063f, USCRIPT_ARABIC) && /* main Script value */ @@ -578,7 +578,7 @@ static UBool scriptsContain(UScriptCode scripts[], int32_t length, UScriptCode s return contain; } -void TestGetScriptExtensions() { +void TestGetScriptExtensions(void) { UScriptCode scripts[20]; int32_t length; UErrorCode errorCode; @@ -666,7 +666,7 @@ void TestGetScriptExtensions() { } } -void TestScriptMetadataAPI() { +void TestScriptMetadataAPI(void) { /* API & code coverage. More testing in intltest/ucdtest.cpp. */ UErrorCode errorCode=U_ZERO_ERROR; UChar sample[8]; @@ -729,7 +729,7 @@ void TestScriptMetadataAPI() { } } -void TestBinaryValues() { +void TestBinaryValues(void) { /* * Unicode 5.1 explicitly defines binary property value aliases. * Verify that they are all recognized. diff --git a/icu4c/source/test/cintltst/cucdtst.c b/icu4c/source/test/cintltst/cucdtst.c index e50c6924c727..1173caab20e5 100644 --- a/icu4c/source/test/cintltst/cucdtst.c +++ b/icu4c/source/test/cintltst/cucdtst.c @@ -208,7 +208,7 @@ void addUnicodeTest(TestNode** root) /*==================================================== */ /* test u_toupper() and u_tolower() */ /*==================================================== */ -static void TestUpperLower() +static void TestUpperLower(void) { const UChar upper[] = {0x41, 0x42, 0x00b2, 0x01c4, 0x01c6, 0x01c9, 0x01c8, 0x01c9, 0x000c, 0x0000}; const UChar lower[] = {0x61, 0x62, 0x00b2, 0x01c6, 0x01c6, 0x01c9, 0x01c9, 0x01c9, 0x000c, 0x0000}; @@ -440,7 +440,7 @@ compareUSets(const USet *a, const USet *b, } /* test isLetter(u_isapha()) and isDigit(u_isdigit()) */ -static void TestLetterNumber() +static void TestLetterNumber(void) { UChar i = 0x0000; @@ -542,7 +542,7 @@ static void testSampleCharProps(UBool propFn(UChar32), const char *propName, } /* Tests for isDefined(u_isdefined)(, isBaseForm(u_isbase()), isSpaceChar(u_isspace()), isWhiteSpace(), u_CharDigitValue() */ -static void TestMisc() +static void TestMisc(void) { static const UChar32 sampleSpaces[] = {0x0020, 0x00a0, 0x2000, 0x2001, 0x2005}; static const UChar32 sampleNonSpaces[] = {0x61, 0x62, 0x63, 0x64, 0x74}; @@ -822,7 +822,7 @@ static const struct { }; static void -TestPOSIX() { +TestPOSIX(void) { uint32_t mask; int32_t cl, i; UBool expect; @@ -841,7 +841,7 @@ TestPOSIX() { } /* Tests for isControl(u_iscntrl()) and isPrintable(u_isprint()) */ -static void TestControlPrint() +static void TestControlPrint(void) { const UChar32 sampleControl[] = {0x1b, 0x97, 0x82, 0x2028, 0x2029, 0x200c, 0x202b}; const UChar32 sampleNonControl[] = {0x61, 0x0031, 0x00e2}; @@ -889,7 +889,7 @@ static void TestControlPrint() } /* u_isJavaIDStart, u_isJavaIDPart, u_isIDStart(), u_isIDPart(), u_isIDIgnorable()*/ -static void TestIdentifier() +static void TestIdentifier(void) { const UChar32 sampleJavaIDStart[] = {0x0071, 0x00e4, 0x005f}; const UChar32 sampleNonJavaIDStart[] = {0x0020, 0x2030, 0x0082}; @@ -1313,7 +1313,7 @@ enumDefaultsRange(const void *context, UChar32 start, UChar32 limit, UCharCatego } /* tests for several properties */ -static void TestUnicodeData() +static void TestUnicodeData(void) { UVersionInfo expectVersionArray; UVersionInfo versionArray; @@ -1401,7 +1401,7 @@ static void TestUnicodeData() u_enumCharTypes(enumDefaultsRange, NULL); } -static void TestCodeUnit(){ +static void TestCodeUnit(void){ const UChar codeunit[]={0x0000,0xe065,0x20ac,0xd7ff,0xd800,0xd841,0xd905,0xdbff,0xdc00,0xdc02,0xddee,0xdfff,0}; int32_t i; @@ -1448,7 +1448,7 @@ static void TestCodeUnit(){ } } -static void TestCodePoint(){ +static void TestCodePoint(void){ const UChar32 codePoint[]={ /*surrogate, notvalid(codepoint), not a UnicodeChar, not Error */ 0xd800, @@ -1586,7 +1586,7 @@ static void TestCodePoint(){ } } -static void TestCharLength() +static void TestCharLength(void) { const int32_t codepoint[]={ 1, 0x0061, @@ -1770,7 +1770,7 @@ u_charToUChar(char c) { } static void -TestCharNames() { +TestCharNames(void) { static char name[80]; UErrorCode errorCode=U_ZERO_ERROR; struct enumExtCharNamesContext extContext; @@ -2010,7 +2010,7 @@ TestCharNames() { } static void -TestUCharFromNameUnderflow() { +TestUCharFromNameUnderflow(void) { // Ticket #10889: Underflow crash when there is no dash. const char *name=""; UErrorCode errorCode=U_ZERO_ERROR; @@ -2074,7 +2074,7 @@ TestUCharFromNameUnderflow() { /* test u_isMirrored() and u_charMirror() ----------------------------------- */ static void -TestMirroring() { +TestMirroring(void) { USet *set; UErrorCode errorCode; @@ -2186,7 +2186,7 @@ CheckScriptRuns(UScriptRun *scriptRun, int32_t *runStarts, const RunTestData *te } static void -TestUScriptRunAPI() +TestUScriptRunAPI(void) { static const RunTestData testData1[] = { {"\\u0020\\u0946\\u0939\\u093F\\u0928\\u094D\\u0926\\u0940\\u0020", USCRIPT_DEVANAGARI}, @@ -2350,7 +2350,7 @@ TestUScriptRunAPI() /* test additional, non-core properties */ static void -TestAdditionalProperties() { +TestAdditionalProperties(void) { /* test data for u_charAge() */ static const struct { UChar32 c; @@ -3210,7 +3210,7 @@ TestPropertyValues(void) { /* various tests for consistency of UCD data and API behavior */ static void -TestConsistency() { +TestConsistency(void) { char buffer[300]; USet *set1, *set2, *set3, *set4; UErrorCode errorCode; @@ -3540,7 +3540,7 @@ caseFoldingLineFn(void *context, } static void -TestCaseFolding() { +TestCaseFolding(void) { CaseFoldingData data={ NULL, 0, 0, {0}, 0, 0 }; char *fields[3][2]; UErrorCode errorCode; @@ -3580,7 +3580,7 @@ TestCaseFolding() { uset_close(data.notSeen); } -static void TestBinaryCharacterPropertiesAPI() { +static void TestBinaryCharacterPropertiesAPI(void) { // API test only. See intltest/ucdtest.cpp for functional test. UErrorCode errorCode = U_ZERO_ERROR; const USet *set = u_getBinaryPropertySet(-1, &errorCode); @@ -3599,7 +3599,7 @@ static void TestBinaryCharacterPropertiesAPI() { } } -static void TestIntCharacterPropertiesAPI() { +static void TestIntCharacterPropertiesAPI(void) { // API test only. See intltest/ucdtest.cpp for functional test. UErrorCode errorCode = U_ZERO_ERROR; const UCPMap *map = u_getIntPropertyMap(UCHAR_INT_START - 1, &errorCode); diff --git a/icu4c/source/test/cintltst/custrtrn.c b/icu4c/source/test/cintltst/custrtrn.c index d794d79baa3b..7987dacc9ff6 100644 --- a/icu4c/source/test/cintltst/custrtrn.c +++ b/icu4c/source/test/cintltst/custrtrn.c @@ -208,7 +208,7 @@ static void Test_strToUTF32(void){ } /* test unpaired surrogates */ -static void Test_strToUTF32_surrogates() { +static void Test_strToUTF32_surrogates(void) { UErrorCode err = U_ZERO_ERROR; UChar32 u32Target[400]; int32_t len16, u32DestLen; @@ -388,7 +388,7 @@ static void Test_strFromUTF32(void){ } /* test surrogate code points */ -static void Test_strFromUTF32_surrogates() { +static void Test_strFromUTF32_surrogates(void) { UErrorCode err = U_ZERO_ERROR; UChar uTarget[400]; int32_t len32, uDestLen; @@ -1381,7 +1381,7 @@ static void Test_UChar_WCHART_API(void){ #endif } -static void Test_widestrs() +static void Test_widestrs(void) { #if (defined(U_WCHAR_IS_UTF16) || defined(U_WCHAR_IS_UTF32)) || (!UCONFIG_NO_CONVERSION && !UCONFIG_NO_LEGACY_CONVERSION) wchar_t ws[100]; @@ -1425,7 +1425,7 @@ static void Test_widestrs() } static void -Test_WCHART_LongString(){ +Test_WCHART_LongString(void){ #if (defined(U_WCHAR_IS_UTF16) || defined(U_WCHAR_IS_UTF32)) || (!UCONFIG_NO_CONVERSION && !UCONFIG_NO_LEGACY_CONVERSION) UErrorCode status = U_ZERO_ERROR; const char* testdatapath=loadTestData(&status); @@ -1513,7 +1513,7 @@ Test_WCHART_LongString(){ #endif } -static void Test_strToJavaModifiedUTF8() { +static void Test_strToJavaModifiedUTF8(void) { static const UChar src[]={ 0x61, 0x62, 0x63, 0xe1, 0xe2, 0xe3, 0xe01, 0xe02, 0xe03, 0xe001, 0xe002, 0xe003, @@ -1689,7 +1689,7 @@ static void Test_strToJavaModifiedUTF8() { } } -static void Test_strFromJavaModifiedUTF8() { +static void Test_strFromJavaModifiedUTF8(void) { static const uint8_t src[]={ 0x61, 0x62, 0x63, 0xc3, 0xa1, 0xc3, 0xa2, 0xc3, 0xa3, 0xe0, 0xb8, 0x81, 0xe0, 0xb8, 0x82, 0xe0, 0xb8, 0x83, @@ -1992,7 +1992,7 @@ static void Test_strFromJavaModifiedUTF8() { } /* test that string transformation functions permit NULL source pointer when source length==0 */ -static void TestNullEmptySource() { +static void TestNullEmptySource(void) { char dest8[4]={ 3, 3, 3, 3 }; UChar dest16[4]={ 3, 3, 3, 3 }; UChar32 dest32[4]={ 3, 3, 3, 3 }; diff --git a/icu4c/source/test/cintltst/custrtst.c b/icu4c/source/test/cintltst/custrtst.c index f276b94cc2d0..f59dfa29b726 100644 --- a/icu4c/source/test/cintltst/custrtst.c +++ b/icu4c/source/test/cintltst/custrtst.c @@ -72,7 +72,7 @@ static const char* raw[3][4] = { { "English_United States", "French_France", "Croatian_Croatia", "English_United States"} }; -static void setUpDataTable() +static void setUpDataTable(void) { int32_t i,j; if(dataTable == NULL) { @@ -88,7 +88,7 @@ static void setUpDataTable() } } -static void cleanUpDataTable() +static void cleanUpDataTable(void) { int32_t i,j; if(dataTable != NULL) { @@ -104,7 +104,7 @@ static void cleanUpDataTable() } /*Tests for u_strcat(),u_strcmp(), u_strlen(), u_strcpy(),u_strncat(),u_strncmp(),u_strncpy, u_uastrcpy(),u_austrcpy(), u_uastrncpy(); */ -static void TestStringFunctions() +static void TestStringFunctions(void) { int32_t i,j,k; UChar temp[512]; @@ -480,7 +480,7 @@ static void TestStringFunctions() cleanUpDataTable(); } -static void TestStringSearching() +static void TestStringSearching(void) { const UChar testString[] = {0x0061, 0x0062, 0x0063, 0x0064, 0x0064, 0x0061, 0}; const UChar testSurrogateString[] = {0xdbff, 0x0061, 0x0062, 0xdbff, 0xdfff, 0x0063, 0x0064, 0x0064, 0xdbff, 0xdfff, 0xdb00, 0xdf00, 0x0061, 0}; @@ -691,7 +691,7 @@ static void TestStringSearching() * There are some new functions, too - just test them all. */ static void -TestSurrogateSearching() { +TestSurrogateSearching(void) { static const UChar s[]={ /* 0 1 2 3 4 5 6 7 8 9 10 11 */ 0x61, 0xd801, 0xdc02, 0x61, 0xdc02, 0x61, 0xd801, 0x61, 0xd801, 0xdc02, 0x61, 0 @@ -979,7 +979,7 @@ TestSurrogateSearching() { } } -static void TestStringCopy() +static void TestStringCopy(void) { UChar temp[40]; UChar *result=0; @@ -1098,7 +1098,7 @@ static void TestStringCopy() /* test u_unescape() and u_unescapeAt() ------------------------------------- */ static void -TestUnescape() { +TestUnescape(void) { static UChar buffer[200]; static const char* input = @@ -1130,7 +1130,7 @@ TestUnescape() { } static void -TestUnescapeRepeatedSurrogateLead20725() { +TestUnescapeRepeatedSurrogateLead20725(void) { const int32_t repeat = 20000; const int32_t srclen = repeat * 6 + 1; char *src = (char*)malloc(srclen); @@ -1197,7 +1197,7 @@ _testStrHasMoreChar32Than(const UChar *s, int32_t i, int32_t length, int32_t num } static void -TestCountChar32() { +TestCountChar32(void) { static const UChar string[]={ 0x61, 0x62, 0xd800, 0xdc00, 0xd801, 0xdc01, 0x63, 0xd802, @@ -1498,7 +1498,7 @@ testIteratorState(UCharIterator *iter1, UCharIterator *iter2, const char *n, int } static void -TestUCharIterator() { +TestUCharIterator(void) { static const UChar text[]={ 0x61, 0x62, 0x63, 0xd801, 0xdffd, 0x78, 0x79, 0x7a, 0 }; diff --git a/icu4c/source/test/cintltst/encoll.c b/icu4c/source/test/cintltst/encoll.c index e54f898f0e9d..4bdadd553c11 100644 --- a/icu4c/source/test/cintltst/encoll.c +++ b/icu4c/source/test/cintltst/encoll.c @@ -262,7 +262,7 @@ void addEnglishCollTest(TestNode** root) } -static void TestTertiary( ) +static void TestTertiary(void) { int32_t testMoreSize; UCollationResult expected=UCOL_EQUAL; @@ -305,7 +305,7 @@ static void TestTertiary( ) ucol_close(myCollation); } -static void TestPrimary() +static void TestPrimary(void) { int32_t i; @@ -324,7 +324,7 @@ static void TestPrimary() ucol_close(myCollation); } -static void TestSecondary() +static void TestSecondary(void) { UCollationResult expected=UCOL_EQUAL; int32_t i,j, testAcuteSize; diff --git a/icu4c/source/test/cintltst/eurocreg.c b/icu4c/source/test/cintltst/eurocreg.c index 9aac51b099a8..618ee98ce37d 100644 --- a/icu4c/source/test/cintltst/eurocreg.c +++ b/icu4c/source/test/cintltst/eurocreg.c @@ -121,7 +121,7 @@ static const char convertersToCheck[][15] = { UBool isEuroAware(UConverter*); -void TestEuroRegression() +void TestEuroRegression(void) { int32_t i=0; diff --git a/icu4c/source/test/cintltst/hpmufn.c b/icu4c/source/test/cintltst/hpmufn.c index 558120de3d2f..f27e57939959 100644 --- a/icu4c/source/test/cintltst/hpmufn.c +++ b/icu4c/source/test/cintltst/hpmufn.c @@ -62,7 +62,7 @@ static int32_t gMutexFailures = 0; * The ICU data directory must be preserved across these operations. * Here is a helper function to assist with that. */ -static char *safeGetICUDataDirectory() { +static char *safeGetICUDataDirectory(void) { const char *dataDir = u_getDataDirectory(); /* Returned string vanashes with u_cleanup */ char *retStr = NULL; if (dataDir != NULL) { @@ -122,7 +122,7 @@ static void * U_CALLCONV myMemRealloc(const void *context, void *mem, size_t siz } -static void TestHeapFunctions() { +static void TestHeapFunctions(void) { UErrorCode status = U_ZERO_ERROR; UResourceBundle *rb = NULL; char *icuDataDir; diff --git a/icu4c/source/test/cintltst/idnatest.c b/icu4c/source/test/cintltst/idnatest.c index bd979f0d4c52..293e92074dae 100644 --- a/icu4c/source/test/cintltst/idnatest.c +++ b/icu4c/source/test/cintltst/idnatest.c @@ -427,7 +427,7 @@ static const char * const domainNames[] = { }; static void -TestToASCII(){ +TestToASCII(void){ int32_t i; UChar buf[MAX_DEST_SIZE]; @@ -441,7 +441,7 @@ TestToASCII(){ } static void -TestToUnicode(){ +TestToUnicode(void){ int32_t i; UChar buf[MAX_DEST_SIZE]; @@ -455,7 +455,7 @@ TestToUnicode(){ static void -TestIDNToUnicode(){ +TestIDNToUnicode(void){ int32_t i; UChar buf[MAX_DEST_SIZE]; UChar expected[MAX_DEST_SIZE]; @@ -484,7 +484,7 @@ TestIDNToUnicode(){ } static void -TestIDNToASCII(){ +TestIDNToASCII(void){ int32_t i; UChar buf[MAX_DEST_SIZE]; UChar expected[MAX_DEST_SIZE]; @@ -564,7 +564,7 @@ testCompareWithSrc(const UChar* s1, int32_t s1Len, static void -TestCompare(){ +TestCompare(void){ int32_t i; const char* testName ="uidna_compare"; @@ -641,7 +641,7 @@ TestCompare(){ } } -static void TestJB4490(){ +static void TestJB4490(void){ static const UChar data[][50]= { {0x00F5,0x00dE,0x00dF,0x00dD, 0x0000}, {0xFB00,0xFB01} @@ -673,7 +673,7 @@ static void TestJB4490(){ } } -static void TestJB4475(){ +static void TestJB4475(void){ static const UChar input[][10] = { {0x0054,0x0045,0x0053,0x0054,0x0000},/* TEST */ @@ -700,7 +700,7 @@ static void TestJB4475(){ } } -static void TestLength(){ +static void TestLength(void){ { static const char* cl = "my_very_very_very_very_very_very_very_very_very_very_very_very_very_long_and_incredibly_uncreative_domain_label"; UChar ul[128] = {'\0'}; @@ -823,7 +823,7 @@ static void TestLength(){ } } } -static void TestJB5273(){ +static void TestJB5273(void){ static const char INVALID_DOMAIN_NAME[] = "xn--m\\u00FCller.de"; UChar invalid_idn[25] = {'\0'}; int32_t len = u_unescape(INVALID_DOMAIN_NAME, invalid_idn, (int32_t)strlen(INVALID_DOMAIN_NAME)); @@ -857,7 +857,7 @@ static void TestJB5273(){ * Test the new (ICU 4.6/2010) C API that was added for UTS #46. * Just an API test: Functionality is tested via C++ intltest. */ -static void TestUTS46() { +static void TestUTS46(void) { static const UChar fA_sharps16[] = { 0x66, 0x41, 0xdf, 0 }; static const char fA_sharps8[] = { 0x66, 0x41, (char)0xc3, (char)0x9f, 0 }; static const UChar fa_sharps16[] = { 0x66, 0x61, 0xdf, 0 }; diff --git a/icu4c/source/test/cintltst/nccbtst.c b/icu4c/source/test/cintltst/nccbtst.c index 0f5817f70d01..825e918192fc 100644 --- a/icu4c/source/test/cintltst/nccbtst.c +++ b/icu4c/source/test/cintltst/nccbtst.c @@ -104,7 +104,7 @@ void addTestConvertErrorCallBack(TestNode** root) addTest(root, &TestCallBackFailure, "tsconv/nccbtst/TestCallBackFailure"); } -static void TestSkipCallBack() +static void TestSkipCallBack(void) { TestSkip(NEW_MAX_BUFFER, NEW_MAX_BUFFER); TestSkip(1,NEW_MAX_BUFFER); @@ -112,7 +112,7 @@ static void TestSkipCallBack() TestSkip(NEW_MAX_BUFFER, 1); } -static void TestStopCallBack() +static void TestStopCallBack(void) { TestStop(NEW_MAX_BUFFER, NEW_MAX_BUFFER); TestStop(1,NEW_MAX_BUFFER); @@ -120,7 +120,7 @@ static void TestStopCallBack() TestStop(NEW_MAX_BUFFER, 1); } -static void TestSubCallBack() +static void TestSubCallBack(void) { TestSub(NEW_MAX_BUFFER, NEW_MAX_BUFFER); TestSub(1,NEW_MAX_BUFFER); @@ -135,7 +135,7 @@ static void TestSubCallBack() #endif } -static void TestSubWithValueCallBack() +static void TestSubWithValueCallBack(void) { TestSubWithValue(NEW_MAX_BUFFER, NEW_MAX_BUFFER); TestSubWithValue(1,NEW_MAX_BUFFER); @@ -144,7 +144,7 @@ static void TestSubWithValueCallBack() } #if !UCONFIG_NO_LEGACY_CONVERSION -static void TestLegalAndOtherCallBack() +static void TestLegalAndOtherCallBack(void) { TestLegalAndOthers(NEW_MAX_BUFFER, NEW_MAX_BUFFER); TestLegalAndOthers(1,NEW_MAX_BUFFER); @@ -152,7 +152,7 @@ static void TestLegalAndOtherCallBack() TestLegalAndOthers(NEW_MAX_BUFFER, 1); } -static void TestSingleByteCallBack() +static void TestSingleByteCallBack(void) { TestSingleByte(NEW_MAX_BUFFER, NEW_MAX_BUFFER); TestSingleByte(1,NEW_MAX_BUFFER); diff --git a/icu4c/source/test/cintltst/ncnvtst.c b/icu4c/source/test/cintltst/ncnvtst.c index 0f84b86fe2b1..77b45db53274 100644 --- a/icu4c/source/test/cintltst/ncnvtst.c +++ b/icu4c/source/test/cintltst/ncnvtst.c @@ -140,7 +140,7 @@ void addExtraTests(TestNode** root) } /*test surrogate behaviour*/ -static void TestSurrogateBehaviour(){ +static void TestSurrogateBehaviour(void){ log_verbose("Testing for SBCS and LATIN_1\n"); { UChar sampleText[] = {0x0031, 0xd801, 0xdc01, 0x0032}; @@ -334,7 +334,7 @@ static void TestSurrogateBehaviour(){ } /*test various error behaviours*/ -static void TestErrorBehaviour(){ +static void TestErrorBehaviour(void){ log_verbose("Testing for SBCS and LATIN_1\n"); { static const UChar sampleText[] = { 0x0031, 0xd801}; @@ -633,7 +633,7 @@ static void TestErrorBehaviour(){ #if !UCONFIG_NO_LEGACY_CONVERSION /*test different convertToUnicode error behaviours*/ -static void TestToUnicodeErrorBehaviour() +static void TestToUnicodeErrorBehaviour(void) { log_verbose("Testing error conditions for DBCS\n"); { @@ -665,7 +665,7 @@ static void TestToUnicodeErrorBehaviour() } } -static void TestGetNextErrorBehaviour(){ +static void TestGetNextErrorBehaviour(void){ /*Test for unassigned character*/ #define INPUT_SIZE 1 static const char input1[INPUT_SIZE]={ 0x70 }; @@ -689,7 +689,7 @@ static void TestGetNextErrorBehaviour(){ #define MAX_UTF8_LEN 4 /*Regression test for utf8 converter*/ -static void TestRegressionUTF8(){ +static void TestRegressionUTF8(void){ UChar32 currCh = 0; int32_t offset8; int32_t offset16; @@ -759,7 +759,7 @@ static void TestRegressionUTF8(){ #define MAX_UTF32_LEN 1 -static void TestRegressionUTF32(){ +static void TestRegressionUTF32(void){ #if !UCONFIG_ONLY_HTML_CONVERSION UChar32 currCh = 0; int32_t offset32; @@ -896,7 +896,7 @@ static void TestRegressionUTF32(){ } /*Walk through the available converters*/ -static void TestAvailableConverters(){ +static void TestAvailableConverters(void){ UErrorCode status=U_ZERO_ERROR; UConverter *conv=NULL; int32_t i=0; @@ -913,7 +913,7 @@ static void TestAvailableConverters(){ } -static void TestFlushInternalBuffer(){ +static void TestFlushInternalBuffer(void){ TestWithBufferSize(MAX_LENGTH, 1); TestWithBufferSize(1, 1); TestWithBufferSize(1, MAX_LENGTH); @@ -1834,7 +1834,7 @@ doTestTruncated(const char *cnvName, const uint8_t *bytes, int32_t length) { } static void -TestTruncated() { +TestTruncated(void) { static const struct { const char *cnvName; uint8_t bytes[8]; /* partial input bytes resulting in no output */ @@ -1884,7 +1884,7 @@ typedef struct NameRange { } NameRange; static void -TestUnicodeSet() { +TestUnicodeSet(void) { UErrorCode errorCode; UConverter *cnv; USet *set; diff --git a/icu4c/source/test/cintltst/nucnvtst.c b/icu4c/source/test/cintltst/nucnvtst.c index 9bf835bcbcce..6c97419f4cd8 100644 --- a/icu4c/source/test/cintltst/nucnvtst.c +++ b/icu4c/source/test/cintltst/nucnvtst.c @@ -1257,7 +1257,7 @@ static void TestNewConvertWithBufferSizes(int32_t outsize, int32_t insize ) } } -static void TestCoverageMBCS(){ +static void TestCoverageMBCS(void){ #if 0 UErrorCode status = U_ZERO_ERROR; const char *directory = loadTestData(&status); @@ -1371,7 +1371,7 @@ static void TestConverterType(const char *convName, UConverterType convType) { ucnv_close(myConverter); } -static void TestConverterTypesAndStarters() +static void TestConverterTypesAndStarters(void) { #if !UCONFIG_NO_LEGACY_CONVERSION UConverter* myConverter; @@ -1514,7 +1514,7 @@ TestAmbiguousConverter(UConverter *cnv) { } } -static void TestAmbiguous() +static void TestAmbiguous(void) { UErrorCode status = U_ZERO_ERROR; UConverter *ascii_cnv = 0, *sjis_cnv = 0, *cnv; @@ -1598,7 +1598,7 @@ static void TestAmbiguous() } static void -TestSignatureDetection(){ +TestSignatureDetection(void){ /* with null terminated strings */ { static const char* data[] = { @@ -1811,7 +1811,7 @@ TestSignatureDetection(){ } } -static void TestUTF7() { +static void TestUTF7(void) { /* test input */ static const uint8_t in[]={ /* H - +Jjo- - ! +- +2AHcAQ */ @@ -1854,7 +1854,7 @@ static void TestUTF7() { ucnv_close(cnv); } -static void TestIMAP() { +static void TestIMAP(void) { /* test input */ static const uint8_t in[]={ /* H - &Jjo- - ! &- &2AHcAQ- \ */ @@ -1897,7 +1897,7 @@ static void TestIMAP() { ucnv_close(cnv); } -static void TestUTF8() { +static void TestUTF8(void) { /* test input */ static const uint8_t in[]={ 0x61, @@ -1962,7 +1962,7 @@ static void TestUTF8() { ucnv_close(cnv); } -static void TestCESU8() { +static void TestCESU8(void) { /* test input */ static const uint8_t in[]={ 0x61, @@ -2033,7 +2033,7 @@ static void TestCESU8() { ucnv_close(cnv); } -static void TestUTF16() { +static void TestUTF16(void) { /* test input */ static const uint8_t in1[]={ 0xfe, 0xff, 0x4e, 0x00, 0xfe, 0xff @@ -2091,7 +2091,7 @@ static void TestUTF16() { ucnv_close(cnv); } -static void TestUTF16BE() { +static void TestUTF16BE(void) { /* test input */ static const uint8_t in[]={ 0x00, 0x61, @@ -2147,7 +2147,7 @@ static void TestUTF16BE() { } static void -TestUTF16LE() { +TestUTF16LE(void) { /* test input */ static const uint8_t in[]={ 0x61, 0x00, @@ -2201,7 +2201,7 @@ TestUTF16LE() { ucnv_close(cnv); } -static void TestUTF32() { +static void TestUTF32(void) { /* test input */ static const uint8_t in1[]={ 0x00, 0x00, 0xfe, 0xff, 0x00, 0x10, 0x0f, 0x00, 0x00, 0x00, 0xfe, 0xff @@ -2260,7 +2260,7 @@ static void TestUTF32() { } static void -TestUTF32BE() { +TestUTF32BE(void) { /* test input */ static const uint8_t in[]={ 0x00, 0x00, 0x00, 0x61, @@ -2331,7 +2331,7 @@ TestUTF32BE() { } static void -TestUTF32LE() { +TestUTF32LE(void) { /* test input */ static const uint8_t in[]={ 0x61, 0x00, 0x00, 0x00, @@ -2402,7 +2402,7 @@ TestUTF32LE() { } static void -TestLATIN1() { +TestLATIN1(void) { /* test input */ static const uint8_t in[]={ 0x61, @@ -2530,7 +2530,7 @@ TestLATIN1() { } static void -TestSBCS() { +TestSBCS(void) { /* test input */ static const uint8_t in[]={ 0x61, 0xc0, 0x80, 0xe0, 0xf0, 0xf4}; /* expected test results */ @@ -2565,7 +2565,7 @@ TestSBCS() { } static void -TestDBCS() { +TestDBCS(void) { /* test input */ static const uint8_t in[]={ 0x44, 0x6a, @@ -2612,7 +2612,7 @@ TestDBCS() { } static void -TestMBCS() { +TestMBCS(void) { /* test input */ static const uint8_t in[]={ 0x01, @@ -2665,7 +2665,7 @@ TestMBCS() { #if !UCONFIG_NO_LEGACY_CONVERSION && !UCONFIG_NO_FILE_IO static void -TestICCRunout() { +TestICCRunout(void) { /* { "ibm-1363", :bin{ a2aea2 }, "\u00a1\u001a", :intvector{ 0, 2 }, :int{1}, :int{0}, "\", "?", :bin{""} } */ const char *cnvName = "ibm-1363"; @@ -3072,7 +3072,7 @@ static int TestJitterbug930(const char* enc){ } static void -TestHZ() { +TestHZ(void) { /* test input */ static const uint16_t in[]={ 0x3000, 0x3001, 0x3002, 0x00B7, 0x02C9, 0x02C7, 0x00A8, 0x3003, 0x3005, 0x2014, @@ -3155,7 +3155,7 @@ TestHZ() { } static void -TestISCII(){ +TestISCII(void){ /* test input */ static const uint16_t in[]={ /* test full range of Devanagari */ @@ -3298,7 +3298,7 @@ TestISCII(){ } static void -TestISO_2022_JP() { +TestISO_2022_JP(void) { /* test input */ static const uint16_t in[]={ 0x0041,/*0x00E9,*/0x3000, 0x3001, 0x3002, 0x0020, 0x000D, 0x000A, @@ -3611,7 +3611,7 @@ TestRoundTrippingAllUTF(void){ } static void -TestSCSU() { +TestSCSU(void) { static const uint16_t germanUTF16[]={ 0x00d6, 0x006c, 0x0020, 0x0066, 0x006c, 0x0069, 0x0065, 0x00df, 0x0074 @@ -3790,7 +3790,7 @@ TestSCSU() { } #if !UCONFIG_NO_LEGACY_CONVERSION -static void TestJitterbug2346(){ +static void TestJitterbug2346(void){ char source[] = { 0x1b,0x24,0x42,0x3d,0x45,0x1b,0x28,0x4a,0x0d,0x0a, 0x1b,0x24,0x42,0x3d,0x45,0x1b,0x28,0x4a,0x0d,0x0a}; uint16_t expected[] = {0x91CD,0x000D,0x000A,0x91CD,0x000D,0x000A}; @@ -3839,7 +3839,7 @@ static void TestJitterbug2346(){ } static void -TestISO_2022_JP_1() { +TestISO_2022_JP_1(void) { /* test input */ static const uint16_t in[]={ 0x3000, 0x3001, 0x3002, 0x0020, 0xFF0E, 0x30FB, 0xFF1A, 0xFF1B, 0x000D, 0x000A, @@ -3922,7 +3922,7 @@ TestISO_2022_JP_1() { } static void -TestISO_2022_JP_2() { +TestISO_2022_JP_2(void) { /* test input */ static const uint16_t in[]={ 0x00A8, 0x3003, 0x3005, 0x2015, 0xFF5E, 0x2016, 0x2026, 0x2018, 0x000D, 0x000A, @@ -4016,7 +4016,7 @@ TestISO_2022_JP_2() { } static void -TestISO_2022_KR() { +TestISO_2022_KR(void) { /* test input */ static const uint16_t in[]={ 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D @@ -4098,7 +4098,7 @@ TestISO_2022_KR() { } static void -TestISO_2022_KR_1() { +TestISO_2022_KR_1(void) { /* test input */ static const uint16_t in[]={ 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D @@ -4180,7 +4180,7 @@ TestISO_2022_KR_1() { free(offsets); } -static void TestJitterbug2411(){ +static void TestJitterbug2411(void){ static const char* source = "\x1b\x24\x29\x43\x6b\x6b\x6e\x6e\x6a\x68\x70\x6f\x69\x75\x79\x71\x77\x65\x68\x67\x0A" "\x1b\x24\x29\x43\x6a\x61\x73\x64\x66\x6a\x61\x73\x64\x66\x68\x6f\x69\x75\x79\x1b\x24\x29\x43"; UConverter* kr=NULL, *kr1=NULL; @@ -4218,7 +4218,7 @@ static void TestJitterbug2411(){ } static void -TestJIS(){ +TestJIS(void){ /* From Unicode moved to testdata/conversion.txt */ /*To Unicode*/ { @@ -4489,7 +4489,7 @@ TestISO_2022_CN_EXT() { #endif static void -TestISO_2022_CN() { +TestISO_2022_CN(void) { /* test input */ static const uint16_t in[]={ /* jitterbug 951 */ @@ -4661,7 +4661,7 @@ static void TestJitterbug6175(void) { } static void -TestEBCDIC_STATEFUL() { +TestEBCDIC_STATEFUL(void) { /* test input */ static const uint8_t in[]={ 0x61, @@ -4728,7 +4728,7 @@ TestEBCDIC_STATEFUL() { } static void -TestGB18030() { +TestGB18030(void) { /* test input */ static const uint8_t in[]={ 0x24, @@ -4784,7 +4784,7 @@ TestGB18030() { } static void -TestLMBCS() { +TestLMBCS(void) { /* LMBCS-1 string */ static const uint8_t pszLMBCS[]={ 0x61, @@ -5345,7 +5345,7 @@ TestLMBCS() { } -static void TestJitterbug255() +static void TestJitterbug255(void) { static const uint8_t testBytes[] = { 0x95, 0xcf, 0x8a, 0xb7, 0x0d, 0x0a, 0x00 }; const char *testBuffer = (const char *)testBytes; @@ -5371,7 +5371,7 @@ static void TestJitterbug255() ucnv_close(cnv); } -static void TestEBCDICUS4XML() +static void TestEBCDICUS4XML(void) { UChar unicodes_x[] = {0x0000, 0x0000, 0x0000, 0x0000}; static const UChar toUnicodeMaps_x[] = {0x000A, 0x000A, 0x000D, 0x0000}; @@ -5411,7 +5411,7 @@ static void TestEBCDICUS4XML() #if !UCONFIG_NO_COLLATION -static void TestJitterbug981(){ +static void TestJitterbug981(void){ const UChar* rules; int32_t rules_length, target_cap, bytes_needed, buff_size; UErrorCode status = U_ZERO_ERROR; @@ -5466,7 +5466,7 @@ static void TestJitterbug981(){ #endif #if !UCONFIG_NO_LEGACY_CONVERSION -static void TestJitterbug1293(){ +static void TestJitterbug1293(void){ static const UChar src[] = {0x30DE, 0x30A4, 0x5E83, 0x544A, 0x30BF, 0x30A4, 0x30D7,0x000}; char target[256]; UErrorCode status = U_ZERO_ERROR; @@ -5495,7 +5495,7 @@ static void TestJitterbug1293(){ } #endif -static void TestJB5275_1(){ +static void TestJB5275_1(void){ static const char* data = "\x3B\xB3\x0A" /* Easy characters */ "\xC0\xE9\xBF\xE9\xE8\xD8\x0A" /* Gurmukhi test */ @@ -5543,7 +5543,7 @@ static void TestJB5275_1(){ ucnv_close(conv); } -static void TestJB5275(){ +static void TestJB5275(void){ static const char* data = /* "\xEF\x42\xEF\x41\xA4\xD5\xE5\xB3\xEA\x0A" unsupported sequence \xEF\x41 */ /* "\xEF\x42\xEF\x41\xD4\xDA\xB3\xE8\xEA\x0A" unsupported sequence \xEF\x41 */ @@ -5592,7 +5592,7 @@ static void TestJB5275(){ } static void -TestIsFixedWidth() { +TestIsFixedWidth(void) { UErrorCode status = U_ZERO_ERROR; UConverter *cnv = NULL; int32_t i; diff --git a/icu4c/source/test/cintltst/reapits.c b/icu4c/source/test/cintltst/reapits.c index 3d657968e9fa..502d36aadd3d 100644 --- a/icu4c/source/test/cintltst/reapits.c +++ b/icu4c/source/test/cintltst/reapits.c @@ -2274,7 +2274,7 @@ static UBool U_CALLCONV MatchCallback(const void *context, int32_t steps) { return false; } -static void TestBug10815() { +static void TestBug10815(void) { /* Bug 10815: uregex_findNext() does not set U_REGEX_STOPPED_BY_CALLER * when the callback function specified by uregex_setMatchCallback() returns false */ diff --git a/icu4c/source/test/cintltst/spooftest.c b/icu4c/source/test/cintltst/spooftest.c index 64562bcbc476..9f59051e4a83 100644 --- a/icu4c/source/test/cintltst/spooftest.c +++ b/icu4c/source/test/cintltst/spooftest.c @@ -122,7 +122,7 @@ const char goodLatinUTF8[] = {0x75, 0x77, 0}; // Test open from source rules. // Run this in isolation to verify initialization. -static void TestOpenFromSource() { +static void TestOpenFromSource(void) { // No TEST_SETUP because that calls uspoof_open(). UErrorCode status = U_ZERO_ERROR; const char *dataSrcDir; diff --git a/icu4c/source/test/cintltst/spreptst.c b/icu4c/source/test/cintltst/spreptst.c index 73e4fe3dc466..be374263ebcb 100644 --- a/icu4c/source/test/cintltst/spreptst.c +++ b/icu4c/source/test/cintltst/spreptst.c @@ -597,7 +597,7 @@ Test_nfs4_cs_prep(void){ -static void TestBEAMWarning(){ +static void TestBEAMWarning(void){ UErrorCode status = U_ZERO_ERROR; UParseError parseError; UStringPrepProfile* profile = NULL; diff --git a/icu4c/source/test/cintltst/stdnmtst.c b/icu4c/source/test/cintltst/stdnmtst.c index 818478107abe..c59ee26d3f3b 100644 --- a/icu4c/source/test/cintltst/stdnmtst.c +++ b/icu4c/source/test/cintltst/stdnmtst.c @@ -55,7 +55,7 @@ static int dotestname(const char *name, const char *standard, const char *expect return res; } -static void TestStandardName() +static void TestStandardName(void) { int res = 1; @@ -139,7 +139,7 @@ static int dotestconv(const char *name, const char *standard, const char *expect return res; } -static void TestCanonicalName() +static void TestCanonicalName(void) { /* Test for some expected results. */ @@ -267,7 +267,7 @@ static UBool doTestUCharNames(const char *name, const char *standard, const char return 1; } -static void TestStandardNames() +static void TestStandardNames(void) { static const char *asciiIANA[] = { "ANSI_X3.4-1968", diff --git a/icu4c/source/test/cintltst/tracetst.c b/icu4c/source/test/cintltst/tracetst.c index 9e43b7d003cb..e456d68d1e4f 100644 --- a/icu4c/source/test/cintltst/tracetst.c +++ b/icu4c/source/test/cintltst/tracetst.c @@ -209,7 +209,7 @@ static void pseudo_ucnv_close(UConverter * cnv) /* * TestTraceAPI */ -static void TestTraceAPI() { +static void TestTraceAPI(void) { UTraceEntry *originalTEntryFunc; diff --git a/icu4c/source/test/cintltst/ucnvseltst.c b/icu4c/source/test/cintltst/ucnvseltst.c index ed45ccd5088a..b4f48ae05667 100644 --- a/icu4c/source/test/cintltst/ucnvseltst.c +++ b/icu4c/source/test/cintltst/ucnvseltst.c @@ -46,7 +46,7 @@ static const char **gAvailableNames = NULL; static int32_t gCountAvailable = 0; static UBool -getAvailableNames() { +getAvailableNames(void) { int32_t i; if (gAvailableNames != NULL) { return true; @@ -69,7 +69,7 @@ getAvailableNames() { } static void -releaseAvailableNames() { +releaseAvailableNames(void) { uprv_free((void *)gAvailableNames); gAvailableNames = NULL; gCountAvailable = 0; @@ -377,7 +377,7 @@ serializeAndUnserialize(UConverterSelector *sel, char **buffer, UErrorCode *stat return sel; } -static void TestSelector() +static void TestSelector(void) { TestText text; USet* excluded_sets[3] = { NULL }; @@ -507,7 +507,7 @@ static void TestSelector() } /* Improve code coverage of UPropsVectors */ -static void TestUPropsVector() { +static void TestUPropsVector(void) { UErrorCode errorCode = U_ILLEGAL_ARGUMENT_ERROR; UPropsVectors *pv = upvec_open(100, &errorCode); if (pv != NULL) { diff --git a/icu4c/source/test/cintltst/udatatst.c b/icu4c/source/test/cintltst/udatatst.c index dc3e8463e58f..0a10ddd0b5f6 100644 --- a/icu4c/source/test/cintltst/udatatst.c +++ b/icu4c/source/test/cintltst/udatatst.c @@ -117,7 +117,7 @@ static void lots_of_mallocs() #endif #if !UCONFIG_NO_FILE_IO && !UCONFIG_NO_LEGACY_CONVERSION -static void TestUDataOpen(){ +static void TestUDataOpen(void){ UDataMemory *result; UErrorCode status=U_ZERO_ERROR; const char* memMap[][2]={ @@ -442,7 +442,7 @@ static const ICU_COMMON_Data_Header gEmptyHeader = { }; -static void TestUDataSetAppData(){ +static void TestUDataSetAppData(void){ /* UDataMemory *dataItem;*/ UErrorCode status=U_ZERO_ERROR; @@ -497,7 +497,7 @@ static void TestUDataSetAppData(){ dataItem = udata_open("appData1", "res", "te_IN", &status); **/ } -static char *safeGetICUDataDirectory() { +static char *safeGetICUDataDirectory(void) { const char *dataDir = u_getDataDirectory(); /* Returned string vanashes with u_cleanup */ char *retStr = NULL; if (dataDir != NULL) { @@ -507,7 +507,7 @@ static char *safeGetICUDataDirectory() { return retStr; } -static void TestUDataFileAccess(){ +static void TestUDataFileAccess(void){ UErrorCode status; char *icuDataDir; icuDataDir = safeGetICUDataDirectory(); /* save icu data dir, so we can put it back @@ -644,7 +644,7 @@ isAcceptable3(void *context, } #if !UCONFIG_NO_FILE_IO && !UCONFIG_NO_LEGACY_CONVERSION -static void TestUDataOpenChoiceDemo1() { +static void TestUDataOpenChoiceDemo1(void) { UDataMemory *result; UErrorCode status=U_ZERO_ERROR; @@ -744,7 +744,7 @@ isAcceptable(void *context, /* This test checks to see if the isAcceptable function is being called correctly. */ -static void TestUDataOpenChoiceDemo2() { +static void TestUDataOpenChoiceDemo2(void) { UDataMemory *result; UErrorCode status=U_ZERO_ERROR; int i; @@ -791,7 +791,7 @@ static void TestUDataOpenChoiceDemo2() { } } -static void TestUDataGetInfo() { +static void TestUDataGetInfo(void) { UDataMemory *result; /* UDataInfo cf. udata.h */ @@ -868,7 +868,7 @@ static void TestUDataGetInfo() { udata_close(result); } -static void TestUDataGetMemory() { +static void TestUDataGetMemory(void) { UDataMemory *result; const int32_t *table=NULL; @@ -916,7 +916,7 @@ static void TestUDataGetMemory() { } -static void TestErrorConditions(){ +static void TestErrorConditions(void){ UDataMemory *result=NULL; UErrorCode status=U_ZERO_ERROR; @@ -1033,7 +1033,7 @@ static void TestErrorConditions(){ } /* Test whether apps and ICU can each have their own root.res */ -static void TestAppData() +static void TestAppData(void) { UResourceBundle *icu, *app; UResourceBundle *tmp = NULL; @@ -1121,7 +1121,7 @@ static void TestAppData() } #endif -static void TestICUDataName() +static void TestICUDataName(void) { UVersionInfo icuVersion; char expectDataName[20]; @@ -1631,7 +1631,7 @@ printErrorToString(void *context, const char *fmt, va_list args) { #if !UCONFIG_NO_FILE_IO && !UCONFIG_NO_LEGACY_CONVERSION static void -TestSwapData() { +TestSwapData(void) { char name[100]; UDataSwapper *ds; UDataMemory *pData; @@ -1747,7 +1747,7 @@ TestSwapData() { } #endif -static void PointerTableOfContents() { +static void PointerTableOfContents(void) { UDataMemory *dataItem; UErrorCode status=U_ZERO_ERROR; diff --git a/icu4c/source/test/cintltst/udatpg_test.c b/icu4c/source/test/cintltst/udatpg_test.c index a28ab2b9d793..7f01d5d0b946 100644 --- a/icu4c/source/test/cintltst/udatpg_test.c +++ b/icu4c/source/test/cintltst/udatpg_test.c @@ -87,7 +87,7 @@ static const UChar sampleFormatted[] = {0x31, 0x30, 0x20, 0x6A, 0x75, 0x69, 0x6C static const UChar skeleton[]= {0x4d, 0x4d, 0x4d, 0x64, 0}; /* MMMd */ static const UChar timeZoneGMT[] = { 0x0047, 0x004d, 0x0054, 0x0000 }; /* "GMT" */ -static void TestOpenClose() { +static void TestOpenClose(void) { UErrorCode errorCode=U_ZERO_ERROR; UDateTimePatternGenerator *dtpg, *dtpg2; const UChar *s; @@ -143,7 +143,7 @@ static const AppendItemNameData appendItemNameData[] = { /* for Finnish */ { UDATPG_FIELD_COUNT, {0} } /* terminator */ }; -static void TestUsage() { +static void TestUsage(void) { UErrorCode errorCode=U_ZERO_ERROR; UDateTimePatternGenerator *dtpg; const AppendItemNameData * appItemNameDataPtr; @@ -254,7 +254,7 @@ static void TestUsage() { udatpg_close(dtpg); } -static void TestBuilder() { +static void TestBuilder(void) { UErrorCode errorCode=U_ZERO_ERROR; UDateTimePatternGenerator *dtpg; UDateTimePatternConflict conflict; @@ -409,7 +409,7 @@ static const UChar patn_hpmm_a[] = u"h.mm\u202Fa"; static const UChar patn_Hpmm[] = u"H.mm"; static const UChar patn_hhpmm_a[] = u"hh.mm\u202Fa"; -static void TestOptions() { +static void TestOptions(void) { const DTPtnGenOptionsData testData[] = { /*loc skel options expectedPattern */ { "en", skel_Hmm, UDATPG_MATCH_NO_OPTIONS, patn_HHcmm }, @@ -461,7 +461,7 @@ typedef struct FieldDisplayNameData { } FieldDisplayNameData; enum { kFieldDisplayNameMax = 32, kFieldDisplayNameBytesMax = 64}; -static void TestGetFieldDisplayNames() { +static void TestGetFieldDisplayNames(void) { const FieldDisplayNameData testData[] = { /*loc field width expectedName */ { "de", UDATPG_QUARTER_FIELD, UDATPG_WIDE, "Quartal" }, @@ -528,7 +528,7 @@ typedef struct HourCycleData { UDateFormatHourCycle expected; } HourCycleData; -static void TestGetDefaultHourCycle() { +static void TestGetDefaultHourCycle(void) { const HourCycleData testData[] = { /*loc expected */ { "ar_EG", UDAT_HOUR_CYCLE_12 }, @@ -566,7 +566,7 @@ static void TestGetDefaultHourCycle() { } // Ensure that calling udatpg_getDefaultHourCycle on an empty instance doesn't call UPRV_UNREACHABLE_EXIT/abort. -static void TestGetDefaultHourCycleOnEmptyInstance() { +static void TestGetDefaultHourCycleOnEmptyInstance(void) { UErrorCode status = U_ZERO_ERROR; UDateTimePatternGenerator * dtpgen = udatpg_openEmpty(&status); diff --git a/icu4c/source/test/cintltst/uformattedvaluetst.c b/icu4c/source/test/cintltst/uformattedvaluetst.c index 392d76e3404a..edc745a3a888 100644 --- a/icu4c/source/test/cintltst/uformattedvaluetst.c +++ b/icu4c/source/test/cintltst/uformattedvaluetst.c @@ -37,7 +37,7 @@ void addUFormattedValueTest(TestNode** root) { } -static void TestBasic() { +static void TestBasic(void) { UErrorCode status = U_ZERO_ERROR; UConstrainedFieldPosition* ucfpos = ucfpos_open(&status); assertSuccess("opening ucfpos", &status); @@ -56,7 +56,7 @@ static void TestBasic() { ucfpos_close(ucfpos); } -void TestSetters() { +void TestSetters(void) { UErrorCode status = U_ZERO_ERROR; UConstrainedFieldPosition* ucfpos = ucfpos_open(&status); assertSuccess("opening ucfpos", &status); diff --git a/icu4c/source/test/cintltst/ulistfmttest.c b/icu4c/source/test/cintltst/ulistfmttest.c index b0a1f6bc3496..0696456acdcd 100644 --- a/icu4c/source/test/cintltst/ulistfmttest.c +++ b/icu4c/source/test/cintltst/ulistfmttest.c @@ -69,7 +69,7 @@ enum { kBBufMax = 256 }; -static void TestUListFmt() { +static void TestUListFmt(void) { const ListFmtTestEntry * lftep; for (lftep = listFmtTestEntries; lftep->locale != NULL ; lftep++ ) { UErrorCode status = U_ZERO_ERROR; @@ -135,7 +135,7 @@ static void TestUListFmt() { } } -static void TestUListFmtToValue() { +static void TestUListFmtToValue(void) { UErrorCode ec = U_ZERO_ERROR; UListFormatter* fmt = ulistfmt_open("en", &ec); UFormattedList* fl = ulistfmt_openResult(&ec); @@ -216,7 +216,7 @@ static void TestUListFmtToValue() { ulistfmt_closeResult(fl); } -static void TestUListOpenStyled() { +static void TestUListOpenStyled(void) { UErrorCode ec = U_ZERO_ERROR; UListFormatter* fmt = ulistfmt_openForType("en", ULISTFMT_TYPE_OR, ULISTFMT_WIDTH_SHORT, &ec); UFormattedList* fl = ulistfmt_openResult(&ec); @@ -256,7 +256,7 @@ static void TestUListOpenStyled() { #include -static void TestUList21871_A() { +static void TestUList21871_A(void) { UErrorCode status = U_ZERO_ERROR; UListFormatter *fmt = ulistfmt_openForType("en", ULISTFMT_TYPE_AND, ULISTFMT_WIDTH_WIDE, &status); assertSuccess("ulistfmt_openForType", &status); @@ -304,7 +304,7 @@ static void TestUList21871_A() { ulistfmt_close(fmt); } -static void TestUList21871_B() { +static void TestUList21871_B(void) { UErrorCode status = U_ZERO_ERROR; UListFormatter *fmt = ulistfmt_openForType("en", ULISTFMT_TYPE_AND, ULISTFMT_WIDTH_WIDE, &status); assertSuccess("ulistfmt_openForType", &status); diff --git a/icu4c/source/test/cintltst/ulocaletst.c b/icu4c/source/test/cintltst/ulocaletst.c index 6d3fae84c72d..a4d58e370e70 100644 --- a/icu4c/source/test/cintltst/ulocaletst.c +++ b/icu4c/source/test/cintltst/ulocaletst.c @@ -35,7 +35,7 @@ static const char* const rawData[][6] = { { "x-klingon", "Latn", "ZX", "", "x-klingon_Latn_ZX.utf32be@special", "x-klingon_Latn_ZX.utf32be@special"}, }; -static void TestBasicGetters() { +static void TestBasicGetters(void) { for (int32_t i = 0; i < UPRV_LENGTHOF(rawData); i++) { UErrorCode status = U_ZERO_ERROR; ULocale* l = ulocale_openForLocaleID(rawData[i][NAME], -1, &status); @@ -64,7 +64,7 @@ static void VerifyMatch(const char* localeID, const char* tag) { } } -static void TestForLanguageTag() { +static void TestForLanguageTag(void) { VerifyMatch("en_US", "en-US"); VerifyMatch("en_GB_OXENDICT", "en-GB-oed"); VerifyMatch("af@calendar=coptic;t=ar-i0-handwrit;x=foo", "af-t-ar-i0-handwrit-u-ca-coptic-x-foo"); @@ -88,7 +88,7 @@ static void TestForLanguageTag() { VerifyMatch("__1994_BISKE_ROZAJ@x=private", "und-1994-biske-rozaj-x-private"); } -static void TestGetKeywords() { +static void TestGetKeywords(void) { UErrorCode status = U_ZERO_ERROR; ULocale* l = ulocale_openForLocaleID("de@calendar=buddhist;collation=phonebook", -1, &status); if (assertSuccess(WHERE "ulocale_openForLocaleID()", &status)) { @@ -117,7 +117,7 @@ static void TestGetKeywords() { } } -static void TestGetKeywordsEmpty() { +static void TestGetKeywordsEmpty(void) { UErrorCode status = U_ZERO_ERROR; ULocale* l = ulocale_openForLocaleID("de", -1, &status); if (assertSuccess(WHERE "ulocale_openForLocaleID()", &status)) { @@ -130,7 +130,7 @@ static void TestGetKeywordsEmpty() { } } -static void TestGetKeywordsWithPrivateUse() { +static void TestGetKeywordsWithPrivateUse(void) { UErrorCode status = U_ZERO_ERROR; ULocale* l = ulocale_openForLanguageTag("en-US-u-ca-gregory-x-foo", -1, &status); if (assertSuccess(WHERE "ulocale_openForLanguageTag()", &status)) { @@ -157,7 +157,7 @@ static void TestGetKeywordsWithPrivateUse() { } } -static void TestGetUnicodeKeywords() { +static void TestGetUnicodeKeywords(void) { UErrorCode status = U_ZERO_ERROR; ULocale* l = ulocale_openForLocaleID("de@calendar=buddhist;collation=phonebook", -1, &status); if (assertSuccess(WHERE "ulocale_openForLocaleID()", &status)) { @@ -186,7 +186,7 @@ static void TestGetUnicodeKeywords() { } } -static void TestGetUnicodeKeywordsEmpty() { +static void TestGetUnicodeKeywordsEmpty(void) { UErrorCode status = U_ZERO_ERROR; ULocale* l = ulocale_openForLocaleID("de", -1, &status); if (assertSuccess(WHERE "ulocale_openForLocaleID()", &status)) { @@ -199,7 +199,7 @@ static void TestGetUnicodeKeywordsEmpty() { } } -static void TestGetUnicodeKeywordsWithPrivateUse() { +static void TestGetUnicodeKeywordsWithPrivateUse(void) { UErrorCode status = U_ZERO_ERROR; ULocale* l = ulocale_openForLanguageTag("en-US-u-ca-gregory-x-foo", -1, &status); if (assertSuccess(WHERE "ulocale_openForLanguageTag()", &status)) { @@ -220,7 +220,7 @@ static void TestGetUnicodeKeywordsWithPrivateUse() { } } -static void TestGetKeywordValue() { +static void TestGetKeywordValue(void) { UErrorCode status = U_ZERO_ERROR; ULocale* l = ulocale_openForLanguageTag("fa-u-nu-thai", -1, &status); if (assertSuccess(WHERE "ulocale_openForLanguageTag()", &status)) { @@ -242,7 +242,7 @@ static void TestGetKeywordValue() { } } -static void TestGetUnicodeKeywordValue() { +static void TestGetUnicodeKeywordValue(void) { UErrorCode status = U_ZERO_ERROR; ULocale* l = ulocale_openForLanguageTag("fa-u-nu-thai", -1, &status); if (assertSuccess(WHERE "ulocale_openForLanguageTag()", &status)) { diff --git a/icu4c/source/test/cintltst/ulocbuildertst.c b/icu4c/source/test/cintltst/ulocbuildertst.c index af811277b4bb..d128d074b6e0 100644 --- a/icu4c/source/test/cintltst/ulocbuildertst.c +++ b/icu4c/source/test/cintltst/ulocbuildertst.c @@ -40,7 +40,7 @@ static void Verify(ULocaleBuilder* bld, const char* expected, const char* msg) { } } -static void TestLocaleBuilder() { +static void TestLocaleBuilder(void) { // The following test data are copy from // icu4j/main/core/src/test/java/com/ibm/icu/dev/test/util/LocaleBuilderTest.java @@ -274,7 +274,7 @@ static void TestLocaleBuilder() { ulocbld_close(bld); } -static void TestLocaleBuilderBasic() { +static void TestLocaleBuilderBasic(void) { ULocaleBuilder* bld = ulocbld_open(); ulocbld_setLanguage(bld, "zh", -1); Verify(bld, "zh", "ulocbld_setLanguage('zh') got Error: %s\n"); @@ -331,7 +331,7 @@ static void TestLocaleBuilderBasic() { ulocbld_close(bld); } -static void TestLocaleBuilderBasicWithExtensionsOnDefaultLocale() { +static void TestLocaleBuilderBasicWithExtensionsOnDefaultLocale(void) { // Change the default locale to one with extension tags. UErrorCode status = U_ZERO_ERROR; char originalDefault[ULOC_FULLNAME_CAPACITY]; @@ -351,7 +351,7 @@ static void TestLocaleBuilderBasicWithExtensionsOnDefaultLocale() { } } -static void TestSetLanguageWellFormed() { +static void TestSetLanguageWellFormed(void) { // http://www.unicode.org/reports/tr35/tr35.html#unicode_language_subtag // unicode_language_subtag = alpha{2,3} | alpha{5,8}; // ICUTC decided also support alpha{4} @@ -408,7 +408,7 @@ static void TestSetLanguageWellFormed() { } } -static void TestSetLanguageIllFormed() { +static void TestSetLanguageIllFormed(void) { static const char* illFormed[] = { "a", "z", @@ -477,7 +477,7 @@ static void TestSetLanguageIllFormed() { } } -static void TestSetScriptWellFormed() { +static void TestSetScriptWellFormed(void) { // http://www.unicode.org/reports/tr35/tr35.html#unicode_script_subtag // unicode_script_subtag = alpha{4} ; static const char* wellFormedScripts[] = { @@ -508,7 +508,7 @@ static void TestSetScriptWellFormed() { ulocbld_close(bld); } } -static void TestSetScriptIllFormed() { +static void TestSetScriptIllFormed(void) { static const char* illFormed[] = { "a", "z", @@ -580,7 +580,7 @@ static void TestSetScriptIllFormed() { } } -static void TestSetRegionWellFormed() { +static void TestSetRegionWellFormed(void) { // http://www.unicode.org/reports/tr35/tr35.html#unicode_region_subtag // unicode_region_subtag = (alpha{2} | digit{3}) static const char* wellFormedRegions[] = { @@ -613,7 +613,7 @@ static void TestSetRegionWellFormed() { } } -static void TestSetRegionIllFormed() { +static void TestSetRegionIllFormed(void) { static const char* illFormed[] = { "a", "z", @@ -685,7 +685,7 @@ static void TestSetRegionIllFormed() { } } -static void TestSetVariantWellFormed() { +static void TestSetVariantWellFormed(void) { // http://www.unicode.org/reports/tr35/tr35.html#unicode_variant_subtag // (sep unicode_variant_subtag)* // unicode_variant_subtag = (alphanum{5,8} | digit alphanum{3}) ; @@ -763,7 +763,7 @@ static void TestSetVariantWellFormed() { } } -static void TestSetVariantIllFormed() { +static void TestSetVariantIllFormed(void) { static const char* illFormed[] = { "a", "z", @@ -871,7 +871,7 @@ static void TestSetVariantIllFormed() { } } -static void TestSetUnicodeLocaleKeywordWellFormed() { +static void TestSetUnicodeLocaleKeywordWellFormed(void) { // http://www.unicode.org/reports/tr35/tr35.html#unicode_locale_extensions // keyword = key (sep type)? ; // key = alphanum alpha ; @@ -901,7 +901,7 @@ static void TestSetUnicodeLocaleKeywordWellFormed() { } } -static void TestSetUnicodeLocaleKeywordIllFormedKey() { +static void TestSetUnicodeLocaleKeywordIllFormedKey(void) { static const char* illFormed[] = { "34", "ab-cde", @@ -925,7 +925,7 @@ static void TestSetUnicodeLocaleKeywordIllFormedKey() { } } -static void TestSetUnicodeLocaleKeywordIllFormedValue() { +static void TestSetUnicodeLocaleKeywordIllFormedValue(void) { static const char* illFormed[] = { "34", "ab-", @@ -952,7 +952,7 @@ static void TestSetUnicodeLocaleKeywordIllFormedValue() { ulocbld_close(bld); } -static void TestAddRemoveUnicodeLocaleAttribute() { +static void TestAddRemoveUnicodeLocaleAttribute(void) { ULocaleBuilder* bld = ulocbld_open(); ulocbld_setLanguage(bld, "fr", -1); ulocbld_addUnicodeLocaleAttribute(bld, "abc", -1); @@ -1050,7 +1050,7 @@ static void TestAddRemoveUnicodeLocaleAttribute() { ulocbld_close(bld); } -static void TestAddRemoveUnicodeLocaleAttributeWellFormed() { +static void TestAddRemoveUnicodeLocaleAttributeWellFormed(void) { // http://www.unicode.org/reports/tr35/tr35.html#unicode_locale_extensions // attribute = alphanum{3,8} ; static const char* wellFormedAttributes[] = { @@ -1126,7 +1126,7 @@ static void TestAddRemoveUnicodeLocaleAttributeWellFormed() { ulocbld_close(bld); } -static void TestAddUnicodeLocaleAttributeIllFormed() { +static void TestAddUnicodeLocaleAttributeIllFormed(void) { static const char* illFormed[] = { "aa", "34", @@ -1154,7 +1154,7 @@ static void TestAddUnicodeLocaleAttributeIllFormed() { } } -static void TestSetExtensionU() { +static void TestSetExtensionU(void) { ULocaleBuilder* bld = ulocbld_open(); ulocbld_setLanguage(bld, "zhABC", 2); Verify(bld, "zh", @@ -1195,7 +1195,7 @@ static void TestSetExtensionU() { ulocbld_close(bld); } -static void TestSetExtensionValidateUWellFormed() { +static void TestSetExtensionValidateUWellFormed(void) { static const char* wellFormedExtensions[] = { // keyword // keyword = key (sep type)? ; @@ -1244,7 +1244,7 @@ static void TestSetExtensionValidateUWellFormed() { } } -static void TestSetExtensionValidateUIllFormed() { +static void TestSetExtensionValidateUIllFormed(void) { static const char* illFormed[] = { // bad key "-", @@ -1287,7 +1287,7 @@ static void TestSetExtensionValidateUIllFormed() { } } -static void TestSetExtensionT() { +static void TestSetExtensionT(void) { ULocaleBuilder* bld = ulocbld_open(); ulocbld_setLanguage(bld, "fr", 2); Verify(bld, "fr", @@ -1324,7 +1324,7 @@ static void TestSetExtensionT() { ulocbld_close(bld); } -static void TestSetExtensionValidateTWellFormed() { +static void TestSetExtensionValidateTWellFormed(void) { // ((sep tlang (sep tfield)*) | (sep tfield)+) static const char* wellFormedExtensions[] = { // tlang @@ -1387,7 +1387,7 @@ static void TestSetExtensionValidateTWellFormed() { ulocbld_close(bld); } -static void TestSetExtensionValidateTIllFormed() { +static void TestSetExtensionValidateTIllFormed(void) { static const char* illFormed[] = { "a", "a-", @@ -1437,7 +1437,7 @@ static void TestSetExtensionValidateTIllFormed() { ulocbld_close(bld); } -static void TestSetExtensionPU() { +static void TestSetExtensionPU(void) { ULocaleBuilder* bld = ulocbld_open(); ulocbld_setLanguage(bld, "ar123", 2); Verify(bld, "ar", @@ -1465,7 +1465,7 @@ static void TestSetExtensionPU() { ulocbld_close(bld); } -static void TestSetExtensionValidatePUWellFormed() { +static void TestSetExtensionValidatePUWellFormed(void) { // ((sep tlang (sep tfield)*) | (sep tfield)+) static const char* wellFormedExtensions[] = { "a", // Short subtag @@ -1499,7 +1499,7 @@ static void TestSetExtensionValidatePUWellFormed() { ulocbld_close(bld); } -static void TestSetExtensionValidatePUIllFormed() { +static void TestSetExtensionValidatePUIllFormed(void) { static const char* illFormed[] = { "123456789", // Too long "abcdefghi", // Too long @@ -1522,7 +1522,7 @@ static void TestSetExtensionValidatePUIllFormed() { ulocbld_close(bld); } -static void TestSetExtensionOthers() { +static void TestSetExtensionOthers(void) { ULocaleBuilder* bld = ulocbld_open(); ulocbld_setLanguage(bld, "fr", -1); Verify(bld, "fr", @@ -1562,7 +1562,7 @@ static void TestSetExtensionOthers() { ulocbld_close(bld); } -static void TestSetExtensionValidateOthersWellFormed() { +static void TestSetExtensionValidateOthersWellFormed(void) { static const char* wellFormedExtensions[] = { "ab", "abc", @@ -1616,7 +1616,7 @@ static void TestSetExtensionValidateOthersWellFormed() { ulocbld_close(bld); } -static void TestSetExtensionValidateOthersIllFormed() { +static void TestSetExtensionValidateOthersIllFormed(void) { static const char* illFormed[] = { "0", // Too short "a", // Too short @@ -1645,7 +1645,7 @@ static void TestSetExtensionValidateOthersIllFormed() { ulocbld_close(bld); } -static void TestSetLocale() { +static void TestSetLocale(void) { ULocaleBuilder* bld1 = ulocbld_open(); ULocaleBuilder* bld2 = ulocbld_open(); UErrorCode status = U_ZERO_ERROR; @@ -1679,7 +1679,7 @@ static void TestSetLocale() { ulocbld_close(bld2); } -static void TestBuildULocale() { +static void TestBuildULocale(void) { ULocaleBuilder* bld1 = ulocbld_open(); UErrorCode status = U_ZERO_ERROR; @@ -1735,7 +1735,7 @@ static void TestBuildULocale() { } -static void TestPosixCases() { +static void TestPosixCases(void) { UErrorCode status = U_ZERO_ERROR; ULocaleBuilder* bld = ulocbld_open(); ulocbld_setLanguage(bld, "en", -1); diff --git a/icu4c/source/test/cintltst/unumberformattertst.c b/icu4c/source/test/cintltst/unumberformattertst.c index 93f039f81624..94c2c7e2e76e 100644 --- a/icu4c/source/test/cintltst/unumberformattertst.c +++ b/icu4c/source/test/cintltst/unumberformattertst.c @@ -63,7 +63,7 @@ void addUNumberFormatterTest(TestNode** root) { #define CAPACITY 30 -static void TestSkeletonFormatToString() { +static void TestSkeletonFormatToString(void) { UErrorCode ec = U_ZERO_ERROR; UChar buffer[CAPACITY]; UFormattedNumber* result = NULL; @@ -104,7 +104,7 @@ static void TestSkeletonFormatToString() { } -static void TestSkeletonFormatToFields() { +static void TestSkeletonFormatToFields(void) { UErrorCode ec = U_ZERO_ERROR; UFieldPositionIterator* ufpositer = NULL; @@ -188,7 +188,7 @@ static void TestSkeletonFormatToFields() { } -static void TestExampleCode() { +static void TestExampleCode(void) { // This is the example code given in unumberformatter.h. // Setup: @@ -219,7 +219,7 @@ static void TestExampleCode() { } -static void TestSimpleNumberFormatterExample() { +static void TestSimpleNumberFormatterExample(void) { // This is the example in usimplenumberformatter.h UErrorCode ec = U_ZERO_ERROR; USimpleNumberFormatter* uformatter = usnumf_openForLocale("bn", &ec); @@ -239,7 +239,7 @@ static void TestSimpleNumberFormatterExample() { } -static void TestSimpleNumberFormatterFull() { +static void TestSimpleNumberFormatterFull(void) { UErrorCode ec = U_ZERO_ERROR; USimpleNumberFormatter* uformatter = usnumf_openForLocaleAndGroupingStrategy("de-CH", UNUM_GROUPING_ON_ALIGNED, &ec); UFormattedNumber* uresult = unumf_openResult(&ec); @@ -273,7 +273,7 @@ static void TestSimpleNumberFormatterFull() { } -static void TestFormattedValue() { +static void TestFormattedValue(void) { UErrorCode ec = U_ZERO_ERROR; UNumberFormatter* uformatter = unumf_openForSkeletonAndLocale( u".00 compact-short", -1, "en", &ec); @@ -306,7 +306,7 @@ static void TestFormattedValue() { } -static void TestSkeletonParseError() { +static void TestSkeletonParseError(void) { UErrorCode ec = U_ZERO_ERROR; UNumberFormatter* uformatter; UParseError perror; @@ -331,7 +331,7 @@ static void TestSkeletonParseError() { } -static void TestToDecimalNumber() { +static void TestToDecimalNumber(void) { UErrorCode ec = U_ZERO_ERROR; UNumberFormatter* uformatter = unumf_openForSkeletonAndLocale( u"currency/USD", @@ -359,7 +359,7 @@ static void TestToDecimalNumber() { } -static void TestPerUnitInArabic() { +static void TestPerUnitInArabic(void) { const char* simpleMeasureUnits[] = { "area-acre", "digital-bit", @@ -445,7 +445,7 @@ static void TestPerUnitInArabic() { } -static void Test21674_State() { +static void Test21674_State(void) { UErrorCode status = U_ZERO_ERROR; UNumberFormatter* nf = NULL; UFormattedNumber* result = NULL; diff --git a/icu4c/source/test/cintltst/unumberrangeformattertst.c b/icu4c/source/test/cintltst/unumberrangeformattertst.c index ad1375c98381..6861538f4b5a 100644 --- a/icu4c/source/test/cintltst/unumberrangeformattertst.c +++ b/icu4c/source/test/cintltst/unumberrangeformattertst.c @@ -43,7 +43,7 @@ void addUNumberRangeFormatterTest(TestNode** root) { #define CAPACITY 30 -static void TestExampleCode() { +static void TestExampleCode(void) { // This is the example code given in unumberrangeformatter.h. // Setup: @@ -77,7 +77,7 @@ static void TestExampleCode() { } -static void TestFormattedValue() { +static void TestFormattedValue(void) { UErrorCode ec = U_ZERO_ERROR; UNumberRangeFormatter* uformatter = unumrf_openForSkeletonWithCollapseAndIdentityFallback( u"K", @@ -123,7 +123,7 @@ static void TestFormattedValue() { } -static void TestSkeletonParseError() { +static void TestSkeletonParseError(void) { UErrorCode ec = U_ZERO_ERROR; UNumberRangeFormatter* uformatter; UParseError perror; @@ -160,7 +160,7 @@ static void TestSkeletonParseError() { } -static void TestGetDecimalNumbers() { +static void TestGetDecimalNumbers(void) { UErrorCode ec = U_ZERO_ERROR; UNumberRangeFormatter* uformatter = unumrf_openForSkeletonWithCollapseAndIdentityFallback( u"currency/USD", diff --git a/icu4c/source/test/cintltst/uregiontest.c b/icu4c/source/test/cintltst/uregiontest.c index edb7aa39067c..0dd896817c0a 100644 --- a/icu4c/source/test/cintltst/uregiontest.c +++ b/icu4c/source/test/cintltst/uregiontest.c @@ -362,7 +362,7 @@ static KnownRegion knownRegions[] = { }; -static void TestKnownRegions() { +static void TestKnownRegions(void) { const KnownRegion * rd; for (rd = knownRegions; rd->code != NULL ; rd++ ) { UErrorCode status = U_ZERO_ERROR; @@ -389,7 +389,7 @@ static void TestKnownRegions() { } } -static void TestGetContainedRegions() { +static void TestGetContainedRegions(void) { const KnownRegion * rd; for (rd = knownRegions; rd->code != NULL ; rd++ ) { UErrorCode status = U_ZERO_ERROR; @@ -418,7 +418,7 @@ static void TestGetContainedRegions() { } } -static void TestGroupingChildren() { +static void TestGroupingChildren(void) { const char* testGroupings[] = { "003", "021,013,029", "419", "013,029,005", @@ -470,7 +470,7 @@ static void TestGroupingChildren() { } } -static void TestGetContainedRegionsWithType() { +static void TestGetContainedRegionsWithType(void) { const KnownRegion * rd; for (rd = knownRegions; rd->code != NULL ; rd++ ) { UErrorCode status = U_ZERO_ERROR; @@ -499,7 +499,7 @@ static void TestGetContainedRegionsWithType() { } } -static void TestGetContainingRegion() { +static void TestGetContainingRegion(void) { const KnownRegion * rd; for (rd = knownRegions; rd->code != NULL ; rd++ ) { UErrorCode status = U_ZERO_ERROR; @@ -523,7 +523,7 @@ static void TestGetContainingRegion() { } } -static void TestGetContainingRegionWithType() { +static void TestGetContainingRegionWithType(void) { const KnownRegion * rd; for (rd = knownRegions; rd->code != NULL ; rd++ ) { UErrorCode status = U_ZERO_ERROR; @@ -563,7 +563,7 @@ static const char ** expectPrefRegionsTestData[] = { NULL }; -static void TestGetPreferredValues() { +static void TestGetPreferredValues(void) { const char *** testDataPtr = expectPrefRegionsTestData; const char ** regionListPtr; while ( (regionListPtr = *testDataPtr++) != NULL ) { @@ -600,7 +600,7 @@ static void TestGetPreferredValues() { } } -static void TestContains() { +static void TestContains(void) { const KnownRegion * rd; for (rd = knownRegions; rd->code != NULL ; rd++ ) { UErrorCode status = U_ZERO_ERROR; diff --git a/icu4c/source/test/cintltst/usettest.c b/icu4c/source/test/cintltst/usettest.c index c07e4073f9db..73f26a4fee71 100644 --- a/icu4c/source/test/cintltst/usettest.c +++ b/icu4c/source/test/cintltst/usettest.c @@ -54,7 +54,7 @@ addUSetTest(TestNode** root) { * Tests *------------------------------------------------------------------*/ -static void Testj2269() { +static void Testj2269(void) { UErrorCode status = U_ZERO_ERROR; UChar a[4] = { 0x61, 0x62, 0x63, 0 }; USet *s = uset_open(1, 0); @@ -82,7 +82,7 @@ static const int32_t STR_ab_LEN = UPRV_LENGTHOF(STR_ab) - 1; /** * Basic API test for uset.x */ -static void TestAPI() { +static void TestAPI(void) { USet* set; USet* set2; UErrorCode ec; @@ -540,7 +540,7 @@ static void expectItems(const USet* set, } static void -TestSerialized() { +TestSerialized(void) { uint16_t buffer[1000]; USerializedSet sset; USet *set; @@ -583,7 +583,7 @@ TestSerialized() { * JB#3795. */ static void -TestNonInvariantPattern() { +TestNonInvariantPattern(void) { UErrorCode ec = U_ZERO_ERROR; /* The critical part of this test is that the following pattern must contain a non-invariant character. */ @@ -608,14 +608,14 @@ static void TestBadPattern(void) { } } -static USet *openIDSet() { +static USet *openIDSet(void) { UErrorCode errorCode = U_ZERO_ERROR; U_STRING_DECL(pattern, "[:ID_Continue:]", 15); U_STRING_INIT(pattern, "[:ID_Continue:]", 15); return uset_openPattern(pattern, 15, &errorCode); } -static void TestFreezable() { +static void TestFreezable(void) { USet *idSet; USet *frozen; USet *thawed; @@ -666,7 +666,7 @@ static void TestFreezable() { uset_close(thawed); } -static void TestSpan() { +static void TestSpan(void) { static const UChar s16[2]={ 0xe01, 0x3000 }; static const char* s8="\xE0\xB8\x81\xE3\x80\x80"; diff --git a/icu4c/source/test/cintltst/utf16tst.c b/icu4c/source/test/cintltst/utf16tst.c index 2394cbcef771..d6253f9c7ddc 100644 --- a/icu4c/source/test/cintltst/utf16tst.c +++ b/icu4c/source/test/cintltst/utf16tst.c @@ -67,7 +67,7 @@ addUTF16Test(TestNode** root) addTest(root, &TestSurrogate, "utf16tst/TestSurrogate"); } -static void TestCodeUnitValues() +static void TestCodeUnitValues(void) { static uint16_t codeunit[]={0x0000,0xe065,0x20ac,0xd7ff,0xd800,0xd841,0xd905,0xdbff,0xdc00,0xdc02,0xddee,0xdfff,0}; @@ -105,7 +105,7 @@ static void TestCodeUnitValues() } } -static void TestCharLength() +static void TestCharLength(void) { static uint32_t codepoint[]={ 1, 0x0061, @@ -144,7 +144,7 @@ static void TestCharLength() } } -static void TestGetChar() +static void TestGetChar(void) { static UChar input[]={ /* code unit,*/ @@ -223,7 +223,7 @@ static void TestGetChar() } } -static void TestNextPrevChar(){ +static void TestNextPrevChar(void){ static UChar input[]={0x0061, 0xd800, 0xdc00, 0xdbff, 0xdfff, 0x0062, 0xd841, 0xd7ff, 0xd841, 0xdc41, 0xdc00, 0x0000}; static UChar32 result[]={ @@ -398,7 +398,7 @@ static void TestNextPrevChar(){ } /* keep this in sync with utf8tst.c's TestNulTerminated() */ -static void TestNulTerminated() { +static void TestNulTerminated(void) { static const UChar input[]={ /* 0 */ 0x61, /* 1 */ 0xd801, 0xdc01, @@ -478,7 +478,7 @@ static void TestNulTerminated() { } while(c!=0); } -static void TestFwdBack(){ +static void TestFwdBack(void){ static UChar input[]={0x0061, 0xd800, 0xdc00, 0xdbff, 0xdfff, 0x0062, 0xd841, 0xd7ff, 0xd841, 0xdc41, 0xdc00, 0x0000}; static uint16_t fwd_unsafe[] ={1, 3, 5, 6, 8, 10, 11, 12}; static uint16_t fwd_safe[] ={1, 3, 5, 6, 7, 8, 10, 11, 12}; @@ -643,7 +643,7 @@ static void TestFwdBack(){ } } -static void TestSetChar(){ +static void TestSetChar(void){ static UChar input[]={0x0061, 0xd800, 0xdc00, 0xdbff, 0xdfff, 0x0062, 0xd841, 0xd7ff, 0xd841, 0xdc41, 0xdc00, 0x0000}; static uint16_t start_unsafe[]={0, 1, 1, 3, 3, 5, 6, 7, 8, 8, 9, 11}; static uint16_t start_safe[] ={0, 1, 1, 3, 3, 5, 6, 7, 8, 8, 10, 11}; @@ -703,7 +703,7 @@ static void TestSetChar(){ } } -static void TestAppendChar(){ +static void TestAppendChar(void){ #if !U_HIDE_OBSOLETE_UTF_OLD_H static UChar s[5]={0x0061, 0x0062, 0x0063, 0x0064, 0x0000}; static uint32_t test[]={ @@ -803,7 +803,7 @@ static void TestAppendChar(){ #endif } -static void TestAppend() { +static void TestAppend(void) { static const UChar32 codePoints[]={ 0x61, 0xdf, 0x901, 0x3040, 0xac00, 0xd800, 0xdbff, 0xdcde, @@ -864,7 +864,7 @@ static void TestAppend() { } } -static void TestSurrogate(){ +static void TestSurrogate(void){ static UChar32 s[] = {0x10000, 0x10ffff, 0x50000, 0x100000, 0x1abcd}; int i = 0; while (i < 5) { diff --git a/icu4c/source/test/cintltst/utf8tst.c b/icu4c/source/test/cintltst/utf8tst.c index d0dd95c7b6b1..a5f3379fe028 100644 --- a/icu4c/source/test/cintltst/utf8tst.c +++ b/icu4c/source/test/cintltst/utf8tst.c @@ -123,7 +123,7 @@ addUTF8Test(TestNode** root) addTest(root, &TestSurrogates, "utf8tst/TestSurrogates"); } -static void TestCodeUnitValues() +static void TestCodeUnitValues(void) { static const uint8_t codeunit[]={0x00, 0x65, 0x7e, 0x7f, 0xc2, 0xc4, 0xf0, 0xf4, 0x80, 0x81, 0xbc, 0xbe,}; @@ -162,7 +162,7 @@ static void TestCodeUnitValues() } } -static void TestCharLength() +static void TestCharLength(void) { static const uint32_t codepoint[]={ 1, 0x0061, @@ -205,7 +205,7 @@ static void TestCharLength() } } -static void TestGetChar() +static void TestGetChar(void) { static const uint8_t input[]={ /* code unit,*/ @@ -291,7 +291,7 @@ static void TestGetChar() } } -static void TestNextPrevChar() { +static void TestNextPrevChar(void) { static const uint8_t input[]={ 0x61, 0xf0, 0x90, 0x90, 0x81, @@ -450,7 +450,7 @@ static void TestNextPrevChar() { } /* keep this in sync with utf16tst.c's TestNulTerminated() */ -static void TestNulTerminated() { +static void TestNulTerminated(void) { static const uint8_t input[]={ /* 0 */ 0x61, /* 1 */ 0xf0, 0x90, 0x90, 0x81, @@ -544,7 +544,7 @@ static void TestNulTerminated() { } while(c!=0); } -static void TestNextPrevNonCharacters() { +static void TestNextPrevNonCharacters(void) { /* test non-characters */ static const uint8_t nonChars[]={ 0xef, 0xb7, 0x90, /* U+fdd0 */ @@ -587,7 +587,7 @@ static void TestNextPrevNonCharacters() { #endif } -static void TestNextPrevCharUnsafe() { +static void TestNextPrevCharUnsafe(void) { /* * Use a (mostly) well-formed UTF-8 string and test at code point boundaries. * The behavior of _UNSAFE macros for ill-formed strings is undefined. @@ -657,7 +657,7 @@ static void TestNextPrevCharUnsafe() { } } -static void TestFwdBack() { +static void TestFwdBack(void) { static const uint8_t input[]={ 0x61, 0xF0, 0x90, 0x90, 0x81, @@ -769,7 +769,7 @@ static void TestFwdBack() { #pragma optimize( "", off ) #endif -static void TestFwdBackUnsafe() { +static void TestFwdBackUnsafe(void) { /* * Use a (mostly) well-formed UTF-8 string and test at code point boundaries. * The behavior of _UNSAFE macros for ill-formed strings is undefined. @@ -859,7 +859,7 @@ static void TestFwdBackUnsafe() { #pragma optimize( "", on ) #endif -static void TestSetChar() { +static void TestSetChar(void) { static const uint8_t input[] = {0x61, 0xe4, 0xba, 0x8c, 0x7f, 0xfe, 0x62, 0xc5, 0x7f, 0x61, 0x80, 0x80, 0xe0, 0x00 }; static const int16_t start_safe[] @@ -901,7 +901,7 @@ static void TestSetChar() { } } -static void TestSetCharUnsafe() { +static void TestSetCharUnsafe(void) { static const uint8_t input[] = {0x61, 0xe4, 0xba, 0x8c, 0x7f, 0x2e, 0x62, 0xc5, 0x7f, 0x61, 0x80, 0x80, 0xe0, 0x80, 0x80, 0x00 }; static const int16_t start_unsafe[] @@ -946,7 +946,7 @@ static void TestSetCharUnsafe() { } } -static void TestTruncateIfIncomplete() { +static void TestTruncateIfIncomplete(void) { // Difference from U8_SET_CP_START(): // U8_TRUNCATE_IF_INCOMPLETE() does not look at s[length]. // Therefore, if the last byte is a lead byte, then this macro truncates @@ -1004,7 +1004,7 @@ static void TestTruncateIfIncomplete() { } } -static void TestAppendChar(){ +static void TestAppendChar(void){ #if !U_HIDE_OBSOLETE_UTF_OLD_H static const uint8_t s[11]={0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x00}; static const uint32_t test[]={ @@ -1173,7 +1173,7 @@ static void TestAppendChar(){ #endif } -static void TestAppend() { +static void TestAppend(void) { static const UChar32 codePoints[]={ 0x61, 0xdf, 0x901, 0x3040, 0xac00, 0xd800, 0xdbff, 0xdcde, @@ -1235,7 +1235,7 @@ static void TestAppend() { } static void -TestSurrogates() { +TestSurrogates(void) { static const uint8_t b[]={ 0xc3, 0x9f, /* 00DF */ 0xed, 0x9f, 0xbf, /* D7FF */ diff --git a/icu4c/source/test/cintltst/utmstest.c b/icu4c/source/test/cintltst/utmstest.c index ba921070f403..c797ce892636 100644 --- a/icu4c/source/test/cintltst/utmstest.c +++ b/icu4c/source/test/cintltst/utmstest.c @@ -443,7 +443,7 @@ static const DotNetDateTimeTicks dotNetDateTimeTicks[]={ * any date that we test, that is, before 0001 AD. */ static void -TestDotNet() { +TestDotNet(void) { static const UChar utc[] = { 0x45, 0x74, 0x63, 0x2f, 0x47, 0x4d, 0x54, 0 }; /* "Etc/GMT" */ const int32_t dayMillis = 86400 * INT64_C(1000); /* 1 day = 86400 seconds */ const int64_t dayTicks = 86400 * INT64_C(10000000); diff --git a/icu4c/source/test/cintltst/utransts.c b/icu4c/source/test/cintltst/utransts.c index 118625f31a39..322473b3b6e0 100644 --- a/icu4c/source/test/cintltst/utransts.c +++ b/icu4c/source/test/cintltst/utransts.c @@ -142,7 +142,7 @@ static void InitXReplaceableCallbacks(UReplaceableCallbacks* callbacks) { * Tests *------------------------------------------------------------------*/ -static void TestAPI() { +static void TestAPI(void) { enum { BUF_CAP = 128 }; char buf[BUF_CAP], buf2[BUF_CAP]; UErrorCode status = U_ZERO_ERROR; @@ -184,7 +184,7 @@ static void TestAPI() { } } -static void TestUnicodeIDs() { +static void TestUnicodeIDs(void) { UEnumeration *uenum; UTransliterator *utrans; const UChar *id, *id2; @@ -249,7 +249,7 @@ static void TestUnicodeIDs() { uenum_close(uenum); } -static void TestOpenInverse(){ +static void TestOpenInverse(void){ UErrorCode status=U_ZERO_ERROR; UTransliterator* t1=NULL; UTransliterator* inverse1=NULL; @@ -297,7 +297,7 @@ static void TestOpenInverse(){ } } -static void TestClone(){ +static void TestClone(void){ UErrorCode status=U_ZERO_ERROR; UTransliterator* t1=NULL; UTransliterator* t2=NULL; @@ -344,7 +344,7 @@ static void TestClone(){ } -static void TestRegisterUnregister(){ +static void TestRegisterUnregister(void){ UErrorCode status=U_ZERO_ERROR; UTransliterator* t1=NULL; UTransliterator* rules=NULL, *rules2; @@ -439,7 +439,7 @@ static void TestRegisterUnregister(){ utrans_close(inverse1); } -static void TestSimpleRules() { +static void TestSimpleRules(void) { /* Test rules */ /* Example: rules 1. ab>x|y * 2. yc>z @@ -492,7 +492,7 @@ static void TestSimpleRules() { "abc ababc aba", "xy abxy z"); } -static void TestFilter() { +static void TestFilter(void) { UErrorCode status = U_ZERO_ERROR; UChar filt[128]; UChar buf[128]; @@ -558,7 +558,7 @@ static void TestFilter() { * Test the UReplaceableCallback extractBetween support. We use a * transliterator known to rely on this call. */ -static void TestExtractBetween() { +static void TestExtractBetween(void) { UTransliterator *trans; UErrorCode status = U_ZERO_ERROR; @@ -587,7 +587,7 @@ static const UChar transSimpleID[] = { 0x79,0x6F,0x2D,0x79,0x6F,0x5F,0x42,0x4A,0 static const char* transSimpleCName = "yo-yo_BJ"; enum { kUBufMax = 512 }; -static void TestGetRulesAndSourceSet() { +static void TestGetRulesAndSourceSet(void) { UErrorCode status = U_ZERO_ERROR; UTransliterator *utrans = utrans_openU(transSimpleID, -1, UTRANS_FORWARD, NULL, 0, NULL, &status); if ( U_SUCCESS(status) ) { @@ -672,7 +672,7 @@ static const TransIDSourceTarg dataVarCompItems[] = { }; enum { kBBufMax = 1024 }; -static void TestDataVariantsCompounds() { +static void TestDataVariantsCompounds(void) { const TransIDSourceTarg* itemsPtr; for (itemsPtr = dataVarCompItems; itemsPtr->transID != NULL; itemsPtr++) { UErrorCode status = U_ZERO_ERROR; diff --git a/icu4c/source/tools/ctestfw/ctest.c b/icu4c/source/tools/ctestfw/ctest.c index f7bbb3ff023a..3ae9694a8308 100644 --- a/icu4c/source/tools/ctestfw/ctest.c +++ b/icu4c/source/tools/ctestfw/ctest.c @@ -651,27 +651,27 @@ static void go_offline_with_marker(const char *mrk) { } } -static void go_offline() { +static void go_offline(void) { go_offline_with_marker(NULL); } -static void go_offline_err() { +static void go_offline_err(void) { go_offline(); } -static void first_line_verbose() { +static void first_line_verbose(void) { go_offline_with_marker("v"); } -static void first_line_err() { +static void first_line_err(void) { go_offline_with_marker("!"); } -static void first_line_info() { +static void first_line_info(void) { go_offline_with_marker("\""); } -static void first_line_test() { +static void first_line_test(void) { fputs(" ", stdout); } diff --git a/icu4c/source/tools/genrb/errmsg.c b/icu4c/source/tools/genrb/errmsg.c index a99d797ec5ce..d0d9af357034 100644 --- a/icu4c/source/tools/genrb/errmsg.c +++ b/icu4c/source/tools/genrb/errmsg.c @@ -42,19 +42,19 @@ U_CFUNC void setShowWarning(UBool val) gShowWarning = val; } -U_CFUNC UBool getShowWarning(){ +U_CFUNC UBool getShowWarning(void){ return gShowWarning; } static UBool gStrict =false; -U_CFUNC UBool isStrict(){ +U_CFUNC UBool isStrict(void){ return gStrict; } U_CFUNC void setStrict(UBool val){ gStrict = val; } static UBool gVerbose =false; -U_CFUNC UBool isVerbose(){ +U_CFUNC UBool isVerbose(void){ return gVerbose; } U_CFUNC void setVerbose(UBool val){ diff --git a/icu4c/source/tools/genrb/read.c b/icu4c/source/tools/genrb/read.c index 0d4a318a8984..0041bedc0210 100644 --- a/icu4c/source/tools/genrb/read.c +++ b/icu4c/source/tools/genrb/read.c @@ -53,7 +53,7 @@ static void seekUntilEndOfComment (UCHARBUF *buf, struct UString *token, UErr static UBool isWhitespace (UChar32 c); static UBool isNewline (UChar32 c); -U_CFUNC void resetLineNumber() { +U_CFUNC void resetLineNumber(void) { lineCount = 1; } diff --git a/icu4c/source/tools/gensprep/store.c b/icu4c/source/tools/gensprep/store.c index c3712febb4ca..f0f4d7844be8 100644 --- a/icu4c/source/tools/gensprep/store.c +++ b/icu4c/source/tools/gensprep/store.c @@ -199,7 +199,7 @@ static UNewTrie *sprepTrie; extern void -init() { +init(void) { sprepTrie = (UNewTrie *)uprv_calloc(1, sizeof(UNewTrie)); diff --git a/icu4c/source/tools/toolutil/toolutil.h b/icu4c/source/tools/toolutil/toolutil.h index b32a0b876283..98b2155551e4 100644 --- a/icu4c/source/tools/toolutil/toolutil.h +++ b/icu4c/source/tools/toolutil/toolutil.h @@ -99,7 +99,7 @@ findDirname(const char *path, char *buffer, int32_t bufLen, UErrorCode* status); * Return the current year in the Gregorian calendar. Used for copyright generation. */ U_CAPI int32_t U_EXPORT2 -getCurrentYear(); +getCurrentYear(void); /* * Creates a directory with pathname.