diff --git a/icu4c/source/common/cmemory.h b/icu4c/source/common/cmemory.h index bd2c9d9077..7f7fd8d086 100644 --- a/icu4c/source/common/cmemory.h +++ b/icu4c/source/common/cmemory.h @@ -94,7 +94,7 @@ uprv_calloc(size_t num, size_t size) U_MALLOC_ATTR U_ALLOC_SIZE_ATTR2(1,2); */ #define STATIC_NEW(type) [] () { \ alignas(type) static char storage[sizeof(type)]; \ - return new(storage) type();} (); + return new(storage) type();} () /** * Heap clean up function, called from u_cleanup() diff --git a/icu4c/source/common/locbased.h b/icu4c/source/common/locbased.h index 06133be1b7..45738863b5 100644 --- a/icu4c/source/common/locbased.h +++ b/icu4c/source/common/locbased.h @@ -22,7 +22,7 @@ * `actualLocale' of size ULOC_FULLNAME_CAPACITY */ #define U_LOCALE_BASED(varname, objname) \ - LocaleBased varname((objname).validLocale, (objname).actualLocale); + LocaleBased varname((objname).validLocale, (objname).actualLocale) U_NAMESPACE_BEGIN diff --git a/icu4c/source/common/rbbi.cpp b/icu4c/source/common/rbbi.cpp index 3b116ffaf6..625fe99179 100644 --- a/icu4c/source/common/rbbi.cpp +++ b/icu4c/source/common/rbbi.cpp @@ -352,7 +352,7 @@ RuleBasedBreakIterator::operator==(const BreakIterator& that) const { // or have a different iteration position. // Note that fText's position is always the same as the break iterator's position. return FALSE; - }; + } if (!(fPosition == that2.fPosition && fRuleStatusIndex == that2.fRuleStatusIndex && diff --git a/icu4c/source/common/rbbi_cache.cpp b/icu4c/source/common/rbbi_cache.cpp index 17ee232080..4f9e83360a 100644 --- a/icu4c/source/common/rbbi_cache.cpp +++ b/icu4c/source/common/rbbi_cache.cpp @@ -519,7 +519,7 @@ UBool RuleBasedBreakIterator::BreakCache::populatePreceding(UErrorCode &status) // The initial handleNext() only advanced by a single code point. Go again. position = fBI->handleNext(); // Safe rules identify safe pairs. } - }; + } positionStatusIdx = fBI->fRuleStatusIndex; } } while (position >= fromPosition); diff --git a/icu4c/source/common/uchar.cpp b/icu4c/source/common/uchar.cpp index ca9c31fdf5..b54cd626d1 100644 --- a/icu4c/source/common/uchar.cpp +++ b/icu4c/source/common/uchar.cpp @@ -40,7 +40,7 @@ /* constants and macros for access to the data ------------------------------ */ /* getting a uint32_t properties word from the data */ -#define GET_PROPS(c, result) ((result)=UTRIE2_GET16(&propsTrie, c)); +#define GET_PROPS(c, result) ((result)=UTRIE2_GET16(&propsTrie, c)) /* API functions ------------------------------------------------------------ */ diff --git a/icu4c/source/i18n/alphaindex.cpp b/icu4c/source/i18n/alphaindex.cpp index 3950d1a13f..246c375120 100644 --- a/icu4c/source/i18n/alphaindex.cpp +++ b/icu4c/source/i18n/alphaindex.cpp @@ -958,7 +958,7 @@ collatorComparator(const void *context, const void *left, const void *right) { } if (leftString == NULL) { return 1; - }; + } if (rightString == NULL) { return -1; } diff --git a/icu4c/source/i18n/collationiterator.cpp b/icu4c/source/i18n/collationiterator.cpp index 961c9e9ace..18ccf014f0 100644 --- a/icu4c/source/i18n/collationiterator.cpp +++ b/icu4c/source/i18n/collationiterator.cpp @@ -872,7 +872,7 @@ CollationIterator::previousCE(UVector32 &offsets, UErrorCode &errorCode) { // consistent with forward iteration. while(offsets.size() <= ceBuffer.length) { offsets.addElement(limitOffset, errorCode); - }; + } } return ceBuffer.get(--ceBuffer.length); } else { @@ -932,7 +932,7 @@ CollationIterator::previousCEUnsafe(UChar32 c, UVector32 &offsets, UErrorCode &e offset = getOffset(); while(offsets.size() < ceBuffer.length) { offsets.addElement(offset, errorCode); - }; + } } U_ASSERT(offsets.size() == ceBuffer.length); // End offset corresponding to just after the unsafe-backwards segment. diff --git a/icu4c/source/i18n/dtfmtsym.cpp b/icu4c/source/i18n/dtfmtsym.cpp index c86d9eb844..26138fa6bb 100644 --- a/icu4c/source/i18n/dtfmtsym.cpp +++ b/icu4c/source/i18n/dtfmtsym.cpp @@ -2177,16 +2177,16 @@ DateFormatSymbols::initializeData(const Locale& locale, const char *type, UError // The ordering of the following statements is important. if (fLeapMonthPatterns[kLeapMonthPatternFormatAbbrev].isEmpty()) { fLeapMonthPatterns[kLeapMonthPatternFormatAbbrev].setTo(fLeapMonthPatterns[kLeapMonthPatternFormatWide]); - }; + } if (fLeapMonthPatterns[kLeapMonthPatternFormatNarrow].isEmpty()) { fLeapMonthPatterns[kLeapMonthPatternFormatNarrow].setTo(fLeapMonthPatterns[kLeapMonthPatternStandaloneNarrow]); - }; + } if (fLeapMonthPatterns[kLeapMonthPatternStandaloneWide].isEmpty()) { fLeapMonthPatterns[kLeapMonthPatternStandaloneWide].setTo(fLeapMonthPatterns[kLeapMonthPatternFormatWide]); - }; + } if (fLeapMonthPatterns[kLeapMonthPatternStandaloneAbbrev].isEmpty()) { fLeapMonthPatterns[kLeapMonthPatternStandaloneAbbrev].setTo(fLeapMonthPatterns[kLeapMonthPatternFormatAbbrev]); - }; + } // end of hack fLeapMonthPatternsCount = kMonthPatternsCount; } else { diff --git a/icu4c/source/i18n/dtitv_impl.h b/icu4c/source/i18n/dtitv_impl.h index 36fa17328e..c7addf37fb 100644 --- a/icu4c/source/i18n/dtitv_impl.h +++ b/icu4c/source/i18n/dtitv_impl.h @@ -88,7 +88,7 @@ #define MAX_E_COUNT 5 #define MAX_M_COUNT 5 //#define MAX_INTERVAL_INDEX 4 -#define MAX_POSITIVE_INT 56632; +#define MAX_POSITIVE_INT 56632 #endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/icu4c/source/i18n/msgfmt.cpp b/icu4c/source/i18n/msgfmt.cpp index e39b26b969..8a824ba7f9 100644 --- a/icu4c/source/i18n/msgfmt.cpp +++ b/icu4c/source/i18n/msgfmt.cpp @@ -813,7 +813,7 @@ MessageFormat::getFormats(int32_t& cnt) const // Get total required capacity first (it's refreshed on each call). int32_t totalCapacity = 0; - for (int32_t partIndex = 0; (partIndex = nextTopLevelArgStart(partIndex)) >= 0; ++totalCapacity) {}; + for (int32_t partIndex = 0; (partIndex = nextTopLevelArgStart(partIndex)) >= 0; ++totalCapacity) {} MessageFormat* t = const_cast (this); cnt = 0; diff --git a/icu4c/source/i18n/number_affixutils.cpp b/icu4c/source/i18n/number_affixutils.cpp index 3b1b42fe35..1039a84c65 100644 --- a/icu4c/source/i18n/number_affixutils.cpp +++ b/icu4c/source/i18n/number_affixutils.cpp @@ -230,7 +230,7 @@ UnicodeString AffixUtils::replaceType(const UnicodeString &affixPattern, AffixPa UnicodeString output(affixPattern); // copy if (affixPattern.length() == 0) { return output; - }; + } AffixTag tag; while (hasNext(tag, affixPattern)) { tag = nextToken(tag, affixPattern, status); @@ -246,7 +246,7 @@ bool AffixUtils::containsOnlySymbolsAndIgnorables(const UnicodeString& affixPatt const UnicodeSet& ignorables, UErrorCode& status) { if (affixPattern.length() == 0) { return true; - }; + } AffixTag tag; while (hasNext(tag, affixPattern)) { tag = nextToken(tag, affixPattern, status); @@ -262,7 +262,7 @@ void AffixUtils::iterateWithConsumer(const UnicodeString& affixPattern, TokenCon UErrorCode& status) { if (affixPattern.length() == 0) { return; - }; + } AffixTag tag; while (hasNext(tag, affixPattern)) { tag = nextToken(tag, affixPattern, status); diff --git a/icu4c/source/i18n/numsys.cpp b/icu4c/source/i18n/numsys.cpp index d420151b1b..ee530e8d33 100644 --- a/icu4c/source/i18n/numsys.cpp +++ b/icu4c/source/i18n/numsys.cpp @@ -37,7 +37,7 @@ U_NAMESPACE_BEGIN // Useful constants -#define DEFAULT_DIGITS UNICODE_STRING_SIMPLE("0123456789"); +#define DEFAULT_DIGITS UNICODE_STRING_SIMPLE("0123456789") static const char gNumberingSystems[] = "numberingSystems"; static const char gNumberElements[] = "NumberElements"; static const char gDefault[] = "default"; diff --git a/icu4c/source/i18n/regexcmp.cpp b/icu4c/source/i18n/regexcmp.cpp index 707e212ede..5d1eb629d4 100644 --- a/icu4c/source/i18n/regexcmp.cpp +++ b/icu4c/source/i18n/regexcmp.cpp @@ -3381,7 +3381,7 @@ int32_t RegexCompile::minMatchLength(int32_t start, int32_t end) { // it assumes that the look-ahead match might be zero-length. // TODO: Positive lookahead could recursively do the block, then continue // with the longer of the block or the value coming in. Ticket 6060 - int32_t depth = (opType == URX_LA_START? 2: 1);; + int32_t depth = (opType == URX_LA_START? 2: 1); for (;;) { loc++; op = (int32_t)fRXPat->fCompiledPat->elementAti(loc); diff --git a/icu4c/source/i18n/rematch.cpp b/icu4c/source/i18n/rematch.cpp index 24a00c3d4d..ef06c21e7e 100644 --- a/icu4c/source/i18n/rematch.cpp +++ b/icu4c/source/i18n/rematch.cpp @@ -2069,7 +2069,7 @@ int32_t RegexMatcher::split(UText *input, // if (U_FAILURE(status)) { return 0; - }; + } if (destCapacity < 1) { status = U_ILLEGAL_ARGUMENT_ERROR; diff --git a/icu4c/source/i18n/repattrn.cpp b/icu4c/source/i18n/repattrn.cpp index b8aee1a028..1386d186c4 100644 --- a/icu4c/source/i18n/repattrn.cpp +++ b/icu4c/source/i18n/repattrn.cpp @@ -646,7 +646,7 @@ int32_t RegexPattern::split(const UnicodeString &input, { if (U_FAILURE(status)) { return 0; - }; + } RegexMatcher m(this); int32_t r = 0; @@ -667,7 +667,7 @@ int32_t RegexPattern::split(UText *input, { if (U_FAILURE(status)) { return 0; - }; + } RegexMatcher m(this); int32_t r = 0; diff --git a/icu4c/source/test/cintltst/spooftest.c b/icu4c/source/test/cintltst/spooftest.c index b60dc31737..d5573ba7f0 100644 --- a/icu4c/source/test/cintltst/spooftest.c +++ b/icu4c/source/test/cintltst/spooftest.c @@ -35,7 +35,7 @@ log_err_status(status, "Failure at file %s, line %d, error = %s\n", __FILE__, __LINE__, u_errorName(status));}} #define TEST_ASSERT(expr) {if ((expr)==FALSE) { \ -log_err("Test Failure at file %s, line %d: \"%s\" is false.\n", __FILE__, __LINE__, #expr);};} +log_err("Test Failure at file %s, line %d: \"%s\" is false.\n", __FILE__, __LINE__, #expr);}} #define TEST_ASSERT_EQ(a, b) { if ((a) != (b)) { \ log_err("Test Failure at file %s, line %d: \"%s\" (%d) != \"%s\" (%d) \n", \ diff --git a/icu4c/source/test/intltest/alphaindextst.cpp b/icu4c/source/test/intltest/alphaindextst.cpp index 8a4edb2771..08e50c732b 100644 --- a/icu4c/source/test/intltest/alphaindextst.cpp +++ b/icu4c/source/test/intltest/alphaindextst.cpp @@ -74,7 +74,7 @@ void AlphabeticIndexTest::runIndexedTest( int32_t index, UBool exec, const char* #define TEST_CHECK_STATUS {if (U_FAILURE(status)) {dataerrln("%s:%d: Test failure. status=%s", \ __FILE__, __LINE__, u_errorName(status)); return;}} -#define TEST_ASSERT(expr) {if ((expr)==FALSE) {errln("%s:%d: Test failure \n", __FILE__, __LINE__);};} +#define TEST_ASSERT(expr) {if ((expr)==FALSE) {errln("%s:%d: Test failure \n", __FILE__, __LINE__);}} // // APITest. Invoke every function at least once, and check that it does something. diff --git a/icu4c/source/test/intltest/caltest.cpp b/icu4c/source/test/intltest/caltest.cpp index ab4966758a..89e35ba01f 100644 --- a/icu4c/source/test/intltest/caltest.cpp +++ b/icu4c/source/test/intltest/caltest.cpp @@ -41,7 +41,7 @@ errln("%s:%d: Test failure, locale %s. status=%s", __FILE__, __LINE__, testlocale, u_errorName(status)); \ } return;}} -#define TEST_ASSERT(expr) {if ((expr)==FALSE) {errln("%s:%d: Test failure \n", __FILE__, __LINE__);};} +#define TEST_ASSERT(expr) {if ((expr)==FALSE) {errln("%s:%d: Test failure \n", __FILE__, __LINE__);}} // ***************************************************************************** // class CalendarTest @@ -2173,7 +2173,7 @@ int32_t CalendarTest::testLocaleCount() if(gLocaleCount < 0) { int32_t i; for(i=0;testLocaleID(i) != NULL;i++) { - ; + // do nothing } gLocaleCount = i; } diff --git a/icu4c/source/test/intltest/dcfmtest.cpp b/icu4c/source/test/intltest/dcfmtest.cpp index a07f1580bb..79dd9c99ce 100644 --- a/icu4c/source/test/intltest/dcfmtest.cpp +++ b/icu4c/source/test/intltest/dcfmtest.cpp @@ -83,11 +83,11 @@ void DecimalFormatTest::runIndexedTest( int32_t index, UBool exec, const char* & {dataerrln("DecimalFormatTest failure at line %d. status=%s", \ __LINE__, u_errorName(status)); return 0;}} -#define DF_ASSERT(expr) {if ((expr)==FALSE) {errln("DecimalFormatTest failure at line %d.\n", __LINE__);};} +#define DF_ASSERT(expr) {if ((expr)==FALSE) {errln("DecimalFormatTest failure at line %d.\n", __LINE__);}} #define DF_ASSERT_FAIL(expr, errcode) {UErrorCode status=U_ZERO_ERROR; (expr);\ if (status!=errcode) {dataerrln("DecimalFormatTest failure at line %d. Expected status=%s, got %s", \ - __LINE__, u_errorName(errcode), u_errorName(status));};} + __LINE__, u_errorName(errcode), u_errorName(status));}} #define DF_CHECK_STATUS_L(line) {if (U_FAILURE(status)) {errln( \ "DecimalFormatTest failure at line %d, from %d. status=%d\n",__LINE__, (line), status); }} @@ -546,7 +546,7 @@ cleanUpAndReturn: errln("ICU Error \"%s\"\n", u_errorName(status)); delete retPtr; retPtr = NULL; - }; + } return retPtr; } diff --git a/icu4c/source/test/intltest/dtfmrgts.cpp b/icu4c/source/test/intltest/dtfmrgts.cpp index 5e04379915..771a66e0c8 100644 --- a/icu4c/source/test/intltest/dtfmrgts.cpp +++ b/icu4c/source/test/intltest/dtfmrgts.cpp @@ -1461,7 +1461,7 @@ void DateFormatRegressionTest::Test5554(void) if (U_FAILURE(status)) { errln("Error getting time to format"); return; - }; + } sdf->adoptCalendar(cal); UnicodeString result; UnicodeString correct("-0330", ""); diff --git a/icu4c/source/test/intltest/dtfmttst.cpp b/icu4c/source/test/intltest/dtfmttst.cpp index 8954094bd7..47bdd76c50 100644 --- a/icu4c/source/test/intltest/dtfmttst.cpp +++ b/icu4c/source/test/intltest/dtfmttst.cpp @@ -4789,7 +4789,7 @@ void DateFormatTest::TestNumberFormatOverride() { FieldPosition pos(FieldPosition::DONT_CARE); fmt->format(test_date,result, pos); - UnicodeString expected = ((UnicodeString)DATA[i][1]).unescape();; + UnicodeString expected = ((UnicodeString)DATA[i][1]).unescape(); if (result != expected) errln("FAIL: Expected " + expected + " get: " + result); diff --git a/icu4c/source/test/intltest/idnaconf.cpp b/icu4c/source/test/intltest/idnaconf.cpp index 6db4f8d0fa..cc8d89a942 100644 --- a/icu4c/source/test/intltest/idnaconf.cpp +++ b/icu4c/source/test/intltest/idnaconf.cpp @@ -173,7 +173,7 @@ UBool IdnaConfTest::ReadOneLine(UnicodeString& buf){ curOffset += 1 + t; // BACKSLAH and NewlineMark continue; } - }; + } buf.append(c); curOffset++; } diff --git a/icu4c/source/test/intltest/itspoof.cpp b/icu4c/source/test/intltest/itspoof.cpp index f799617c0a..7e317374b2 100644 --- a/icu4c/source/test/intltest/itspoof.cpp +++ b/icu4c/source/test/intltest/itspoof.cpp @@ -33,10 +33,10 @@ errcheckln(status, "Failure at file %s, line %d, error = %s", __FILE__, __LINE__, u_errorName(status));}} #define TEST_ASSERT(expr) {if ((expr)==FALSE) { \ - errln("Test Failure at file %s, line %d: \"%s\" is false.", __FILE__, __LINE__, #expr);};} + errln("Test Failure at file %s, line %d: \"%s\" is false.", __FILE__, __LINE__, #expr);}} #define TEST_ASSERT_MSG(expr, msg) {if ((expr)==FALSE) { \ - dataerrln("Test Failure at file %s, line %d, %s: \"%s\" is false.", __FILE__, __LINE__, msg, #expr);};} + dataerrln("Test Failure at file %s, line %d, %s: \"%s\" is false.", __FILE__, __LINE__, msg, #expr);}} #define TEST_ASSERT_EQ(a, b) { if ((a) != (b)) { \ errln("Test Failure at file %s, line %d: \"%s\" (%d) != \"%s\" (%d)", \ diff --git a/icu4c/source/test/intltest/localebuildertest.cpp b/icu4c/source/test/intltest/localebuildertest.cpp index 24beb6aebb..b551bf8e6e 100644 --- a/icu4c/source/test/intltest/localebuildertest.cpp +++ b/icu4c/source/test/intltest/localebuildertest.cpp @@ -1228,7 +1228,7 @@ void LocaleBuilderTest::TestSetExtensionValidateUWellFormed() { errln("setExtension('u', \"%s\") got Error: %s\n", extension, u_errorName(status)); } - }; + } } void LocaleBuilderTest::TestSetExtensionValidateUIllFormed() { @@ -1364,7 +1364,7 @@ void LocaleBuilderTest::TestSetExtensionValidateTWellFormed() { errln("setExtension('t', \"%s\") got Error: %s\n", extension, u_errorName(status)); } - }; + } } void LocaleBuilderTest::TestSetExtensionValidateTIllFormed() { @@ -1469,7 +1469,7 @@ void LocaleBuilderTest::TestSetExtensionValidatePUWellFormed() { errln("setExtension('x', \"%s\") got Error: %s\n", extension, u_errorName(status)); } - }; + } } void LocaleBuilderTest::TestSetExtensionValidatePUIllFormed() { @@ -1558,7 +1558,7 @@ void LocaleBuilderTest::TestSetExtensionValidateOthersWellFormed() { errln("setExtension('%c', \"%s\") got Error: %s\n", ch, extension, u_errorName(status)); } - }; + } const char* someChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`~!@#$%^&*()-_=+;:,.<>?"; diff --git a/icu4c/source/test/intltest/numbertest_decimalquantity.cpp b/icu4c/source/test/intltest/numbertest_decimalquantity.cpp index 9e9b49be9a..d0ccfe015a 100644 --- a/icu4c/source/test/intltest/numbertest_decimalquantity.cpp +++ b/icu4c/source/test/intltest/numbertest_decimalquantity.cpp @@ -18,7 +18,7 @@ void DecimalQuantityTest::runIndexedTest(int32_t index, UBool exec, const char * } TESTCASE_AUTO_BEGIN; TESTCASE_AUTO(testDecimalQuantityBehaviorStandalone); - TESTCASE_AUTO(testSwitchStorage);; + TESTCASE_AUTO(testSwitchStorage); TESTCASE_AUTO(testCopyMove); TESTCASE_AUTO(testAppend); if (!quick) { diff --git a/icu4c/source/test/intltest/numfmtst.cpp b/icu4c/source/test/intltest/numfmtst.cpp index 6e1617a358..9c6e0840a7 100644 --- a/icu4c/source/test/intltest/numfmtst.cpp +++ b/icu4c/source/test/intltest/numfmtst.cpp @@ -322,7 +322,7 @@ NumberFormatTest::TestCoverage(void){ int64_t num = 4; if (stub.format(num, agent, pos) != UnicodeString("agent3")){ errln("NumberFormat::format(int64, UnicodString&, FieldPosition&) should delegate to (int32, ,)"); - }; + } } void NumberFormatTest::TestLocalizedPatternSymbolCoverage() { diff --git a/icu4c/source/test/intltest/numrgts.cpp b/icu4c/source/test/intltest/numrgts.cpp index fe244baf81..3f6c4f14a9 100644 --- a/icu4c/source/test/intltest/numrgts.cpp +++ b/icu4c/source/test/intltest/numrgts.cpp @@ -998,7 +998,7 @@ void NumberFormatRegressionTest::Test4071005 (void) if (failure(status, "NumberFormat::createInstance", Locale::getCanadaFrench(), TRUE)){ delete formatter; return; - }; + } tempString = formatter->format (-5789.9876, tempString); if (tempString == expectedDefault) { @@ -1132,7 +1132,7 @@ void NumberFormatRegressionTest::Test4071859 (void) if (failure(status, "NumberFormat::createNumberInstance", TRUE)){ delete formatter; return; - }; + } tempString = formatter->format (-5789.9876, tempString); if (tempString == expectedDefault) { @@ -1942,7 +1942,7 @@ void NumberFormatRegressionTest::Test4145457() { if (failure(status, "NumberFormat::createInstance", TRUE)){ delete nff; return; - }; + } DecimalFormat *nf = dynamic_cast(nff); if(nf == NULL) { errln("DecimalFormat needed to continue"); @@ -2185,7 +2185,7 @@ void NumberFormatRegressionTest::Test4167494(void) { if (failure(status, "NumberFormat::createInstance", TRUE)){ delete fmt; return; - }; + } double a = DBL_MAX * 0.99; // DBL_MAX itself overflows to +Inf UnicodeString s; @@ -2515,7 +2515,7 @@ void NumberFormatRegressionTest::Test4216742(void) { if (failure(status, "createInstance", Locale::getUS(), TRUE)){ delete fmt; return; - }; + } int32_t DATA[] = { INT32_MIN, INT32_MAX, -100000000, 100000000 }; int DATA_length = UPRV_LENGTHOF(DATA); for (int i=0; isetMaximumFractionDigits(2); for (int i=0; isetMinimumFractionDigits(1); nf->setMaximumFractionDigits(1); double a = -0.09; @@ -2911,7 +2911,7 @@ void NumberFormatRegressionTest::Test9780(void) { if (failure(status, "NumberFormat::createInstance", TRUE)){ delete nf; return; - }; + } DecimalFormat *df = dynamic_cast(nf); if(df == NULL) { errln("DecimalFormat needed to continue"); @@ -3025,7 +3025,6 @@ void NumberFormatRegressionTest::Test9677(void) { errln("FAIL: with different neg prefix , parse error %s\n", u_errorName(status)); status = U_ZERO_ERROR; } else { -; if(n!=-123456789) { errln("FAIL: with different neg prefix , unum_parse status %s, result %d expected -123456789\n", u_errorName(status), n); } else { diff --git a/icu4c/source/test/intltest/pptest.cpp b/icu4c/source/test/intltest/pptest.cpp index 75bc094481..0f619d0e1c 100644 --- a/icu4c/source/test/intltest/pptest.cpp +++ b/icu4c/source/test/intltest/pptest.cpp @@ -182,7 +182,7 @@ void ParsePositionTest::TestFieldPosition_example() if (failure(status, "NumberFormat::createInstance", TRUE)){ delete nf; return; - }; + } DecimalFormat *fmt = dynamic_cast(nf); if(fmt == NULL) { diff --git a/icu4c/source/test/intltest/rbbiapts.cpp b/icu4c/source/test/intltest/rbbiapts.cpp index 5d8ea00fd9..f78bfc9069 100644 --- a/icu4c/source/test/intltest/rbbiapts.cpp +++ b/icu4c/source/test/intltest/rbbiapts.cpp @@ -38,7 +38,7 @@ dataerrln("Failure at file %s, line %d, error = %s", __FILE__, __LINE__, u_errorName(status));}} #define TEST_ASSERT(expr) {if ((expr) == FALSE) { \ - errln("Test Failure at file %s, line %d: \"%s\" is false.\n", __FILE__, __LINE__, #expr);};} + errln("Test Failure at file %s, line %d: \"%s\" is false.\n", __FILE__, __LINE__, #expr);}} void RBBIAPITest::TestCloneEquals() { @@ -1041,7 +1041,7 @@ void RBBIAPITest::RoundtripRule(const char *dataFile) { __FILE__, __LINE__, u_errorName(status), parseError.line, parseError.offset); errln(UnicodeString(builtSource)); return; - }; + } rbbiRules = brkItr->getBinaryRules(length); logln("Comparing \"%s\" len=%d", dataFile, length); if (memcmp(builtRules, rbbiRules, (int32_t)length) != 0) { diff --git a/icu4c/source/test/intltest/rbbitst.cpp b/icu4c/source/test/intltest/rbbitst.cpp index 852cc79034..7504d4d4d5 100644 --- a/icu4c/source/test/intltest/rbbitst.cpp +++ b/icu4c/source/test/intltest/rbbitst.cpp @@ -1237,7 +1237,7 @@ cleanUpAndReturn: delete []retPtr; retPtr = 0; ulen = 0; - }; + } return retPtr; } @@ -2033,7 +2033,7 @@ int32_t RBBIWordMonkey::next(int32_t prevPos) { c3 = fText->char32At(p3); if (fCRSet->contains(c2) || fLFSet->contains(c2) || fNewlineSet->contains(c2)) { break; - }; + } } while (fFormatSet->contains(c3) || fExtendSet->contains(c3) || fZWJSet->contains(c3)); @@ -2059,10 +2059,10 @@ int32_t RBBIWordMonkey::next(int32_t prevPos) { // if (fCRSet->contains(c1) || fLFSet->contains(c1) || fNewlineSet->contains(c1)) { break; - }; + } if (fCRSet->contains(c2) || fLFSet->contains(c2) || fNewlineSet->contains(c2)) { break; - }; + } // Rule (3c) ZWJ x Extended_Pictographic // Not ignoring extend chars, so peek into input text to diff --git a/icu4c/source/test/intltest/regextst.cpp b/icu4c/source/test/intltest/regextst.cpp index 41afea4225..bcb5ce5823 100644 --- a/icu4c/source/test/intltest/regextst.cpp +++ b/icu4c/source/test/intltest/regextst.cpp @@ -182,11 +182,11 @@ const char* RegexTest::extractToAssertBuf(const UnicodeString& message) { #define REGEX_CHECK_STATUS {if (U_FAILURE(status)) {dataerrln("%s:%d: RegexTest failure. status=%s", \ __FILE__, __LINE__, u_errorName(status)); return;}} -#define REGEX_ASSERT(expr) {if ((expr)==FALSE) {errln("%s:%d: RegexTest failure: REGEX_ASSERT(%s) failed \n", __FILE__, __LINE__, #expr);};} +#define REGEX_ASSERT(expr) {if ((expr)==FALSE) {errln("%s:%d: RegexTest failure: REGEX_ASSERT(%s) failed \n", __FILE__, __LINE__, #expr);}} #define REGEX_ASSERT_FAIL(expr, errcode) {UErrorCode status=U_ZERO_ERROR; (expr);\ if (status!=errcode) {dataerrln("RegexTest failure at line %d. Expected status=%s, got %s", \ - __LINE__, u_errorName(errcode), u_errorName(status));};} + __LINE__, u_errorName(errcode), u_errorName(status));}} #define REGEX_CHECK_STATUS_L(line) {if (U_FAILURE(status)) {errln( \ "RegexTest failure at line %d, from %d. status=%d\n",__LINE__, (line), status); }} @@ -199,7 +199,7 @@ if (status!=errcode) {dataerrln("RegexTest failure at line %d. Expected status= #define REGEX_ASSERT_UNISTR(expected, actual) { \ if (UnicodeString(expected, -1, US_INV) != (actual)) { \ errln("%s:%d: RegexTest failure: REGEX_ASSERT_UNISTR(%s, %s) failed \n", \ - __FILE__, __LINE__, expected, extractToAssertBuf(actual));};} + __FILE__, __LINE__, expected, extractToAssertBuf(actual));}} static UBool testUTextEqual(UText *uta, UText *utb) { @@ -481,7 +481,7 @@ UBool RegexTest::doRegexLMTestUTF8(const char *pat, const char *text, UBool look // REGEX_ERR("pattern", expected error line, column, expected status); // //--------------------------------------------------------------------------- -#define REGEX_ERR(pat, line, col, status) regex_err(pat, line, col, status, __LINE__); +#define REGEX_ERR(pat, line, col, status) regex_err(pat, line, col, status, __LINE__) void RegexTest::regex_err(const char *pat, int32_t errLine, int32_t errCol, UErrorCode expectedStatus, int32_t line) { @@ -3928,7 +3928,7 @@ cleanUpAndReturn: delete []retPtr; retPtr = 0; ulen = 0; - }; + } return retPtr; } diff --git a/icu4c/source/test/intltest/ssearch.cpp b/icu4c/source/test/intltest/ssearch.cpp index 5a68838340..7cdea8a7cc 100644 --- a/icu4c/source/test/intltest/ssearch.cpp +++ b/icu4c/source/test/intltest/ssearch.cpp @@ -201,7 +201,7 @@ void SSearchTest::searchTest() const UnicodeString *locale = testCase->getAttribute("locale"); if (locale == NULL || locale->length()==0) { locale = &defLocale; - }; + } locale->extract(0, locale->length(), clocale, sizeof(clocale), NULL); diff --git a/icu4c/source/test/letest/letest.cpp b/icu4c/source/test/letest/letest.cpp index bb94a098ca..35c326f7e3 100644 --- a/icu4c/source/test/letest/letest.cpp +++ b/icu4c/source/test/letest/letest.cpp @@ -244,7 +244,7 @@ static void U_CALLCONV AccessTest(void) SimpleFontInstance *font = new SimpleFontInstance(12, status); LayoutEngine *engine = LayoutEngine::layoutEngineFactory(font, arabScriptCode, -1, status); le_int32 glyphCount; - LEGlyphID glyphs[6], extraBitGlyphs[6];; + LEGlyphID glyphs[6], extraBitGlyphs[6]; le_int32 biasedIndices[6], indices[6], glyph; float positions[6 * 2 + 2]; LEUnicode chars[] = { diff --git a/icu4c/source/tools/genbrk/genbrk.cpp b/icu4c/source/tools/genbrk/genbrk.cpp index 0a4ec3c9ae..38df3ee969 100644 --- a/icu4c/source/tools/genbrk/genbrk.cpp +++ b/icu4c/source/tools/genbrk/genbrk.cpp @@ -262,7 +262,7 @@ int main(int argc, char **argv) { if (status != U_BUFFER_OVERFLOW_ERROR) { fprintf(stderr, "ucnv_toUChars: ICU Error \"%s\"\n", u_errorName(status)); exit(status); - }; + } status = U_ZERO_ERROR; UChar *ruleSourceU = new UChar[destCap+1]; @@ -275,7 +275,7 @@ int main(int argc, char **argv) { if (U_FAILURE(status)) { fprintf(stderr, "ucnv_toUChars: ICU Error \"%s\"\n", u_errorName(status)); exit(status); - }; + } ucnv_close(conv); @@ -296,7 +296,7 @@ int main(int argc, char **argv) { fprintf(stderr, "createRuleBasedBreakIterator: ICU Error \"%s\" at line %d, column %d\n", u_errorName(status), (int)parseError.line, (int)parseError.offset); exit(status); - }; + } // diff --git a/icu4c/source/tools/gencfu/gencfu.cpp b/icu4c/source/tools/gencfu/gencfu.cpp index 1ac9ad3fd8..9bc62bdc8e 100644 --- a/icu4c/source/tools/gencfu/gencfu.cpp +++ b/icu4c/source/tools/gencfu/gencfu.cpp @@ -236,7 +236,7 @@ int main(int argc, char **argv) { fprintf(stderr, "gencfu: uspoof_openFromSource error \"%s\" at file %s, line %d, column %d\n", u_errorName(status), confFileName, (int)parseError.line, (int)parseError.offset); exit(status); - }; + } // diff --git a/icu4c/source/tools/genrb/derb.cpp b/icu4c/source/tools/genrb/derb.cpp index ac26d95be4..997b400129 100644 --- a/icu4c/source/tools/genrb/derb.cpp +++ b/icu4c/source/tools/genrb/derb.cpp @@ -631,7 +631,7 @@ static const char *getEncodingName(const char *encoding) { if (!(enc = ucnv_getStandardName(encoding, "MIME", &err))) { err = U_ZERO_ERROR; if (!(enc = ucnv_getStandardName(encoding, "IANA", &err))) { - ; + // do nothing } } diff --git a/icu4c/source/tools/toolutil/filetools.cpp b/icu4c/source/tools/toolutil/filetools.cpp index 6e88c94b52..0f0e9c5984 100644 --- a/icu4c/source/tools/toolutil/filetools.cpp +++ b/icu4c/source/tools/toolutil/filetools.cpp @@ -65,7 +65,7 @@ isFileModTimeLater(const char *filePath, const char *checkAgainst, UBool isDir) if (U_FAILURE(status)) { fprintf(stderr, "%s:%d: %s\n", __FILE__, __LINE__, u_errorName(status)); return FALSE; - }; + } if ((subDirp = opendir(newpath.data())) != NULL) { /* If this new path is a directory, make a recursive call with the newpath. */ diff --git a/icu4c/source/tools/toolutil/xmlparser.cpp b/icu4c/source/tools/toolutil/xmlparser.cpp index 1ca111c075..a9650cc599 100644 --- a/icu4c/source/tools/toolutil/xmlparser.cpp +++ b/icu4c/source/tools/toolutil/xmlparser.cpp @@ -313,7 +313,7 @@ UXMLParser::parseFile(const char *filename, UErrorCode &errorCode) { // reached end of file, convert once more to flush the converter flush=TRUE; } - }; + } exit: ucnv_close(cnv);