mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-3500 fix msvc6 warnings
X-SVN-Rev: 15405
This commit is contained in:
parent
de66112963
commit
cb65962ab6
4 changed files with 10 additions and 5 deletions
|
@ -968,7 +968,7 @@ _canonicalize(const char* localeID,
|
|||
} while(fieldCount<2);
|
||||
}
|
||||
posixVariantSize = _getVariantEx(localeID+1, '@', name+i, nameCapacity-i,
|
||||
variantSize > 0);
|
||||
(UBool)(variantSize > 0));
|
||||
if (posixVariantSize > 0) {
|
||||
if (variant == NULL) {
|
||||
variant = name+i;
|
||||
|
|
|
@ -234,7 +234,6 @@ class DefaultCalendarFactory : public ICUResourceBundleFactory {
|
|||
// fetch default calendar id
|
||||
const char *defaultCal = NULL;
|
||||
char funcEquiv[256];
|
||||
char keywordVal[ULOC_KEYWORD_AND_VALUES_CAPACITY];
|
||||
ures_getFunctionalEquivalent(funcEquiv, sizeof(funcEquiv)-1,
|
||||
NULL, "calendar", "calendar",
|
||||
loc.getName(),
|
||||
|
|
|
@ -692,7 +692,9 @@ U_CFUNC UBool assertSuccess(const char* msg, UErrorCode* ec) {
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
U_CFUNC UBool assertTrue(const char* msg, UBool condition) {
|
||||
/* if 'condition' is a UBool, the compiler complains bitterly about
|
||||
expressions like 'a > 0' which it evaluates as int */
|
||||
U_CFUNC UBool assertTrue(const char* msg, int /*not UBool*/ condition) {
|
||||
if (!condition) {
|
||||
log_err("FAIL: assertTrue() failed: %s\n", msg);
|
||||
}
|
||||
|
@ -701,7 +703,7 @@ U_CFUNC UBool assertTrue(const char* msg, UBool condition) {
|
|||
log_verbose("Ok: %s\n", msg);
|
||||
}
|
||||
#endif
|
||||
return condition;
|
||||
return (UBool)condition;
|
||||
}
|
||||
|
||||
U_CFUNC UBool assertEquals(const char* message, const char* expected,
|
||||
|
|
|
@ -91,8 +91,12 @@ U_CFUNC UBool assertSuccess(const char* msg, UErrorCode* ec);
|
|||
|
||||
/**
|
||||
* Assert that the UBool is TRUE, and return TRUE if it does.
|
||||
*
|
||||
* NOTE: Use 'int condition' rather than 'UBool condition' so the
|
||||
* compiler doesn't complain about integral conversion of expressions
|
||||
* like 'p != 0'.
|
||||
*/
|
||||
U_CFUNC UBool assertTrue(const char* msg, UBool condition);
|
||||
U_CFUNC UBool assertTrue(const char* msg, int condition);
|
||||
|
||||
/**
|
||||
* Assert that the actualString equals the expectedString, and return
|
||||
|
|
Loading…
Add table
Reference in a new issue