ICU-2699 Fix some compiler warnings.
X-SVN-Rev: 12474
This commit is contained in:
parent
3bc12c63aa
commit
cf63335147
@ -45,7 +45,7 @@ class LKFSubclass : public LocaleKeyFactory {
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual const Hashtable* getSupportedIDs(UErrorCode &status) const {
|
||||
virtual const Hashtable* getSupportedIDs(UErrorCode &/*status*/) const {
|
||||
return &table;
|
||||
}
|
||||
};
|
||||
@ -57,7 +57,7 @@ class Integer : public UObject {
|
||||
Integer(int32_t val) : _val(val) {
|
||||
}
|
||||
|
||||
Integer(const Integer& rhs) : _val(rhs._val) {
|
||||
Integer(const Integer& rhs) : UObject(rhs), _val(rhs._val) {
|
||||
}
|
||||
virtual ~Integer() {
|
||||
}
|
||||
@ -126,7 +126,8 @@ ICUServiceTest::~ICUServiceTest() {
|
||||
}
|
||||
|
||||
void
|
||||
ICUServiceTest::runIndexedTest(int32_t index, UBool exec, const char* &name, char* par)
|
||||
ICUServiceTest::runIndexedTest(int32_t index, UBool exec, const char* &name,
|
||||
char* /*par*/)
|
||||
{
|
||||
switch (index) {
|
||||
TESTCASE(0,testAPI_One);
|
||||
@ -155,7 +156,7 @@ UnicodeString append(UnicodeString& result, const UObject* obj)
|
||||
sprintf(buffer, "%d", ((Integer*)obj)->_val);
|
||||
result.append(buffer);
|
||||
} else {
|
||||
sprintf(buffer, "%x", obj);
|
||||
sprintf(buffer, "%p", (const void*)obj);
|
||||
result.append(buffer);
|
||||
}
|
||||
}
|
||||
@ -487,11 +488,11 @@ class AnonymousStringFactory : public ICUServiceFactory
|
||||
return new UnicodeString(key.getID());
|
||||
}
|
||||
|
||||
virtual void updateVisibleIDs(Hashtable& result, UErrorCode& status) const {
|
||||
virtual void updateVisibleIDs(Hashtable& /*result*/, UErrorCode& /*status*/) const {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
virtual UnicodeString& getDisplayName(const UnicodeString& id, const Locale& locale, UnicodeString& result) const {
|
||||
virtual UnicodeString& getDisplayName(const UnicodeString& /*id*/, const Locale& /*locale*/, UnicodeString& result) const {
|
||||
// do nothing
|
||||
return result;
|
||||
}
|
||||
@ -1160,7 +1161,7 @@ void ICUServiceTest::testLocale() {
|
||||
logln("locales: ");
|
||||
{
|
||||
const char* p;
|
||||
while (p = locales->next(NULL, status)) {
|
||||
while ((p = locales->next(NULL, status))) {
|
||||
logln(p);
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ class ICUServiceTest : public IntlTest
|
||||
{
|
||||
public:
|
||||
ICUServiceTest();
|
||||
~ICUServiceTest();
|
||||
virtual ~ICUServiceTest();
|
||||
|
||||
void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL);
|
||||
|
||||
|
@ -65,7 +65,7 @@ void NormalizerConformanceTest::compare(const UnicodeString& s1, const UnicodeSt
|
||||
|
||||
FileStream *
|
||||
NormalizerConformanceTest::openNormalizationTestFile(const char *filename) {
|
||||
char path[2000];
|
||||
char unidataPath[2000];
|
||||
const char *folder;
|
||||
FileStream *input;
|
||||
UErrorCode errorCode;
|
||||
@ -73,10 +73,10 @@ NormalizerConformanceTest::openNormalizationTestFile(const char *filename) {
|
||||
// look inside ICU_DATA first
|
||||
folder=u_getDataDirectory();
|
||||
if(folder!=NULL) {
|
||||
strcpy(path, folder);
|
||||
strcat(path, "unidata" U_FILE_SEP_STRING);
|
||||
strcat(path, filename);
|
||||
input=T_FileStream_open(path, "rb");
|
||||
strcpy(unidataPath, folder);
|
||||
strcat(unidataPath, "unidata" U_FILE_SEP_STRING);
|
||||
strcat(unidataPath, filename);
|
||||
input=T_FileStream_open(unidataPath, "rb");
|
||||
if(input!=NULL) {
|
||||
return input;
|
||||
}
|
||||
@ -86,12 +86,12 @@ NormalizerConformanceTest::openNormalizationTestFile(const char *filename) {
|
||||
errorCode=U_ZERO_ERROR;
|
||||
folder=loadTestData(errorCode);
|
||||
if(U_SUCCESS(errorCode)) {
|
||||
strcpy(path, folder);
|
||||
strcat(path, U_FILE_SEP_STRING ".." U_FILE_SEP_STRING ".."
|
||||
strcpy(unidataPath, folder);
|
||||
strcat(unidataPath, U_FILE_SEP_STRING ".." U_FILE_SEP_STRING ".."
|
||||
U_FILE_SEP_STRING ".." U_FILE_SEP_STRING ".."
|
||||
U_FILE_SEP_STRING "data" U_FILE_SEP_STRING "unidata" U_FILE_SEP_STRING);
|
||||
strcat(path, filename);
|
||||
input=T_FileStream_open(path, "rb");
|
||||
strcat(unidataPath, filename);
|
||||
input=T_FileStream_open(unidataPath, "rb");
|
||||
if(input!=NULL) {
|
||||
return input;
|
||||
}
|
||||
@ -101,10 +101,10 @@ NormalizerConformanceTest::openNormalizationTestFile(const char *filename) {
|
||||
errorCode=U_ZERO_ERROR;
|
||||
folder=loadTestData(errorCode);
|
||||
if(U_SUCCESS(errorCode)) {
|
||||
strcpy(path, folder);
|
||||
strcat(path, U_FILE_SEP_STRING);
|
||||
strcat(path, filename);
|
||||
input=T_FileStream_open(path, "rb");
|
||||
strcpy(unidataPath, folder);
|
||||
strcat(unidataPath, U_FILE_SEP_STRING);
|
||||
strcat(unidataPath, filename);
|
||||
input=T_FileStream_open(unidataPath, "rb");
|
||||
if(input!=NULL) {
|
||||
return input;
|
||||
}
|
||||
@ -114,10 +114,10 @@ NormalizerConformanceTest::openNormalizationTestFile(const char *filename) {
|
||||
errorCode=U_ZERO_ERROR;
|
||||
folder=loadTestData(errorCode);
|
||||
if(U_SUCCESS(errorCode)) {
|
||||
strcpy(path, folder);
|
||||
strcat(path, U_FILE_SEP_STRING ".." U_FILE_SEP_STRING ".." U_FILE_SEP_STRING);
|
||||
strcat(path, filename);
|
||||
input=T_FileStream_open(path, "rb");
|
||||
strcpy(unidataPath, folder);
|
||||
strcat(unidataPath, U_FILE_SEP_STRING ".." U_FILE_SEP_STRING ".." U_FILE_SEP_STRING);
|
||||
strcat(unidataPath, filename);
|
||||
input=T_FileStream_open(unidataPath, "rb");
|
||||
if(input!=NULL) {
|
||||
return input;
|
||||
}
|
||||
@ -125,16 +125,16 @@ NormalizerConformanceTest::openNormalizationTestFile(const char *filename) {
|
||||
|
||||
// find icu/source/data/unidata relative to U_TOPSRCDIR
|
||||
#if defined(U_TOPSRCDIR)
|
||||
strcpy(path, U_TOPSRCDIR U_FILE_SEP_STRING "data" U_FILE_SEP_STRING "unidata" U_FILE_SEP_STRING);
|
||||
strcat(path, filename);
|
||||
input=T_FileStream_open(path, "rb");
|
||||
strcpy(unidataPath, U_TOPSRCDIR U_FILE_SEP_STRING "data" U_FILE_SEP_STRING "unidata" U_FILE_SEP_STRING);
|
||||
strcat(unidataPath, filename);
|
||||
input=T_FileStream_open(unidataPath, "rb");
|
||||
if(input!=NULL) {
|
||||
return input;
|
||||
}
|
||||
|
||||
strcpy(path, U_TOPSRCDIR U_FILE_SEP_STRING "test" U_FILE_SEP_STRING "testdata" U_FILE_SEP_STRING);
|
||||
strcat(path, filename);
|
||||
input=T_FileStream_open(path, "rb");
|
||||
strcpy(unidataPath, U_TOPSRCDIR U_FILE_SEP_STRING "test" U_FILE_SEP_STRING "testdata" U_FILE_SEP_STRING);
|
||||
strcat(unidataPath, filename);
|
||||
input=T_FileStream_open(unidataPath, "rb");
|
||||
if(input!=NULL) {
|
||||
return input;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user