mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-05 21:45:37 +00:00
ICU-10048 Fix some compiler warnings in ICU4C.
X-SVN-Rev: 33444
This commit is contained in:
parent
18c9009232
commit
ae4350661b
32 changed files with 138 additions and 58 deletions
|
@ -1748,7 +1748,7 @@ TimeZoneFormat::parseOffsetFieldsWithPattern(const UnicodeString& text, int32_t
|
|||
int32_t idx = start;
|
||||
|
||||
for (int32_t i = 0; i < patternItems->size(); i++) {
|
||||
int32_t len;
|
||||
int32_t len = 0;
|
||||
const GMTOffsetField* field = (const GMTOffsetField*)patternItems->elementAt(i);
|
||||
GMTOffsetField::FieldType fieldType = field->getType();
|
||||
if (fieldType == GMTOffsetField::TEXT) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
**********************************************************************
|
||||
* Copyright (C) 2002-2010, International Business Machines
|
||||
* Copyright (C) 2002-2013, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
**********************************************************************
|
||||
*/
|
||||
|
@ -332,6 +332,8 @@ ParagraphLayout::ParagraphLayout(const LEUnicode chars[], le_int32 count,
|
|||
return;
|
||||
}
|
||||
|
||||
(void)fVertical; // Suppress warning for unused field fVertical.
|
||||
|
||||
// FIXME: should check the limit arrays for consistency...
|
||||
|
||||
computeLevels(paragraphLevel);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
*
|
||||
* (C) Copyright IBM Corp. 1998-2008 - All Rights Reserved
|
||||
* (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -311,7 +311,6 @@ private:
|
|||
inline ULocRuns(const ULocRuns &other);
|
||||
inline ULocRuns &operator=(const ULocRuns & /*other*/) { return *this; };
|
||||
const char **fLocaleNames;
|
||||
Locale **fLocalesCopy;
|
||||
};
|
||||
|
||||
inline ULocRuns::ULocRuns()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/********************************************************************
|
||||
* COPYRIGHT:
|
||||
* Copyright (c) 1997-2012, International Business Machines Corporation and
|
||||
* Copyright (c) 1997-2013, International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
********************************************************************/
|
||||
/*******************************************************************************
|
||||
|
@ -398,6 +398,7 @@ static void doTestVariant(UCollator* myCollation, const UChar source[], const UC
|
|||
|
||||
sortklenmax = (sortklen1>sortklen2?sortklen1:sortklen2);
|
||||
sortklenmin = (sortklen1<sortklen2?sortklen1:sortklen2);
|
||||
(void)sortklenmin; /* Suppress set but not used warning. */
|
||||
|
||||
sortKey1 =(uint8_t*)malloc(sizeof(uint8_t) * (sortklenmax+1));
|
||||
sortKey1a=(uint8_t*)malloc(sizeof(uint8_t) * (sortklenmax+1));
|
||||
|
@ -900,6 +901,7 @@ static void TestJB581(void)
|
|||
}
|
||||
/* Now, do the same comparison with keys */
|
||||
sourceKeyOut = ucol_getSortKey(myCollator, source, -1, sourceKeyArray, 100);
|
||||
(void)sourceKeyOut; /* Suppress set but not used warning. */
|
||||
targetKeyOut = ucol_getSortKey(myCollator, target, -1, targetKeyArray, 100);
|
||||
bufferLen = ((targetKeyOut > 100) ? 100 : targetKeyOut);
|
||||
if (memcmp(sourceKeyArray, targetKeyArray, bufferLen) != 0)
|
||||
|
@ -1190,6 +1192,7 @@ TestInvalidRules(){
|
|||
u_memset(parseError.postContext,0x0000,U_PARSE_CONTEXT_LEN);
|
||||
/* open the rules and test */
|
||||
coll = ucol_openRules(rules,u_strlen(rules),UCOL_OFF,UCOL_DEFAULT_STRENGTH,&parseError,&status);
|
||||
(void)coll; /* Suppress set but not used warning. */
|
||||
if(u_strcmp(parseError.preContext,preContextExp)!=0){
|
||||
log_err_status(status, "preContext in UParseError for ucol_openRules does not match\n");
|
||||
}
|
||||
|
|
|
@ -951,6 +951,7 @@ void TestOpenVsOpenRules(){
|
|||
uset_addRange(stdSet, 0x41, 0x5A);
|
||||
uset_addRange(stdSet, 0x30, 0x39);
|
||||
sizeOfStdSet = uset_size(stdSet);
|
||||
(void)sizeOfStdSet; /* Suppress set but not used warning. */
|
||||
|
||||
adder = 1;
|
||||
if(getTestOption(QUICK_OPTION))
|
||||
|
@ -1301,6 +1302,7 @@ void TestElemIter()
|
|||
else{ log_verbose("PASS: Default collationElement iterator3 creation passed\n");}
|
||||
|
||||
offset=ucol_getOffset(iterator1);
|
||||
(void)offset; /* Suppress set but not used warning. */
|
||||
ucol_setOffset(iterator1, 6, &status);
|
||||
if (U_FAILURE(status)) {
|
||||
log_err("Error in setOffset for UCollatorElements iterator.: %s\n", myErrorName(status));
|
||||
|
@ -1599,6 +1601,8 @@ void TestBounds() {
|
|||
for(j = i+1; j < arraySize; j++) {
|
||||
lowerSize = ucol_getBound(tests[i].key, -1, UCOL_BOUND_LOWER, 1, lower, 512, &status);
|
||||
upperSize = ucol_getBound(tests[j].key, -1, UCOL_BOUND_UPPER, 1, upper, 512, &status);
|
||||
(void)lowerSize; /* Suppress set but not used warning. */
|
||||
(void)upperSize;
|
||||
for(k = i; k <= j; k++) {
|
||||
if(strcmp((const char *)lower, (const char *)tests[k].key) > 0) {
|
||||
log_err("Problem with lower! j = %i (%s vs %s)\n", k, tests[k].original, tests[i].original);
|
||||
|
@ -2201,6 +2205,7 @@ TestGetContractionsAndUnsafes(void)
|
|||
}
|
||||
|
||||
noConts = ucol_getUnsafeSet(coll, conts, &status);
|
||||
(void)noConts; /* Suppress set but not used warning */
|
||||
doSetsTest(tests[i].locale, conts, set, tests[i].unsafeCodeUnits, tests[i].safeCodeUnits, &status);
|
||||
setLen = uset_toPattern(conts, buffer, setBufferLen, TRUE, &status);
|
||||
if(U_SUCCESS(status)) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/********************************************************************
|
||||
* COPYRIGHT:
|
||||
* Copyright (c) 1997-2012, International Business Machines Corporation and
|
||||
* Copyright (c) 1997-2013, International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
********************************************************************/
|
||||
/********************************************************************************
|
||||
|
@ -198,6 +198,9 @@ static void TestBreakIteratorCAPI()
|
|||
}
|
||||
/*trying to open an illegal iterator*/
|
||||
bogus = ubrk_open((UBreakIteratorType)5, "en_US", text, u_strlen(text), &status);
|
||||
if(bogus != NULL) {
|
||||
log_err("FAIL: expected NULL from opening an invalid break iterator.\n");
|
||||
}
|
||||
if(U_SUCCESS(status)){
|
||||
log_err("FAIL: Error in ubrk_open() for BOGUS breakiterator. Expected U_ILLEGAL_ARGUMENT_ERROR\n");
|
||||
}
|
||||
|
|
|
@ -586,6 +586,7 @@ static void TestGetSetDateAPI()
|
|||
/*testing ucal_setTimeZone() and ucal_getTimeZoneID function*/
|
||||
log_verbose("\nTesting if the function ucal_setTimeZone() and ucal_getTimeZoneID work fine\n");
|
||||
idLen = ucal_getTimeZoneID(caldef2, id, sizeof(id)/sizeof(id[0]), &status);
|
||||
(void)idLen; /* Suppress set but not used warning. */
|
||||
if (U_FAILURE(status)) {
|
||||
log_err("Error in getTimeZoneID : %s\n", u_errorName(status));
|
||||
} else if (u_strcmp(id, fgGMTID) != 0) {
|
||||
|
@ -747,8 +748,9 @@ static void TestFieldGetSet()
|
|||
UCalendar *cal = 0;
|
||||
UChar tzID[4];
|
||||
UDateFormat *datdef = 0;
|
||||
UDate d1;
|
||||
UDate d1 = 0;
|
||||
UErrorCode status=U_ZERO_ERROR;
|
||||
(void)d1; /* Suppress set but not used warning. */
|
||||
log_verbose("\nFetching pointer to UCalendar using the ucal_open()\n");
|
||||
u_strcpy(tzID, fgGMTID);
|
||||
/*open the calendar used */
|
||||
|
@ -2296,6 +2298,7 @@ void TestGetTZTransition() {
|
|||
ucal_setTimeZone(ucal, itemPtr->zoneName, -1, &status);
|
||||
ucal_setDateTime(ucal, itemPtr->year, itemPtr->month, itemPtr->day, 12, 0, 0, &status);
|
||||
curMillis = ucal_getMillis(ucal, &status);
|
||||
(void)curMillis; /* Suppress set but not used warning. */
|
||||
if ( U_SUCCESS(status) ) {
|
||||
UDate transition1, transition2;
|
||||
UBool result;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/********************************************************************
|
||||
* COPYRIGHT:
|
||||
* Copyright (c) 1997-2012, International Business Machines Corporation and
|
||||
* Copyright (c) 1997-2013, International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
********************************************************************/
|
||||
/*****************************************************************************
|
||||
|
@ -253,7 +253,6 @@ static void TestConvert()
|
|||
UChar* my_ucs_file_buffer; /* [MAX_FILE_LEN] */
|
||||
UChar* my_ucs_file_buffer_1;
|
||||
int8_t ii = 0;
|
||||
int32_t j = 0;
|
||||
uint16_t codepage_index = 0;
|
||||
int32_t cp = 0;
|
||||
UErrorCode err = U_ZERO_ERROR;
|
||||
|
@ -969,7 +968,6 @@ static void TestConvert()
|
|||
|
||||
/*testing for ucnv_fromUnicode() and ucnv_toUnicode() */
|
||||
/*Clean up re-usable vars*/
|
||||
j=0;
|
||||
log_verbose("Testing ucnv_fromUnicode().....\n");
|
||||
tmp_ucs_buf=ucs_file_buffer_use;
|
||||
ucnv_fromUnicode(myConverter, &mytarget_1,
|
||||
|
@ -980,6 +978,7 @@ static void TestConvert()
|
|||
TRUE,
|
||||
&err);
|
||||
consumedUni = (UChar*)tmp_consumedUni;
|
||||
(void)consumedUni; /* Suppress set but not used warning. */
|
||||
|
||||
if (U_FAILURE(err))
|
||||
{
|
||||
|
@ -2538,6 +2537,7 @@ static void testFromTruncatedUTF8(UConverter *utf8Cnv, UConverter *cnv, const ch
|
|||
TRUE, TRUE, /* reset & flush */
|
||||
&errorCode);
|
||||
outputLength=(int32_t)(target-output);
|
||||
(void)outputLength; /* Suppress set but not used warning. */
|
||||
if(errorCode!=U_TRUNCATED_CHAR_FOUND || pivotSource!=pivotBuffer) {
|
||||
log_err("unexpected error %s from %s badUTF8[%ld]\n", u_errorName(errorCode), converterName, (long)i);
|
||||
continue;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/********************************************************************
|
||||
* COPYRIGHT:
|
||||
* Copyright (c) 1997-2012, International Business Machines Corporation and
|
||||
* Copyright (c) 1997-2013, International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
********************************************************************/
|
||||
/********************************************************************************
|
||||
|
@ -298,6 +298,7 @@ void Test4060212()
|
|||
return;
|
||||
}
|
||||
myString = myFormatit(fmt, myDate);
|
||||
(void)myString; /* Suppress set but not used warning. */
|
||||
cal=ucal_open(tzID, u_strlen(tzID), "en_US", UCAL_GREGORIAN, &status);
|
||||
if(U_FAILURE(status)){
|
||||
log_err("FAIL: error in ucal_open caldef : %s\n", myErrorName(status));
|
||||
|
@ -343,6 +344,7 @@ void Test4061287()
|
|||
log_err("setLenient nor working\n");
|
||||
ok = FALSE;
|
||||
myDate = udat_parse(df, dateString, u_strlen(dateString), &pos, &status);
|
||||
(void)myDate; /* Suppress set but not used warning. */
|
||||
if(U_FAILURE(status))
|
||||
ok = TRUE;
|
||||
if(ok!=TRUE)
|
||||
|
@ -455,6 +457,7 @@ void Test4162071()
|
|||
}
|
||||
pos=0;
|
||||
x = udat_parse(df, datestr, u_strlen(datestr), &pos, &status);
|
||||
(void)x; /* Suppress set but not used warning. */
|
||||
if(U_FAILURE(status)){
|
||||
log_data_err("ERROR : parse format %s fails : %s\n", austrdup(format), myErrorName(status));
|
||||
}
|
||||
|
@ -572,6 +575,7 @@ void Test_GEec(void)
|
|||
|
||||
udat_applyPattern(dtfmt, FALSE, patTextPtr->pattern, -1);
|
||||
dmyGnTextLen = udat_format(dtfmt, july022008, dmyGnText, DATE_TEXT_MAX_CHARS, NULL, &status);
|
||||
(void)dmyGnTextLen; /* Suppress set but not used warning. */
|
||||
if ( U_FAILURE(status) ) {
|
||||
log_err("FAIL: udat_format with %s: %s\n", patTextPtr->label, myErrorName(status) );
|
||||
status = U_ZERO_ERROR;
|
||||
|
|
|
@ -862,6 +862,7 @@ static void TestMaxExpansion()
|
|||
}
|
||||
|
||||
U16_APPEND(supplementary, stringOffset, 2, unassigned, isError);
|
||||
(void)isError; /* Suppress set but not used warning. */
|
||||
ucol_setText(iter, supplementary, 2, &status);
|
||||
sorder = ucol_previous(iter, &status);
|
||||
|
||||
|
@ -1768,6 +1769,14 @@ static void TestCEValidity()
|
|||
UColTokenParser src;
|
||||
uint32_t strength = 0;
|
||||
uint16_t specs = 0;
|
||||
|
||||
(void)specs; /* Suppress set but not used warnings. */
|
||||
(void)strength;
|
||||
(void)prefixLen;
|
||||
(void)prefixOffset;
|
||||
(void)exLen;
|
||||
(void)exOffset;
|
||||
|
||||
if(getTestOption(QUICK_OPTION)) {
|
||||
loc = locale[count];
|
||||
} else {
|
||||
|
@ -1983,6 +1992,13 @@ static void TestSortKeyValidity(void)
|
|||
uint16_t specs = 0;
|
||||
status = U_ZERO_ERROR; // clear status from previous loop iteration
|
||||
|
||||
(void)specs;
|
||||
(void)strength;
|
||||
(void)prefixLen;
|
||||
(void)prefixOffset;
|
||||
(void)exLen;
|
||||
(void)exOffset;
|
||||
|
||||
uprv_memset(&src, 0, sizeof(UColTokenParser));
|
||||
|
||||
coll = ucol_open(locale[count], &status);
|
||||
|
|
|
@ -1667,6 +1667,7 @@ static void TestKeywordVariants(void)
|
|||
uenum_close(keywords);
|
||||
}
|
||||
resultLen = uloc_getName(testCases[i].localeID, buffer, 256, &status);
|
||||
(void)resultLen; /* Suppress set but not used warning. */
|
||||
if (uprv_strcmp(testCases[i].expectedLocaleID, buffer) != 0) {
|
||||
log_err("Expected uloc_getName(\"%s\") => \"%s\"; got \"%s\"\n",
|
||||
testCases[i].localeID, testCases[i].expectedLocaleID, buffer);
|
||||
|
@ -1702,6 +1703,7 @@ static void TestKeywordVariantParsing(void)
|
|||
for(i = 0; i < sizeof(testCases)/sizeof(testCases[0]); i++) {
|
||||
*buffer = 0;
|
||||
resultLen = uloc_getKeywordValue(testCases[i].localeID, testCases[i].keyword, buffer, 256, &status);
|
||||
(void)resultLen; /* Suppress set but not used warning. */
|
||||
if(uprv_strcmp(testCases[i].expectedValue, buffer) != 0) {
|
||||
log_err("Expected to extract \"%s\" from \"%s\" for keyword \"%s\". Got \"%s\" instead\n",
|
||||
testCases[i].expectedValue, testCases[i].localeID, testCases[i].keyword, buffer);
|
||||
|
@ -2266,6 +2268,7 @@ static void TestGetBaseName(void) {
|
|||
|
||||
for(i = 0; i < sizeof(testCases)/sizeof(testCases[0]); i++) {
|
||||
baseNameLen = uloc_getBaseName(testCases[i].localeID, baseName, 256, &status);
|
||||
(void)baseNameLen; /* Suppress set but not used warning. */
|
||||
if(strcmp(testCases[i].baseName, baseName)) {
|
||||
log_err("For locale \"%s\" expected baseName \"%s\", but got \"%s\"\n",
|
||||
testCases[i].localeID, testCases[i].baseName, baseName);
|
||||
|
@ -2302,6 +2305,7 @@ static void TestDisplayNameWarning(void) {
|
|||
UErrorCode status = U_ZERO_ERROR;
|
||||
|
||||
size = uloc_getDisplayLanguage("qqq", "kl", name, sizeof(name)/sizeof(name[0]), &status);
|
||||
(void)size; /* Suppress set but not used warning. */
|
||||
if (status != U_USING_DEFAULT_WARNING) {
|
||||
log_err("For language \"qqq\" in locale \"kl\", expecting U_USING_DEFAULT_WARNING, but got %s\n",
|
||||
u_errorName(status));
|
||||
|
@ -2643,6 +2647,7 @@ static void TestAcceptLanguage(void) {
|
|||
available = ures_openAvailableLocales(tests[i].icuSet, &status);
|
||||
tmp[0]=0;
|
||||
rc = uloc_acceptLanguageFromHTTP(tmp, 199, &outResult, http[tests[i].httpSet], available, &status);
|
||||
(void)rc; /* Suppress set but not used warning. */
|
||||
uenum_close(available);
|
||||
log_verbose(" got %s, %s [%s]\n", tmp[0]?tmp:"(EMPTY)", acceptResult(outResult), u_errorName(status));
|
||||
if(outResult != tests[i].res) {
|
||||
|
@ -5650,6 +5655,7 @@ static void TestToLanguageTag(void) {
|
|||
expected = locale_to_langtag[i][1];
|
||||
|
||||
len = uloc_toLanguageTag(inloc, langtag, sizeof(langtag), FALSE, &status);
|
||||
(void)len; /* Suppress set but not used warning. */
|
||||
if (U_FAILURE(status)) {
|
||||
if (expected != NULL) {
|
||||
log_err("Error returned by uloc_toLanguageTag for locale id [%s] - error: %s\n",
|
||||
|
|
|
@ -582,6 +582,7 @@ static void testCollator(UCollator *coll, UErrorCode *status) {
|
|||
|
||||
startOfRules = FALSE;
|
||||
varT = (UBool)((specs & UCOL_TOK_VARIABLE_TOP) != 0);
|
||||
(void)varT; /* Suppress set but not used warning. */
|
||||
top_ = (UBool)((specs & UCOL_TOK_TOP) != 0);
|
||||
if(top_) { /* if reset is on top, the sequence is broken. We should have an empty string */
|
||||
second[0] = 0;
|
||||
|
@ -937,6 +938,12 @@ static void testAgainstUCA(UCollator *coll, UCollator *UCA, const char *refName,
|
|||
uint32_t Windiff = 1;
|
||||
UParseError parseError;
|
||||
|
||||
(void)top_; /* Suppress set but not used warnings. */
|
||||
(void)varT;
|
||||
(void)secondLen;
|
||||
(void)prefixLen;
|
||||
(void)prefixOffset;
|
||||
|
||||
uprv_memset(&src, 0, sizeof(UColTokenParser));
|
||||
src.opts = &opts;
|
||||
|
||||
|
@ -1112,6 +1119,12 @@ static void testCEs(UCollator *coll, UErrorCode *status) {
|
|||
const char *colLoc;
|
||||
UCollator *UCA = ucol_open("root", status);
|
||||
|
||||
(void)varT; /* Suppress set but not used warnings. */
|
||||
(void)prefixLen;
|
||||
(void)prefixOffset;
|
||||
(void)exLen;
|
||||
(void)exOffset;
|
||||
|
||||
if (U_FAILURE(*status)) {
|
||||
log_err("Could not open root collator %s\n", u_errorName(*status));
|
||||
uprv_delete_collIterate(c);
|
||||
|
@ -2583,6 +2596,7 @@ static void TestCompressOverlap(void) {
|
|||
with correct overlapping compression, secstr should have 4 secondary
|
||||
bytes, tertstr should have > 2 tertiary bytes */
|
||||
resultlen = ucol_getSortKey(coll, secstr, 150, (uint8_t *)result, 250);
|
||||
(void)resultlen; /* Suppress set but not used warning. */
|
||||
tempptr = uprv_strchr(result, 1) + 1;
|
||||
while (*(tempptr + 1) != 1) {
|
||||
/* the last secondary collation element is not checked since it is not
|
||||
|
@ -2954,6 +2968,7 @@ static void TestBocsuCoverage(void) {
|
|||
ucol_setAttribute(coll, UCOL_STRENGTH, UCOL_IDENTICAL, &status);
|
||||
|
||||
klen = ucol_getSortKey(coll, test, tlen, key, 256);
|
||||
(void)klen; /* Suppress set but not used warning. */
|
||||
|
||||
ucol_close(coll);
|
||||
} else {
|
||||
|
@ -2995,6 +3010,10 @@ static void TestVariableTopSetting(void) {
|
|||
UParseError parseError;
|
||||
int32_t myQ = getTestOption(QUICK_OPTION);
|
||||
|
||||
(void)prefixLen; /* Suppress set but not used warnings. */
|
||||
(void)prefixOffset;
|
||||
(void)specs;
|
||||
|
||||
uprv_memset(&src, 0, sizeof(UColTokenParser));
|
||||
|
||||
src.opts = &opts;
|
||||
|
@ -3050,6 +3069,7 @@ static void TestVariableTopSetting(void) {
|
|||
uprv_init_collIterate(coll, src.source+oldChOffset, oldChLen, s, &collIterateStatus);
|
||||
|
||||
CE = ucol_getNextCE(coll, s, &status);
|
||||
(void)CE; /* Suppress set but not used warning. */
|
||||
|
||||
for(i = 0; i < oldChLen; i++) {
|
||||
j = sprintf(buf, "%04X ", *(src.source+oldChOffset+i));
|
||||
|
@ -3901,6 +3921,8 @@ static void Alexis2(void) {
|
|||
|
||||
U16BELenS = ucnv_fromUChars(conv, U16BESource, CMSCOLL_ALEXIS2_BUFFER_SIZE, U16Source, U16LenS, &status);
|
||||
U16BELenT = ucnv_fromUChars(conv, U16BETarget, CMSCOLL_ALEXIS2_BUFFER_SIZE, U16Target, U16LenT, &status);
|
||||
(void)U16BELenS; /* Suppress set but not used warnings. */
|
||||
(void)U16BELenT;
|
||||
|
||||
/* use the original sizes, as the result from converter is in bytes */
|
||||
uiter_setUTF16BE(&U16BEItS, U16BESource, U16LenS);
|
||||
|
@ -3999,6 +4021,7 @@ static void TestPartialSortKeyTermination(void) {
|
|||
length = u_unescape(cases[i], currCase, 256);
|
||||
uiter_setString(&iter, currCase, length);
|
||||
pKeyLen = ucol_nextSortKeyPart(coll, &iter, state, key, 256, &status);
|
||||
(void)pKeyLen; /* Suppress set but not used warning. */
|
||||
|
||||
log_verbose("Done\n");
|
||||
|
||||
|
@ -4430,6 +4453,8 @@ static void TestImplicitGeneration(void) {
|
|||
currentBottom = current & bottomByte;
|
||||
lastTop = last & topByte;
|
||||
currentTop = current & topByte;
|
||||
(void)lastBottom; /* Suppress set but not used warnings. */
|
||||
(void)currentBottom;
|
||||
|
||||
/* print out some values for spot-checking*/
|
||||
if (lastTop != currentTop || i == 0x10000 || i == 0x110000) {
|
||||
|
@ -4519,6 +4544,7 @@ static void TestSeparateTrees(void) {
|
|||
assertSuccess("ucol_openAvailableLocales", &ec);
|
||||
assertTrue("ucol_openAvailableLocales!=0", e!=0);
|
||||
n = checkUEnumeration("ucol_openAvailableLocales", e, AVAIL, LEN(AVAIL));
|
||||
(void)n; /* Suppress set but not used warnings. */
|
||||
/* Don't need to check n because we check list */
|
||||
uenum_close(e);
|
||||
} else {
|
||||
|
@ -5838,6 +5864,7 @@ static void TestInvalidListsAndRanges(void)
|
|||
return;
|
||||
}
|
||||
myCollation = ucol_openRules(rule, length, UCOL_ON, UCOL_TERTIARY, &parse_error, &status);
|
||||
(void)myCollation; /* Suppress set but not used warning. */
|
||||
if(!U_FAILURE(status)){
|
||||
log_err("ERROR: Could not cause a failure as expected: \n");
|
||||
}
|
||||
|
@ -5876,6 +5903,8 @@ static void TestBeforeRuleWithScriptReordering(void)
|
|||
|
||||
log_verbose("Testing the &[before 1] rule with [reorder grek]\n");
|
||||
|
||||
(void)beforeKeyLength; /* Suppress set but not used warnings. */
|
||||
(void)baseKeyLength;
|
||||
|
||||
/* build collator */
|
||||
log_verbose("Testing the &[before 1] rule with [scriptReorder grek]\n");
|
||||
|
@ -6838,6 +6867,7 @@ static void TestImport(void)
|
|||
for (; start <= end; start++){
|
||||
k = 0;
|
||||
U16_APPEND(str, k, 500, start, b);
|
||||
(void)b; /* Suppress set but not used warning. */
|
||||
ucol_getSortKey(viescoll, str, 1, sk1, 500);
|
||||
ucol_getSortKey(importviescoll, str, 1, sk2, 500);
|
||||
if(compare_uint8_t_arrays(sk1, sk2) != 0){
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/********************************************************************
|
||||
* COPYRIGHT:
|
||||
* Copyright (c) 1997-2012, International Business Machines Corporation and
|
||||
* Copyright (c) 1997-2013, International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
********************************************************************
|
||||
*
|
||||
|
@ -1001,6 +1001,7 @@ static void TestJ904(void) {
|
|||
result, 256, &status,
|
||||
string, 1/7.0,
|
||||
789.0+1000*(56+60*(34+60*12)));
|
||||
(void)length; /* Suppress set but not used warning. */
|
||||
|
||||
u_austrncpy(cresult, result, sizeof(cresult));
|
||||
|
||||
|
|
|
@ -132,9 +132,9 @@ static void TestUSpoofCAPI(void) {
|
|||
const char *dataSrcDir;
|
||||
char *fileName;
|
||||
char *confusables;
|
||||
int confusablesLength;
|
||||
int confusablesLength = 0;
|
||||
char *confusablesWholeScript;
|
||||
int confusablesWholeScriptLength;
|
||||
int confusablesWholeScriptLength = 0;
|
||||
FILE *f;
|
||||
UParseError pe;
|
||||
int32_t errType;
|
||||
|
@ -148,8 +148,8 @@ static void TestUSpoofCAPI(void) {
|
|||
TEST_ASSERT_NE(f, NULL);
|
||||
confusables = malloc(3000000);
|
||||
if (f != NULL) {
|
||||
confusablesLength = fread(confusables, 1, 3000000, f);
|
||||
fclose(f);
|
||||
confusablesLength = fread(confusables, 1, 3000000, f);
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
strcpy(fileName, dataSrcDir);
|
||||
|
@ -158,8 +158,8 @@ static void TestUSpoofCAPI(void) {
|
|||
TEST_ASSERT_NE(f, NULL);
|
||||
confusablesWholeScript = malloc(1000000);
|
||||
if (f != NULL) {
|
||||
confusablesWholeScriptLength = fread(confusablesWholeScript, 1, 1000000, f);
|
||||
fclose(f);
|
||||
confusablesWholeScriptLength = fread(confusablesWholeScript, 1, 1000000, f);
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
rsc = uspoof_openFromSource(confusables, confusablesLength,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/********************************************************************
|
||||
* COPYRIGHT:
|
||||
* Copyright (c) 1998-2012, International Business Machines Corporation and
|
||||
* Copyright (c) 1998-2013, International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
********************************************************************/
|
||||
/*
|
||||
|
@ -1096,7 +1096,7 @@ static void TestICUDataName()
|
|||
switch(U_CHARSET_FAMILY)
|
||||
{
|
||||
case U_ASCII_FAMILY:
|
||||
switch(U_IS_BIG_ENDIAN)
|
||||
switch((int)U_IS_BIG_ENDIAN)
|
||||
{
|
||||
case 1:
|
||||
typeChar = 'b';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/********************************************************************
|
||||
* COPYRIGHT:
|
||||
* Copyright (c) 1997-2012, International Business Machines Corporation and
|
||||
* Copyright (c) 1997-2013, International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
********************************************************************/
|
||||
//===============================================================================
|
||||
|
@ -1772,6 +1772,9 @@ void CollationAPITest::TestBounds(void) {
|
|||
int32_t i = 0, j = 0, k = 0, buffSize = 0, skSize = 0, lowerSize = 0, upperSize = 0;
|
||||
int32_t arraySize = sizeof(tests)/sizeof(tests[0]);
|
||||
|
||||
(void)lowerSize; // Suppress unused variable warnings.
|
||||
(void)upperSize;
|
||||
|
||||
for(i = 0; i<arraySize; i++) {
|
||||
buffSize = u_unescape(tests[i].original, buffer, 512);
|
||||
skSize = coll->getSortKey(buffer, buffSize, tests[i].key, 512);
|
||||
|
@ -2053,7 +2056,7 @@ Locale TestCollator::getLocale(ULocDataLocaleType type, UErrorCode& status) cons
|
|||
{
|
||||
// api not used, this is to make the compiler happy
|
||||
if (U_FAILURE(status)) {
|
||||
type = ULOC_DATA_LOCALE_TYPE_LIMIT;
|
||||
(void)type;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -2066,7 +2069,7 @@ Collator::ECollationStrength TestCollator::getStrength() const
|
|||
void TestCollator::setStrength(Collator::ECollationStrength newStrength)
|
||||
{
|
||||
// api not used, this is to make the compiler happy
|
||||
newStrength = TERTIARY;
|
||||
(void)newStrength;
|
||||
}
|
||||
|
||||
UClassID TestCollator::getDynamicClassID(void) const
|
||||
|
@ -2080,14 +2083,9 @@ void TestCollator::getVersion(UVersionInfo info) const
|
|||
memset(info, 0, U_MAX_VERSION_LENGTH);
|
||||
}
|
||||
|
||||
void TestCollator::setAttribute(UColAttribute attr, UColAttributeValue value,
|
||||
UErrorCode &status)
|
||||
void TestCollator::setAttribute(UColAttribute /*attr*/, UColAttributeValue /*value*/,
|
||||
UErrorCode & /*status*/)
|
||||
{
|
||||
// api not used, this is to make the compiler happy
|
||||
if (U_FAILURE(status)) {
|
||||
attr = UCOL_ATTRIBUTE_COUNT;
|
||||
value = UCOL_OFF;
|
||||
}
|
||||
}
|
||||
|
||||
UColAttributeValue TestCollator::getAttribute(UColAttribute attr,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/********************************************************************
|
||||
* COPYRIGHT:
|
||||
* Copyright (c) 1997-2010,2012, International Business Machines Corporation and
|
||||
* Copyright (c) 1997-2013 International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
********************************************************************/
|
||||
|
||||
|
@ -114,6 +114,7 @@ void DataDrivenFormatTest::testConvertDate(TestData *testData,
|
|||
DateTimeStyleSet styleSet;
|
||||
UnicodeString pattern;
|
||||
UBool usePattern = FALSE;
|
||||
(void)usePattern; // Suppress unused warning.
|
||||
CalendarFieldsSet fromSet;
|
||||
UDate fromDate = 0;
|
||||
UBool useDate = FALSE;
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
#include "unicode/parseerr.h"
|
||||
#include "unicode/currpinf.h"
|
||||
|
||||
#define LENGTHOF(array) ((int32_t)(sizeof(array)/sizeof((array)[0])))
|
||||
|
||||
// This is an API test, not a unit test. It doesn't test very many cases, and doesn't
|
||||
// try to test the full functionality. It just calls each function in the class and
|
||||
// verifies that it works on a basic level.
|
||||
|
@ -519,7 +521,7 @@ void IntlTestDecimalFormatAPI::TestScale()
|
|||
typedef struct TestData {
|
||||
double inputValue;
|
||||
int inputScale;
|
||||
char *expectedOutput;
|
||||
const char *expectedOutput;
|
||||
} TestData;
|
||||
|
||||
static TestData testData[] = {
|
||||
|
@ -545,7 +547,7 @@ void IntlTestDecimalFormatAPI::TestScale()
|
|||
UnicodeString percentPattern("#,##0%");
|
||||
pat.setMaximumFractionDigits(4);
|
||||
|
||||
for(int32_t i=0;i < sizeof(testData)/sizeof(testData[0]);i++) {
|
||||
for(int32_t i=0; i < LENGTHOF(testData); i++) {
|
||||
if ( i > 2 ) {
|
||||
pat.applyPattern(percentPattern,status);
|
||||
}
|
||||
|
|
|
@ -343,7 +343,8 @@ void IntlTestDateTimePatternGeneratorAPI::testAPI(/*char *par*/)
|
|||
UnicodeString newDateTimeFormat("{1} {0}");
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
UnicodeString conflictingPattern;
|
||||
UDateTimePatternConflict conflictingStatus;
|
||||
UDateTimePatternConflict conflictingStatus = UDATPG_NO_CONFLICT;
|
||||
(void)conflictingStatus; // Suppress set but not used warning.
|
||||
|
||||
// ======= Test CreateInstance with default locale
|
||||
logln("Testing DateTimePatternGenerator createInstance from default locale");
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2001-2012, International Business Machines Corporation and
|
||||
* Copyright (C) 2001-2013, International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
@ -950,11 +950,10 @@ ICUServiceTest::testRBF()
|
|||
|
||||
class SimpleListener : public ServiceListener {
|
||||
ICUServiceTest* _test;
|
||||
int32_t _n;
|
||||
UnicodeString _name;
|
||||
|
||||
public:
|
||||
SimpleListener(ICUServiceTest* test, const UnicodeString& name) : _test(test), _n(0), _name(name) {}
|
||||
SimpleListener(ICUServiceTest* test, const UnicodeString& name) : _test(test), _name(name) {}
|
||||
|
||||
virtual void serviceChanged(const ICUService& service) const {
|
||||
UnicodeString serviceName = "listener ";
|
||||
|
|
|
@ -1204,7 +1204,6 @@ main(int argc, char* argv[])
|
|||
fprintf(stdout, "### Too many properties. Exiting.\n");
|
||||
}
|
||||
|
||||
UBool all_tests_exist = TRUE;
|
||||
MajorTestLevel major;
|
||||
major.setVerbose( verbose );
|
||||
major.setNoErrMsg( no_err_msg );
|
||||
|
@ -1374,7 +1373,6 @@ main(int argc, char* argv[])
|
|||
}
|
||||
if (!res || (execCount <= 0)) {
|
||||
fprintf(stdout, "\n---ERROR: Test doesn't exist: %s!\n", name);
|
||||
all_tests_exist = FALSE;
|
||||
}
|
||||
} else if(!strcmp(argv[i],"-x")) {
|
||||
i++;
|
||||
|
|
|
@ -1714,6 +1714,7 @@ LocaleTest::TestKeywordVariantParsing(void) {
|
|||
*buffer = 0;
|
||||
Locale l(testCases[i].localeID);
|
||||
resultLen = l.getKeywordValue(testCases[i].keyword, buffer, 256, status);
|
||||
(void)resultLen; // Suppress unused variable warning.
|
||||
if(uprv_strcmp(testCases[i].expectedValue, buffer) != 0) {
|
||||
err("Expected to extract \"%s\" from \"%s\" for keyword \"%s\". Got \"%s\" instead\n",
|
||||
testCases[i].expectedValue, testCases[i].localeID, testCases[i].keyword, buffer);
|
||||
|
@ -1748,6 +1749,7 @@ LocaleTest::TestSetKeywordValue(void) {
|
|||
|
||||
*buffer = 0;
|
||||
resultLen = l.getKeywordValue(testCases[i].keyword, buffer, 256, status);
|
||||
(void)resultLen; // Suppress unused variable warning.
|
||||
if(uprv_strcmp(testCases[i].value, buffer) != 0) {
|
||||
err("Expected to extract \"%s\" for keyword \"%s\". Got \"%s\" instead\n",
|
||||
testCases[i].value, testCases[i].keyword, buffer);
|
||||
|
|
|
@ -726,6 +726,7 @@ NumberFormatTest::TestCurrency(void)
|
|||
s.truncate(0);
|
||||
char loc[256]={0};
|
||||
int len = uloc_canonicalize("de_DE_PREEURO", loc, 256, &status);
|
||||
(void)len; // Suppress unused variable warning.
|
||||
currencyFmt = NumberFormat::createCurrencyInstance(Locale(loc),status);
|
||||
currencyFmt->format(1.50, s);
|
||||
logln((UnicodeString)"Un pauvre en Allemagne a.." + s);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/***********************************************************************
|
||||
* Copyright (c) 1997-2012, International Business Machines Corporation
|
||||
* Copyright (c) 1997-2013, International Business Machines Corporation
|
||||
* and others. All Rights Reserved.
|
||||
***********************************************************************/
|
||||
|
||||
|
@ -906,6 +906,7 @@ void NumberFormatRegressionTest::Test4070798 (void)
|
|||
UErrorCode status = U_ZERO_ERROR;
|
||||
char loc[256]={0};
|
||||
int len = uloc_canonicalize("fr_FR_PREEURO", loc, 256, &status);
|
||||
(void)len; // Suppress set but not used warning.
|
||||
formatter = NumberFormat::createInstance(Locale(loc), status);
|
||||
if(U_FAILURE(status)) {
|
||||
dataerrln("Error creating DecimalFormat: %s", u_errorName(status));
|
||||
|
|
|
@ -1920,6 +1920,8 @@ int32_t RBBICharMonkey::next(int32_t prevPos) {
|
|||
p0 = p1 = p2 = p3 = prevPos;
|
||||
c3 = fText->char32At(prevPos);
|
||||
c0 = c1 = c2 = 0;
|
||||
(void)p0; // suppress set but not used warning.
|
||||
(void)c0;
|
||||
|
||||
// Loop runs once per "significant" character position in the input text.
|
||||
for (;;) {
|
||||
|
@ -2072,8 +2074,6 @@ private:
|
|||
UnicodeSet *fRegionalIndicatorSet;
|
||||
UnicodeSet *fDictionaryCjkSet;
|
||||
|
||||
RegexMatcher *fMatcher;
|
||||
|
||||
const UnicodeString *fText;
|
||||
};
|
||||
|
||||
|
@ -2180,6 +2180,7 @@ int32_t RBBIWordMonkey::next(int32_t prevPos) {
|
|||
p0 = p1 = p2 = p3 = prevPos;
|
||||
c3 = fText->char32At(prevPos);
|
||||
c0 = c1 = c2 = 0;
|
||||
(void)p0; // Suppress set but not used warning.
|
||||
|
||||
// Loop runs once per "significant" character position in the input text.
|
||||
for (;;) {
|
||||
|
@ -2513,6 +2514,7 @@ int32_t RBBISentMonkey::next(int32_t prevPos) {
|
|||
p0 = p1 = p2 = p3 = prevPos;
|
||||
c3 = fText->char32At(prevPos);
|
||||
c0 = c1 = c2 = 0;
|
||||
(void)p0; // Suppress set but not used warning.
|
||||
|
||||
// Loop runs once per "significant" character position in the input text.
|
||||
for (;;) {
|
||||
|
@ -2722,13 +2724,9 @@ private:
|
|||
UnicodeSet *fSA;
|
||||
UnicodeSet *fXX;
|
||||
|
||||
BreakIterator *fCharBI;
|
||||
|
||||
BreakIterator *fCharBI;
|
||||
const UnicodeString *fText;
|
||||
int32_t *fOrigPositions;
|
||||
|
||||
RegexMatcher *fNumberMatcher;
|
||||
RegexMatcher *fLB11Matcher;
|
||||
};
|
||||
|
||||
|
||||
|
@ -3981,6 +3979,8 @@ void RBBITest::RunMonkey(BreakIterator *bi, RBBIMonkeyKind &mk, const char *name
|
|||
expectedBreaks[breakPos] = 1;
|
||||
U_ASSERT(expectedCount<testText.length());
|
||||
expected[expectedCount ++] = breakPos;
|
||||
(void)expected; // Set but not used warning.
|
||||
// TODO (andy): check it out.
|
||||
}
|
||||
|
||||
// Find the break positions using forward iteration
|
||||
|
@ -4242,6 +4242,7 @@ void RBBITest::TestBug9983(void) {
|
|||
while ( (offset = brkiter->previous()) != UBRK_DONE ) {
|
||||
iterationCount++;
|
||||
rstatus = brkiter->getRuleStatus();
|
||||
(void)rstatus; // Suppress set but not used warning.
|
||||
// printf(" %d(%d)", offset, rstatus);
|
||||
if (iterationCount >= 10) {
|
||||
break;
|
||||
|
|
|
@ -953,6 +953,7 @@ const char *cPattern = "maketh houndes ete hem";
|
|||
// to get runtimes of at least several seconds.
|
||||
for (i=0; i<10000; i++) {
|
||||
found = usearch_search(uss.getAlias(), 0, &icuMatchPos, &icuMatchEnd, &status);
|
||||
(void)found; // Suppress set but not used warning.
|
||||
//TEST_ASSERT_SUCCESS(status);
|
||||
//TEST_ASSERT(found);
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2003-2011, International Business Machines
|
||||
* Copyright (C) 2003-2013, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*
|
||||
*******************************************************************************
|
||||
|
@ -118,6 +118,7 @@ testData(TestIDNA& test) {
|
|||
|
||||
/* first copy misc directory */
|
||||
saveBasename = basename;
|
||||
(void)saveBasename; // Suppress set but not used warning.
|
||||
uprv_strcpy(basename,SPREP_DIR);
|
||||
basename = basename + uprv_strlen(SPREP_DIR);
|
||||
*basename++=U_FILE_SEP_CHAR;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
**********************************************************************
|
||||
* Copyright (C) 1999-2011, International Business Machines
|
||||
* Copyright (C) 1999-2013, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
**********************************************************************
|
||||
* Date Name Description
|
||||
|
@ -3608,6 +3608,7 @@ void TransliteratorTest::CheckIncrementalAux(const Transliterator* t,
|
|||
return;
|
||||
}
|
||||
UBool gotError = FALSE;
|
||||
(void)gotError; // Suppress set but not used warning.
|
||||
|
||||
// we have a few special cases. Any-Remove (pos.start = 0, but also = limit) and U+XXXXX?X?
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/********************************************************************
|
||||
* COPYRIGHT:
|
||||
* Copyright (c) 1999-2012, International Business Machines Corporation and
|
||||
* Copyright (c) 1999-2013, International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
********************************************************************/
|
||||
|
||||
|
@ -1074,6 +1074,7 @@ public:
|
|||
|
||||
oldSk = newSk;
|
||||
oldLen = resLen;
|
||||
(void)oldLen; // Suppress set but not used warning.
|
||||
prev = i;
|
||||
|
||||
newSk = (newSk == sk1)?sk2:sk1;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
********************************************************************************
|
||||
* Copyright (C) 1999-2012 International Business Machines Corporation and
|
||||
* Copyright (C) 1999-2013 International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
********************************************************************************
|
||||
* Date Name Description
|
||||
|
@ -1488,6 +1488,7 @@ void UnicodeSetTest::TestInvalidCodePoint() {
|
|||
b = set.contains(start, end);
|
||||
b = set.containsNone(start, end);
|
||||
b = set.containsSome(start, end);
|
||||
(void)b; // Suppress set but not used warning.
|
||||
|
||||
/*int32_t index = set.indexOf(start);*/
|
||||
|
||||
|
@ -2363,9 +2364,6 @@ private:
|
|||
|
||||
char utf8[1024];
|
||||
int32_t utf8Lengths[20];
|
||||
|
||||
int32_t nextStringIndex;
|
||||
int32_t nextUTF8Start;
|
||||
};
|
||||
|
||||
class UnicodeSetWithStringsIterator {
|
||||
|
@ -3771,6 +3769,7 @@ void UnicodeSetTest::TestStringSpan() {
|
|||
string16=UNICODE_STRING_SIMPLE("byayaxya");
|
||||
const UChar *s16=string16.getBuffer();
|
||||
int32_t length16=string16.length();
|
||||
(void)length16; // Suppress set but not used warning.
|
||||
if( set.span(s16, 8, USET_SPAN_NOT_CONTAINED)!=4 ||
|
||||
set.span(s16, 7, USET_SPAN_NOT_CONTAINED)!=4 ||
|
||||
set.span(s16, 6, USET_SPAN_NOT_CONTAINED)!=4 ||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/********************************************************************
|
||||
* COPYRIGHT:
|
||||
* Copyright (c) 1997-2012, International Business Machines Corporation and
|
||||
* Copyright (c) 1997-2013, International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
********************************************************************/
|
||||
|
||||
|
@ -1682,7 +1682,7 @@ public:
|
|||
private:
|
||||
static const char fgClassID;
|
||||
|
||||
int32_t i, length;
|
||||
int32_t i;
|
||||
};
|
||||
|
||||
const char TestEnumeration::fgClassID=0;
|
||||
|
@ -1783,7 +1783,7 @@ namespace bogus {
|
|||
public:
|
||||
enum EInvariant { kInvariant };
|
||||
UnicodeString() : i(1) {}
|
||||
UnicodeString(UBool /*isTerminated*/, const UChar * /*text*/, int32_t textLength) : i(textLength) {}
|
||||
UnicodeString(UBool /*isTerminated*/, const UChar * /*text*/, int32_t textLength) : i(textLength) {(void)i;}
|
||||
UnicodeString(const char * /*src*/, int32_t length, enum EInvariant /*inv*/
|
||||
) : i(length) {}
|
||||
private:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
**********************************************************************
|
||||
* Copyright (C) 2004-2007, International Business Machines
|
||||
* Copyright (C) 2004-2013, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
**********************************************************************
|
||||
* file name: strtst.c
|
||||
|
@ -716,6 +716,7 @@ static void Test_u_vfprintf(const char *expectedResult, const char *format, ...)
|
|||
|
||||
va_start(ap, format);
|
||||
count = u_vsprintf(uBuffer, format, ap);
|
||||
(void)count; /* Suppress set but not used warning */
|
||||
va_end(ap);
|
||||
u_uastrcpy(uBuffer2, expectedResult);
|
||||
if (u_strcmp(uBuffer, uBuffer2) != 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue