ICU-900 Fixed some compiler warnings.
X-SVN-Rev: 4749
This commit is contained in:
parent
bb1950fcb3
commit
15b4fbebc1
@ -456,13 +456,13 @@ DateFormatSymbols::initializeData(const Locale& locale, UErrorCode& status, UBoo
|
||||
status = U_USING_FALLBACK_ERROR;
|
||||
|
||||
fEras = (UnicodeString*)fgLastResortEras;
|
||||
fErasCount = sizeof(fgLastResortEras[0]) / sizeof(fgLastResortEras[0]);
|
||||
fErasCount = (int32_t)(sizeof(fgLastResortEras[0]) / sizeof(fgLastResortEras[0]));
|
||||
fMonths = fShortMonths = (UnicodeString*)fgLastResortMonthNames;
|
||||
fMonthsCount = fShortMonthsCount = sizeof(fgLastResortMonthNames) / sizeof(fgLastResortMonthNames[0]);
|
||||
fMonthsCount = fShortMonthsCount = (int32_t)(sizeof(fgLastResortMonthNames) / sizeof(fgLastResortMonthNames[0]));
|
||||
fWeekdays = fShortWeekdays = (UnicodeString*)fgLastResortDayNames;
|
||||
fWeekdaysCount = fShortWeekdaysCount = sizeof(fgLastResortDayNames) / sizeof(fgLastResortDayNames[0]);
|
||||
fWeekdaysCount = fShortWeekdaysCount = (int32_t)(sizeof(fgLastResortDayNames) / sizeof(fgLastResortDayNames[0]));
|
||||
fAmPms = (UnicodeString*)fgLastResortAmPmMarkers;
|
||||
fAmPmsCount = sizeof(fgLastResortAmPmMarkers) / sizeof(fgLastResortAmPmMarkers[0]);
|
||||
fAmPmsCount = (int32_t)(sizeof(fgLastResortAmPmMarkers) / sizeof(fgLastResortAmPmMarkers[0]));
|
||||
if (fgLastResortZoneStringsH == 0)
|
||||
{
|
||||
// Initialize this -- the compiler doesn't like to do so at static init time
|
||||
@ -473,7 +473,7 @@ DateFormatSymbols::initializeData(const Locale& locale, UErrorCode& status, UBoo
|
||||
}
|
||||
fZoneStrings = fgLastResortZoneStringsH;
|
||||
fZoneStringsRowCount = 1;
|
||||
fZoneStringsColCount = sizeof(fgLastResortZoneStrings);
|
||||
fZoneStringsColCount = (int32_t)(sizeof(fgLastResortZoneStrings));
|
||||
fLocalPatternChars = fgPatternChars;
|
||||
}
|
||||
return;
|
||||
|
@ -1104,8 +1104,8 @@ int32_t CalendarTest::EXPECTED_FIELDS[] = {
|
||||
Calendar::DAY_OF_YEAR, 295
|
||||
};
|
||||
|
||||
const int32_t CalendarTest::EXPECTED_FIELDS_length = sizeof(CalendarTest::EXPECTED_FIELDS) /
|
||||
sizeof(CalendarTest::EXPECTED_FIELDS[0]);
|
||||
const int32_t CalendarTest::EXPECTED_FIELDS_length = (int32_t)(sizeof(CalendarTest::EXPECTED_FIELDS) /
|
||||
sizeof(CalendarTest::EXPECTED_FIELDS[0]));
|
||||
|
||||
// -------------------------------------
|
||||
|
||||
|
@ -460,7 +460,7 @@ void ConvertTest::TestConvert()
|
||||
|
||||
|
||||
/*Reads in the file*/
|
||||
while(!feof(ucs_file_in)&&(i+=fread(ucs_file_buffer+i, (unsigned int)sizeof(UChar), 1, ucs_file_in)))
|
||||
while(!feof(ucs_file_in)&&(i+=fread(ucs_file_buffer+i, sizeof(UChar), 1, ucs_file_in)))
|
||||
{
|
||||
myUChar = ucs_file_buffer[i-1];
|
||||
|
||||
|
@ -1039,7 +1039,7 @@ void DateFormatRegressionTest::Test4182066(void) {
|
||||
"09/12/+1",
|
||||
"09/12/001",
|
||||
};
|
||||
int32_t STRINGS_COUNT = sizeof(STRINGS) / sizeof(STRINGS[0]);
|
||||
int32_t STRINGS_COUNT = (int32_t)(sizeof(STRINGS) / sizeof(STRINGS[0]));
|
||||
UDate FAIL_DATE = (UDate) 0;
|
||||
UDate DATES[] = {
|
||||
date(2000-1900, Calendar::FEBRUARY, 29),
|
||||
|
@ -245,7 +245,7 @@ DateFormatTest::TestFieldPosition(void)
|
||||
{
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
DateFormat* dateFormats[4];
|
||||
int32_t dateFormats_length = sizeof(dateFormats) / sizeof(dateFormats[0]);
|
||||
int32_t dateFormats_length = (int32_t)(sizeof(dateFormats) / sizeof(dateFormats[0]));
|
||||
|
||||
/* {sfb} This test was coded incorrectly.
|
||||
/ FieldPosition uses the fields in the class you are formatting with
|
||||
@ -599,11 +599,11 @@ DateFormatTest::TestBadInput135()
|
||||
int32_t looks[] = {
|
||||
DateFormat::SHORT, DateFormat::MEDIUM, DateFormat::LONG, DateFormat::FULL
|
||||
};
|
||||
int32_t looks_length = sizeof(looks) / sizeof(looks[0]);
|
||||
int32_t looks_length = (int32_t)(sizeof(looks) / sizeof(looks[0]));
|
||||
const char* strings[] = {
|
||||
"Mar 15", "Mar 15 1997", "asdf", "3/1/97 1:23:", "3/1/00 1:23:45 AM"
|
||||
};
|
||||
int32_t strings_length = sizeof(strings) / sizeof(strings[0]);
|
||||
int32_t strings_length = (int32_t)(sizeof(strings) / sizeof(strings[0]));
|
||||
DateFormat *full = DateFormat::createDateTimeInstance(DateFormat::LONG, DateFormat::LONG);
|
||||
UnicodeString expected("March 1, 2000 1:23:45 AM ");
|
||||
for (int32_t i = 0; i < strings_length;++i) {
|
||||
@ -682,8 +682,8 @@ DateFormatTest::TestBadInput135a()
|
||||
SimpleDateFormat* dateParse = new SimpleDateFormat(status);
|
||||
const char* s;
|
||||
UDate date;
|
||||
const uint32_t PF_LENGTH = sizeof(parseFormats)/sizeof(parseFormats[0]);
|
||||
const uint32_t INPUT_LENGTH = sizeof(inputStrings)/sizeof(inputStrings[0]);
|
||||
const uint32_t PF_LENGTH = (int32_t)(sizeof(parseFormats)/sizeof(parseFormats[0]));
|
||||
const uint32_t INPUT_LENGTH = (int32_t)(sizeof(inputStrings)/sizeof(inputStrings[0]));
|
||||
|
||||
dateParse->applyPattern("d MMMM, yyyy");
|
||||
dateParse->adoptTimeZone(TimeZone::createDefault());
|
||||
@ -856,7 +856,7 @@ DateFormatTest::TestDateFormatZone146()
|
||||
UnicodeString("short format: "), UnicodeString("4/4/97 11:00 PM"),
|
||||
UnicodeString("M/d/yy h:mm a")
|
||||
};
|
||||
int32_t DATA_length = sizeof(DATA) / sizeof(DATA[0]);
|
||||
int32_t DATA_length = (int32_t)(sizeof(DATA) / sizeof(DATA[0]));
|
||||
|
||||
for (int32_t i=0; i<DATA_length; i+=3) {
|
||||
DateFormat *fmt = new SimpleDateFormat(DATA[i+2], Locale::ENGLISH, status);
|
||||
|
@ -211,7 +211,7 @@ void test_Formattable( void )
|
||||
ucs,
|
||||
ucs_ptr
|
||||
};
|
||||
const int32_t ft_cnt = sizeof(ftarray) / sizeof(Formattable);
|
||||
const int32_t ft_cnt = (int32_t)(sizeof(ftarray) / sizeof(Formattable));
|
||||
Formattable ft_arr( ftarray, ft_cnt );
|
||||
UnicodeString temp;
|
||||
if ((ft_arr[0].getType() == Formattable::kDate) && (ft_arr[0].getDate() == 1.0)
|
||||
@ -246,8 +246,8 @@ void test_Formattable( void )
|
||||
const Formattable ftarr1[] = { Formattable( (int32_t)1 ), Formattable( (int32_t)2 ) };
|
||||
const Formattable ftarr2[] = { Formattable( (int32_t)3 ), Formattable( (int32_t)4 ) };
|
||||
|
||||
const int32_t ftarr1_cnt = sizeof(ftarr1) / sizeof(Formattable);
|
||||
const int32_t ftarr2_cnt = sizeof(ftarr2) / sizeof(Formattable);
|
||||
const int32_t ftarr1_cnt = (int32_t)(sizeof(ftarr1) / sizeof(Formattable));
|
||||
const int32_t ftarr2_cnt = (int32_t)(sizeof(ftarr2) / sizeof(Formattable));
|
||||
|
||||
ft_arr.setArray( ftarr1, ftarr1_cnt );
|
||||
if ((ft_arr[0].getType() == Formattable::kLong) && (ft_arr[0].getLong() == (int32_t)1)) {
|
||||
|
@ -338,7 +338,7 @@ void BasicNormalizerTest::TestZeroIndex(void) {
|
||||
"c\\u0321\\u0327", "c\\u0321\\u0327", "c\\u0321\\u0327",
|
||||
"c\\u0327\\u0321", "\\u00E7\\u0321", "c\\u0327\\u0321",
|
||||
};
|
||||
int32_t DATA_length = sizeof(DATA) / sizeof(DATA[0]);
|
||||
int32_t DATA_length = (int32_t)(sizeof(DATA) / sizeof(DATA[0]));
|
||||
|
||||
for (int32_t i=0; i<DATA_length; i+=3) {
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
|
@ -751,7 +751,7 @@ TimeZoneRegressionTest::Test4154650()
|
||||
BAD, GOOD_ERA, GOOD_YEAR, GOOD_MONTH, GOOD_DAY, GOOD_DOW, 24*3600000,
|
||||
};
|
||||
|
||||
int32_t dataLen = sizeof(DATA) / sizeof(DATA[0]);
|
||||
int32_t dataLen = (int32_t)(sizeof(DATA) / sizeof(DATA[0]));
|
||||
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
TimeZone *tz = TimeZone::createDefault();
|
||||
|
Loading…
Reference in New Issue
Block a user