ICU-20601 Remove superfluous semicolons (-Wextra-semi-stmt).
These are the same changes for the C++ code as was done for the C code
by commit 17606e0345c7baaf5331bc0298c1c4e086b812e3.
diff --git a/icu4c/source/common/cmemory.h b/icu4c/source/common/cmemory.h
index bd2c9d9..7f7fd8d 100644
--- a/icu4c/source/common/cmemory.h
+++ b/icu4c/source/common/cmemory.h
@@ -94,7 +94,7 @@
*/
#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 06133be..4573886 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 3b116ff..625fe99 100644
--- a/icu4c/source/common/rbbi.cpp
+++ b/icu4c/source/common/rbbi.cpp
@@ -352,7 +352,7 @@
// 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 17ee232..4f9e833 100644
--- a/icu4c/source/common/rbbi_cache.cpp
+++ b/icu4c/source/common/rbbi_cache.cpp
@@ -519,7 +519,7 @@
// 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 ca9c31f..b54cd62 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 3950d1a..246c375 100644
--- a/icu4c/source/i18n/alphaindex.cpp
+++ b/icu4c/source/i18n/alphaindex.cpp
@@ -958,7 +958,7 @@
}
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 961c9e9..18ccf01 100644
--- a/icu4c/source/i18n/collationiterator.cpp
+++ b/icu4c/source/i18n/collationiterator.cpp
@@ -872,7 +872,7 @@
// consistent with forward iteration.
while(offsets.size() <= ceBuffer.length) {
offsets.addElement(limitOffset, errorCode);
- };
+ }
}
return ceBuffer.get(--ceBuffer.length);
} else {
@@ -932,7 +932,7 @@
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 c86d9eb..26138fa 100644
--- a/icu4c/source/i18n/dtfmtsym.cpp
+++ b/icu4c/source/i18n/dtfmtsym.cpp
@@ -2177,16 +2177,16 @@
// 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 36fa173..c7addf3 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 e39b26b..8a824ba 100644
--- a/icu4c/source/i18n/msgfmt.cpp
+++ b/icu4c/source/i18n/msgfmt.cpp
@@ -813,7 +813,7 @@
// 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<MessageFormat*> (this);
cnt = 0;
diff --git a/icu4c/source/i18n/number_affixutils.cpp b/icu4c/source/i18n/number_affixutils.cpp
index 3b1b42f..1039a84 100644
--- a/icu4c/source/i18n/number_affixutils.cpp
+++ b/icu4c/source/i18n/number_affixutils.cpp
@@ -230,7 +230,7 @@
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 @@
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 @@
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 d420151..ee530e8 100644
--- a/icu4c/source/i18n/numsys.cpp
+++ b/icu4c/source/i18n/numsys.cpp
@@ -37,7 +37,7 @@
// 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 707e212..5d1eb62 100644
--- a/icu4c/source/i18n/regexcmp.cpp
+++ b/icu4c/source/i18n/regexcmp.cpp
@@ -3381,7 +3381,7 @@
// 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 24a00c3..ef06c21 100644
--- a/icu4c/source/i18n/rematch.cpp
+++ b/icu4c/source/i18n/rematch.cpp
@@ -2069,7 +2069,7 @@
//
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 b8aee1a..1386d18 100644
--- a/icu4c/source/i18n/repattrn.cpp
+++ b/icu4c/source/i18n/repattrn.cpp
@@ -646,7 +646,7 @@
{
if (U_FAILURE(status)) {
return 0;
- };
+ }
RegexMatcher m(this);
int32_t r = 0;
@@ -667,7 +667,7 @@
{
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 b60dc31..d5573ba 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 8a4edb2..08e50c7 100644
--- a/icu4c/source/test/intltest/alphaindextst.cpp
+++ b/icu4c/source/test/intltest/alphaindextst.cpp
@@ -74,7 +74,7 @@
#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 ab49667..89e35ba 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 @@
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 a07f158..79dd9c9 100644
--- a/icu4c/source/test/intltest/dcfmtest.cpp
+++ b/icu4c/source/test/intltest/dcfmtest.cpp
@@ -83,11 +83,11 @@
{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 @@
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 5e04379..771a66e 100644
--- a/icu4c/source/test/intltest/dtfmrgts.cpp
+++ b/icu4c/source/test/intltest/dtfmrgts.cpp
@@ -1461,7 +1461,7 @@
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 8954094..47bdd76 100644
--- a/icu4c/source/test/intltest/dtfmttst.cpp
+++ b/icu4c/source/test/intltest/dtfmttst.cpp
@@ -4789,7 +4789,7 @@
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 6db4f8d..cc8d89a 100644
--- a/icu4c/source/test/intltest/idnaconf.cpp
+++ b/icu4c/source/test/intltest/idnaconf.cpp
@@ -173,7 +173,7 @@
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 f799617..7e31737 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 24beb6a..b551bf8 100644
--- a/icu4c/source/test/intltest/localebuildertest.cpp
+++ b/icu4c/source/test/intltest/localebuildertest.cpp
@@ -1228,7 +1228,7 @@
errln("setExtension('u', \"%s\") got Error: %s\n",
extension, u_errorName(status));
}
- };
+ }
}
void LocaleBuilderTest::TestSetExtensionValidateUIllFormed() {
@@ -1364,7 +1364,7 @@
errln("setExtension('t', \"%s\") got Error: %s\n",
extension, u_errorName(status));
}
- };
+ }
}
void LocaleBuilderTest::TestSetExtensionValidateTIllFormed() {
@@ -1469,7 +1469,7 @@
errln("setExtension('x', \"%s\") got Error: %s\n",
extension, u_errorName(status));
}
- };
+ }
}
void LocaleBuilderTest::TestSetExtensionValidatePUIllFormed() {
@@ -1558,7 +1558,7 @@
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 9e9b49b..d0ccfe0 100644
--- a/icu4c/source/test/intltest/numbertest_decimalquantity.cpp
+++ b/icu4c/source/test/intltest/numbertest_decimalquantity.cpp
@@ -18,7 +18,7 @@
}
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 6e1617a..9c6e084 100644
--- a/icu4c/source/test/intltest/numfmtst.cpp
+++ b/icu4c/source/test/intltest/numfmtst.cpp
@@ -322,7 +322,7 @@
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 fe244ba..3f6c4f1 100644
--- a/icu4c/source/test/intltest/numrgts.cpp
+++ b/icu4c/source/test/intltest/numrgts.cpp
@@ -998,7 +998,7 @@
if (failure(status, "NumberFormat::createInstance", Locale::getCanadaFrench(), TRUE)){
delete formatter;
return;
- };
+ }
tempString = formatter->format (-5789.9876, tempString);
if (tempString == expectedDefault) {
@@ -1132,7 +1132,7 @@
if (failure(status, "NumberFormat::createNumberInstance", TRUE)){
delete formatter;
return;
- };
+ }
tempString = formatter->format (-5789.9876, tempString);
if (tempString == expectedDefault) {
@@ -1942,7 +1942,7 @@
if (failure(status, "NumberFormat::createInstance", TRUE)){
delete nff;
return;
- };
+ }
DecimalFormat *nf = dynamic_cast<DecimalFormat *>(nff);
if(nf == NULL) {
errln("DecimalFormat needed to continue");
@@ -2185,7 +2185,7 @@
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 @@
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; i<DATA_length; ++i) {
@@ -2557,7 +2557,7 @@
if (failure(status, "createInstance", Locale::getUS(), TRUE)){
delete fmt;
return;
- };
+ }
fmt->setMaximumFractionDigits(2);
for (int i=0; i<D_length; i++) {
UnicodeString s;
@@ -2578,7 +2578,7 @@
if (failure(status, "createInstance", Locale::getUS(), TRUE)){
delete nf;
return;
- };
+ }
nf->setMinimumFractionDigits(1);
nf->setMaximumFractionDigits(1);
double a = -0.09;
@@ -2911,7 +2911,7 @@
if (failure(status, "NumberFormat::createInstance", TRUE)){
delete nf;
return;
- };
+ }
DecimalFormat *df = dynamic_cast<DecimalFormat *>(nf);
if(df == NULL) {
errln("DecimalFormat needed to continue");
@@ -3025,7 +3025,6 @@
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 75bc094..0f619d0 100644
--- a/icu4c/source/test/intltest/pptest.cpp
+++ b/icu4c/source/test/intltest/pptest.cpp
@@ -182,7 +182,7 @@
if (failure(status, "NumberFormat::createInstance", TRUE)){
delete nf;
return;
- };
+ }
DecimalFormat *fmt = dynamic_cast<DecimalFormat *>(nf);
if(fmt == NULL) {
diff --git a/icu4c/source/test/intltest/rbbiapts.cpp b/icu4c/source/test/intltest/rbbiapts.cpp
index 5d8ea00..f78bfc9 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 @@
__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 852cc79..7504d4d 100644
--- a/icu4c/source/test/intltest/rbbitst.cpp
+++ b/icu4c/source/test/intltest/rbbitst.cpp
@@ -1237,7 +1237,7 @@
delete []retPtr;
retPtr = 0;
ulen = 0;
- };
+ }
return retPtr;
}
@@ -2033,7 +2033,7 @@
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 @@
//
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 41afea4..bcb5ce5 100644
--- a/icu4c/source/test/intltest/regextst.cpp
+++ b/icu4c/source/test/intltest/regextst.cpp
@@ -182,11 +182,11 @@
#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 @@
#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 @@
// 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 @@
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 5a68838..7cdea8a 100644
--- a/icu4c/source/test/intltest/ssearch.cpp
+++ b/icu4c/source/test/intltest/ssearch.cpp
@@ -201,7 +201,7 @@
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 bb94a09..35c326f 100644
--- a/icu4c/source/test/letest/letest.cpp
+++ b/icu4c/source/test/letest/letest.cpp
@@ -244,7 +244,7 @@
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 0a4ec3c..38df3ee 100644
--- a/icu4c/source/tools/genbrk/genbrk.cpp
+++ b/icu4c/source/tools/genbrk/genbrk.cpp
@@ -262,7 +262,7 @@
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 @@
if (U_FAILURE(status)) {
fprintf(stderr, "ucnv_toUChars: ICU Error \"%s\"\n", u_errorName(status));
exit(status);
- };
+ }
ucnv_close(conv);
@@ -296,7 +296,7 @@
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 1ac9ad3..9bc62bd 100644
--- a/icu4c/source/tools/gencfu/gencfu.cpp
+++ b/icu4c/source/tools/gencfu/gencfu.cpp
@@ -236,7 +236,7 @@
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 ac26d95..997b400 100644
--- a/icu4c/source/tools/genrb/derb.cpp
+++ b/icu4c/source/tools/genrb/derb.cpp
@@ -631,7 +631,7 @@
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 6e88c94..0f0e9c5 100644
--- a/icu4c/source/tools/toolutil/filetools.cpp
+++ b/icu4c/source/tools/toolutil/filetools.cpp
@@ -65,7 +65,7 @@
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 1ca111c..a9650cc 100644
--- a/icu4c/source/tools/toolutil/xmlparser.cpp
+++ b/icu4c/source/tools/toolutil/xmlparser.cpp
@@ -313,7 +313,7 @@
// reached end of file, convert once more to flush the converter
flush=TRUE;
}
- };
+ }
exit:
ucnv_close(cnv);