X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/f3c0d7a59d99c2a94c6b8822291f0e42be3773c9..340931cb2e044a2141d11567dd0f782524e32994:/icuSources/test/intltest/windttst.cpp diff --git a/icuSources/test/intltest/windttst.cpp b/icuSources/test/intltest/windttst.cpp index 467ddb7a..92d6f672 100644 --- a/icuSources/test/intltest/windttst.cpp +++ b/icuSources/test/intltest/windttst.cpp @@ -43,6 +43,8 @@ # define NOMCX # include +#include + static const char *getCalendarType(int32_t type) { switch (type) @@ -86,7 +88,8 @@ void Win32DateTimeTest::testLocales(DateFormatTest *log) for (int z = 0; z < ec; z += 1) { UnicodeString equiv = TimeZone::getEquivalentID(zoneID, z); - if (found = uprv_getWindowsTimeZoneInfo(&tzi, equiv.getBuffer(), equiv.length())) { + found = uprv_getWindowsTimeZoneInfo(&tzi, equiv.getBuffer(), equiv.length()); + if (found) { break; } } @@ -113,6 +116,7 @@ void Win32DateTimeTest::testLocales(DateFormatTest *log) for(int i = 0; i < lcidCount; i += 1) { UErrorCode status = U_ZERO_ERROR; WCHAR longDateFormat[81], longTimeFormat[81], wdBuffer[256], wtBuffer[256]; + DWORD value = 0; int32_t calType = 0; // NULL localeID means ICU didn't recognize this locale @@ -137,8 +141,9 @@ void Win32DateTimeTest::testLocales(DateFormatTest *log) GetLocaleInfoW(lcidRecords[i].lcid, LOCALE_SLONGDATE, longDateFormat, 81); GetLocaleInfoW(lcidRecords[i].lcid, LOCALE_STIMEFORMAT, longTimeFormat, 81); - GetLocaleInfoW(lcidRecords[i].lcid, LOCALE_RETURN_NUMBER|LOCALE_ICALENDARTYPE, (LPWSTR) calType, sizeof(int32_t)); + GetLocaleInfoW(lcidRecords[i].lcid, LOCALE_RETURN_NUMBER|LOCALE_ICALENDARTYPE, (LPWSTR)&value, sizeof(value)/sizeof(WCHAR)); + calType = value; char localeID[64]; uprv_strcpy(localeID, lcidRecords[i].localeID);