ICU-900 Fixed some compiler warnings.

X-SVN-Rev: 4401
This commit is contained in:
George Rhoten 2001-03-29 20:47:43 +00:00
parent 3c6aa96907
commit a8e20b45dc
3 changed files with 6 additions and 21 deletions

View file

@ -460,7 +460,7 @@ void ConvertTest::TestConvert()
/*Reads in the file*/
while(!feof(ucs_file_in)&&(i+=fread(ucs_file_buffer+i, sizeof(UChar), 1, ucs_file_in)))
while(!feof(ucs_file_in)&&(i+=fread(ucs_file_buffer+i, (unsigned int)sizeof(UChar), 1, ucs_file_in)))
{
myUChar = ucs_file_buffer[i-1];
@ -685,7 +685,7 @@ void ConvertTest::TestAmbiguous()
return;
}
/* convert target from SJIS to Unicode */
sjis_cnv->toUnicodeString(sjisResult, target, strlen(target), status);
sjis_cnv->toUnicodeString(sjisResult, target, (int32_t)uprv_strlen(target), status);
if (U_FAILURE(status))
{
errln("Failed to convert the SJIS string.\n");
@ -695,7 +695,7 @@ void ConvertTest::TestAmbiguous()
}
/* convert target from Latin-1 to Unicode */
ascii_cnv->toUnicodeString(asciiResult, target, strlen(target), status);
ascii_cnv->toUnicodeString(asciiResult, target, (int32_t)uprv_strlen(target), status);
if (U_FAILURE(status))
{
errln("Failed to convert the Latin-1 string.\n");

View file

@ -5,26 +5,11 @@
********************************************************************/
#ifndef _COLL
#include "unicode/coll.h"
#endif
#ifndef _TBLCOLL
#include "unicode/tblcoll.h"
#endif
#ifndef _UNISTR
#include "unicode/unistr.h"
#endif
#ifndef _SORTKEY
#include "unicode/sortkey.h"
#endif
#ifndef _ENCOLL
#include "encoll.h"
#endif
#include "sfwdchit.h"
CollationEnglishTest::CollationEnglishTest()
@ -293,7 +278,7 @@ void CollationEnglishTest::TestTertiary(/* char* par */)
//test more interesting cases
Collator::EComparisonResult expected;
const int32_t testMoreSize = sizeof(testMore) / sizeof(testMore[0]);
const int32_t testMoreSize = (int32_t)(sizeof(testMore) / sizeof(testMore[0]));
for (i = 0; i < testMoreSize; i++)
{
for (j = 0; j < testMoreSize; j++)
@ -332,7 +317,7 @@ void CollationEnglishTest::TestSecondary(/* char* par */)
//test acute and grave ordering (compare to french collation)
int32_t j;
Collator::EComparisonResult expected;
const int32_t testAcuteSize = sizeof(testAcute) / sizeof(testAcute[0]);
const int32_t testAcuteSize = (int32_t)(sizeof(testAcute) / sizeof(testAcute[0]));
for (i = 0; i < testAcuteSize; i++)
{
for (j = 0; j < testAcuteSize; j++)

View file

@ -11,7 +11,7 @@
#include "regcoll.h"
#include "sfwdchit.h"
#define ARRAY_LENGTH(array) (sizeof array / sizeof array[0])
#define ARRAY_LENGTH(array) ((int32_t)(sizeof array / sizeof array[0]))
CollationRegressionTest::CollationRegressionTest()
{