ICU-3222 Fix some compiler warnings.
X-SVN-Rev: 13943
This commit is contained in:
parent
e2acef7dc1
commit
18a63c92c9
@ -2041,9 +2041,9 @@ static void TestResourceLevelAliasing(void) {
|
||||
"PDT",
|
||||
"Los Angeles",
|
||||
};
|
||||
UChar buffer[256];
|
||||
UChar uBuffer[256];
|
||||
const UChar* result;
|
||||
int32_t bufferLen = 0, resultLen = 0;
|
||||
int32_t uBufferLen = 0, resultLen = 0;
|
||||
int32_t i = 0;
|
||||
const char *key = NULL;
|
||||
tb = ures_getByKey(aliasB, "testGetStringByKeyAliasing", tb, &status);
|
||||
@ -2052,22 +2052,22 @@ static void TestResourceLevelAliasing(void) {
|
||||
}
|
||||
for(i = 0; i < sizeof(strings)/sizeof(strings[0]); i++) {
|
||||
result = ures_getStringByKey(tb, keys[i], &resultLen, &status);
|
||||
bufferLen = u_unescape(strings[i], buffer, 256);
|
||||
if(resultLen != bufferLen || u_strncmp(result, buffer, resultLen) != 0) {
|
||||
uBufferLen = u_unescape(strings[i], uBuffer, 256);
|
||||
if(resultLen != uBufferLen || u_strncmp(result, uBuffer, resultLen) != 0) {
|
||||
log_err("Didn't get correct string while accesing alias table by key\n");
|
||||
}
|
||||
}
|
||||
for(i = 0; i < sizeof(strings)/sizeof(strings[0]); i++) {
|
||||
result = ures_getStringByIndex(tb, i, &resultLen, &status);
|
||||
bufferLen = u_unescape(strings[i], buffer, 256);
|
||||
if(resultLen != bufferLen || u_strncmp(result, buffer, resultLen) != 0) {
|
||||
uBufferLen = u_unescape(strings[i], uBuffer, 256);
|
||||
if(resultLen != uBufferLen || u_strncmp(result, uBuffer, resultLen) != 0) {
|
||||
log_err("Didn't get correct string while accesing alias table by index\n");
|
||||
}
|
||||
}
|
||||
for(i = 0; i < sizeof(strings)/sizeof(strings[0]); i++) {
|
||||
result = ures_getNextString(tb, &resultLen, &key, &status);
|
||||
bufferLen = u_unescape(strings[i], buffer, 256);
|
||||
if(resultLen != bufferLen || u_strncmp(result, buffer, resultLen) != 0) {
|
||||
uBufferLen = u_unescape(strings[i], uBuffer, 256);
|
||||
if(resultLen != uBufferLen || u_strncmp(result, uBuffer, resultLen) != 0) {
|
||||
log_err("Didn't get correct string while iterating over alias table\n");
|
||||
}
|
||||
}
|
||||
@ -2077,15 +2077,15 @@ static void TestResourceLevelAliasing(void) {
|
||||
}
|
||||
for(i = 0; i < sizeof(strings)/sizeof(strings[0]); i++) {
|
||||
result = ures_getStringByIndex(tb, i, &resultLen, &status);
|
||||
bufferLen = u_unescape(strings[i], buffer, 256);
|
||||
if(resultLen != bufferLen || u_strncmp(result, buffer, resultLen) != 0) {
|
||||
uBufferLen = u_unescape(strings[i], uBuffer, 256);
|
||||
if(resultLen != uBufferLen || u_strncmp(result, uBuffer, resultLen) != 0) {
|
||||
log_err("Didn't get correct string while accesing alias by index in an array\n");
|
||||
}
|
||||
}
|
||||
for(i = 0; i < sizeof(strings)/sizeof(strings[0]); i++) {
|
||||
result = ures_getNextString(tb, &resultLen, &key, &status);
|
||||
bufferLen = u_unescape(strings[i], buffer, 256);
|
||||
if(resultLen != bufferLen || u_strncmp(result, buffer, resultLen) != 0) {
|
||||
uBufferLen = u_unescape(strings[i], uBuffer, 256);
|
||||
if(resultLen != uBufferLen || u_strncmp(result, uBuffer, resultLen) != 0) {
|
||||
log_err("Didn't get correct string while iterating over aliases in an array\n");
|
||||
}
|
||||
}
|
||||
@ -2162,3 +2162,4 @@ static void TestDirectAccess(void) {
|
||||
ures_close(t);
|
||||
ures_close(t2);
|
||||
}
|
||||
|
||||
|
@ -290,7 +290,6 @@ unescapeData(const char* src, int32_t srcLen,
|
||||
static void Test_nfs4_cis_prep(void){
|
||||
int32_t i=0;
|
||||
|
||||
int32_t expLen = 0;
|
||||
for(i=0;i< (int32_t)(sizeof(conformanceTestCases)/sizeof(conformanceTestCases[0]));i++){
|
||||
const char* src = conformanceTestCases[i].in;
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
|
@ -141,7 +141,7 @@ testData(TestIDNA& test) {
|
||||
U_CDECL_BEGIN
|
||||
|
||||
static void U_CALLCONV
|
||||
strprepProfileLineFn(void *context,
|
||||
strprepProfileLineFn(void * /*context*/,
|
||||
char *fields[][2], int32_t fieldCount,
|
||||
UErrorCode *pErrorCode) {
|
||||
uint32_t mapping[40];
|
||||
|
Loading…
Reference in New Issue
Block a user