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) {
/*
**********************************************************************
- * Copyright (C) 2002-2010, International Business Machines
+ * Copyright (C) 2002-2013, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*/
return;
}
+ (void)fVertical; // Suppress warning for unused field fVertical.
+
// FIXME: should check the limit arrays for consistency...
computeLevels(paragraphLevel);
/*
*
- * (C) Copyright IBM Corp. 1998-2008 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
*
*/
inline ULocRuns(const ULocRuns &other);
inline ULocRuns &operator=(const ULocRuns & /*other*/) { return *this; };
const char **fLocaleNames;
- Locale **fLocalesCopy;
};
inline ULocRuns::ULocRuns()
/********************************************************************
* COPYRIGHT:
- * Copyright (c) 1997-2012, International Business Machines Corporation and
+ * Copyright (c) 1997-2013, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
/*******************************************************************************
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));
}
/* 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)
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");
}
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))
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));
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);
}
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)) {
/********************************************************************
* COPYRIGHT:
- * Copyright (c) 1997-2012, International Business Machines Corporation and
+ * Copyright (c) 1997-2013, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
/********************************************************************************
}
/*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");
}
/*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) {
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 */
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;
/********************************************************************
* COPYRIGHT:
- * Copyright (c) 1997-2012, International Business Machines Corporation and
+ * Copyright (c) 1997-2013, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
/*****************************************************************************
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;
/*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,
TRUE,
&err);
consumedUni = (UChar*)tmp_consumedUni;
+ (void)consumedUni; /* Suppress set but not used warning. */
if (U_FAILURE(err))
{
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;
/********************************************************************
* COPYRIGHT:
- * Copyright (c) 1997-2012, International Business Machines Corporation and
+ * Copyright (c) 1997-2013, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
/********************************************************************************
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));
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)
}
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));
}
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;
}
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);
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 {
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);
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);
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);
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);
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));
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) {
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",
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;
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;
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);
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
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 {
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;
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));
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);
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");
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) {
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 {
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");
}
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");
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){
/********************************************************************
* COPYRIGHT:
- * Copyright (c) 1997-2012, International Business Machines Corporation and
+ * Copyright (c) 1997-2013, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************
*
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));
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;
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);
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,
/********************************************************************
* COPYRIGHT:
- * Copyright (c) 1998-2012, International Business Machines Corporation and
+ * Copyright (c) 1998-2013, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
/*
switch(U_CHARSET_FAMILY)
{
case U_ASCII_FAMILY:
- switch(U_IS_BIG_ENDIAN)
+ switch((int)U_IS_BIG_ENDIAN)
{
case 1:
typeChar = 'b';
/********************************************************************
* COPYRIGHT:
- * Copyright (c) 1997-2012, International Business Machines Corporation and
+ * Copyright (c) 1997-2013, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
//===============================================================================
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);
{
// api not used, this is to make the compiler happy
if (U_FAILURE(status)) {
- type = ULOC_DATA_LOCALE_TYPE_LIMIT;
+ (void)type;
}
return NULL;
}
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
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,
/********************************************************************
* COPYRIGHT:
- * Copyright (c) 1997-2010,2012, International Business Machines Corporation and
+ * Copyright (c) 1997-2013 International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
DateTimeStyleSet styleSet;
UnicodeString pattern;
UBool usePattern = FALSE;
+ (void)usePattern; // Suppress unused warning.
CalendarFieldsSet fromSet;
UDate fromDate = 0;
UBool useDate = FALSE;
#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.
typedef struct TestData {
double inputValue;
int inputScale;
- char *expectedOutput;
+ const char *expectedOutput;
} TestData;
static TestData testData[] = {
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);
}
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");
/**
*******************************************************************************
- * Copyright (C) 2001-2012, International Business Machines Corporation and
+ * Copyright (C) 2001-2013, International Business Machines Corporation and
* others. All Rights Reserved.
*******************************************************************************
*/
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 ";
fprintf(stdout, "### Too many properties. Exiting.\n");
}
- UBool all_tests_exist = TRUE;
MajorTestLevel major;
major.setVerbose( verbose );
major.setNoErrMsg( no_err_msg );
}
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++;
*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);
*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);
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);
/***********************************************************************
- * Copyright (c) 1997-2012, International Business Machines Corporation
+ * Copyright (c) 1997-2013, International Business Machines Corporation
* and others. All Rights Reserved.
***********************************************************************/
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));
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 (;;) {
UnicodeSet *fRegionalIndicatorSet;
UnicodeSet *fDictionaryCjkSet;
- RegexMatcher *fMatcher;
-
const UnicodeString *fText;
};
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 (;;) {
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 (;;) {
UnicodeSet *fSA;
UnicodeSet *fXX;
- BreakIterator *fCharBI;
-
+ BreakIterator *fCharBI;
const UnicodeString *fText;
- int32_t *fOrigPositions;
-
RegexMatcher *fNumberMatcher;
- RegexMatcher *fLB11Matcher;
};
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
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;
// 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);
/*
*******************************************************************************
*
-* Copyright (C) 2003-2011, International Business Machines
+* Copyright (C) 2003-2013, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
/* 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;
/*
**********************************************************************
-* Copyright (C) 1999-2011, International Business Machines
+* Copyright (C) 1999-2013, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* Date Name Description
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?
/********************************************************************
* COPYRIGHT:
- * Copyright (c) 1999-2012, International Business Machines Corporation and
+ * Copyright (c) 1999-2013, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
oldSk = newSk;
oldLen = resLen;
+ (void)oldLen; // Suppress set but not used warning.
prev = i;
newSk = (newSk == sk1)?sk2:sk1;
/*
********************************************************************************
-* 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
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);*/
char utf8[1024];
int32_t utf8Lengths[20];
-
- int32_t nextStringIndex;
- int32_t nextUTF8Start;
};
class UnicodeSetWithStringsIterator {
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 ||
/********************************************************************
* COPYRIGHT:
- * Copyright (c) 1997-2012, International Business Machines Corporation and
+ * Copyright (c) 1997-2013, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
private:
static const char fgClassID;
- int32_t i, length;
+ int32_t i;
};
const char TestEnumeration::fgClassID=0;
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:
/*
**********************************************************************
-* Copyright (C) 2004-2007, International Business Machines
+* Copyright (C) 2004-2013, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* file name: strtst.c
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) {