ICU-535 Fixed some compiler warnings

X-SVN-Rev: 3592
This commit is contained in:
George Rhoten 2001-02-08 03:23:29 +00:00
parent f868fa0272
commit f968f23935

View File

@ -30,8 +30,6 @@
#define MAX_FILE_LEN 1024*20
#define UCS_FILE_NAME_SIZE 100
/*writes and entire UChar* (string) along with a BOM to a file*/
static void WriteToFile(const UChar *a, FILE *myfile);
/*Case insensitive compare*/
static int32_t strCaseIcmp(const char* a1,const char * a2);
/*returns an action other than the one provided*/
@ -45,6 +43,35 @@ void addTestConvert(TestNode** root)
addTest(root, &TestAlias, "tsconv/ccapitst/TestAlias");
}
#if 0
/*writes an entire UChar* (string) along with a BOM to a file*/
static void WriteToFile(const UChar *a, FILE *myfile)
{
uint32_t size = u_strlen(a);
uint16_t i = 0;
UChar b = 0xFEFF;
/*Writes the BOM*/
fwrite(&b, sizeof(UChar), 1, myfile);
for (i=0; i< size; i++)
{
b = a[i];
fwrite(&b, sizeof(UChar), 1, myfile);
}
}
#endif
static int32_t strCaseIcmp(const char* a1, const char * a2)
{
int32_t i=0, ret=0;
while(a1[i]&&a2[i])
{
ret += tolower(a1[i])-tolower(a2[i]);
i++;
}
return ret;
}
static void TestConvert()
{
char myptr[4];
@ -972,34 +999,6 @@ static void TestConvert()
free((void*)my_ucs_file_buffer);
}
#if 0
static void WriteToFile(const UChar *a, FILE *myfile)
{
uint32_t size = u_strlen(a);
uint16_t i = 0;
UChar b = 0xFEFF;
/*Writes the BOM*/
fwrite(&b, sizeof(UChar), 1, myfile);
for (i=0; i< size; i++)
{
b = a[i];
fwrite(&b, sizeof(UChar), 1, myfile);
}
}
#endif
static int32_t strCaseIcmp(const char* a1, const char * a2)
{
int32_t i=0, ret=0;
while(a1[i]&&a2[i])
{
ret += tolower(a1[i])-tolower(a2[i]);
i++;
}
return ret;
}
static UConverterFromUCallback otherUnicodeAction(UConverterFromUCallback MIA)
{
return (MIA==(UConverterFromUCallback)UCNV_FROM_U_CALLBACK_STOP)?(UConverterFromUCallback)UCNV_FROM_U_CALLBACK_SUBSTITUTE:(UConverterFromUCallback)UCNV_FROM_U_CALLBACK_STOP;