mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-11 08:01:32 +00:00
ICU-163 Fixed warnings on MSVC 6.0.
X-SVN-Rev: 476
This commit is contained in:
parent
9c67fb547b
commit
aedb933f7e
10 changed files with 16 additions and 17 deletions
|
@ -99,7 +99,7 @@ void ComposedCharIter::getDecomposition(UnicodeString& result) const
|
|||
Normalizer::doAppend(DecompData::contents, pos, result);
|
||||
}
|
||||
else if (hangul && curChar >= Normalizer::HANGUL_BASE && curChar < Normalizer::HANGUL_LIMIT) {
|
||||
Normalizer::hangulToJamo(curChar, result, minDecomp);
|
||||
Normalizer::hangulToJamo(curChar, result, (uint16_t)minDecomp);
|
||||
}
|
||||
else {
|
||||
result += curChar;
|
||||
|
|
|
@ -413,7 +413,7 @@ U_CAPI CompactByteArray * U_EXPORT2 ucmp8_cloneFromData(const uint8_t **source,
|
|||
|
||||
*source += array->fStructSize;
|
||||
|
||||
array->fArray = (const int8_t*)*source;
|
||||
array->fArray = (int8_t*)*source;
|
||||
*source += (sizeof(int8_t)*array->fCount);
|
||||
|
||||
if(((*source)-((const uint8_t*)oldArray)) & 1 )
|
||||
|
@ -421,7 +421,7 @@ U_CAPI CompactByteArray * U_EXPORT2 ucmp8_cloneFromData(const uint8_t **source,
|
|||
(*source)++;
|
||||
}
|
||||
|
||||
array->fIndex = (const uint16_t*)*source;
|
||||
array->fIndex = (uint16_t*)*source;
|
||||
*source += (sizeof(uint16_t)*UCMP8_kIndexCount);
|
||||
|
||||
|
||||
|
|
|
@ -177,7 +177,7 @@ U_CAPI void ures_close( UResourceBundle* resourceBundle)
|
|||
* it contains are owned by ICU and should not be deleted or written through
|
||||
* by the caller. The array is terminated by a null pointer.
|
||||
*/
|
||||
extern "C" void T_ResourceBundle_getTaggedArrayUChars(const ResourceBundle* UResourceBundle,
|
||||
extern "C" void T_ResourceBundle_getTaggedArrayUChars(const ResourceBundle* resourceBundle,
|
||||
const UnicodeString& resourceTag,
|
||||
UChar const** itemTags,
|
||||
UChar const** items,
|
||||
|
|
|
@ -1456,7 +1456,7 @@ void DecimalFormat::setRoundingIncrement(double newValue) {
|
|||
if (fRoundingIncrement == NULL) {
|
||||
fRoundingIncrement = new DigitList();
|
||||
}
|
||||
fRoundingIncrement->set(newValue);
|
||||
fRoundingIncrement->set((long)newValue);
|
||||
fRoundingDouble = newValue;
|
||||
} else {
|
||||
delete fRoundingIncrement;
|
||||
|
|
|
@ -18,13 +18,14 @@
|
|||
* Madhu Katragadda Ported for C API
|
||||
*********************************************************************************
|
||||
*//* C API TEST For COLLATOR */
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "unicode/utypes.h"
|
||||
#include "unicode/ucol.h"
|
||||
#include "unicode/uloc.h"
|
||||
#include "cintltst.h"
|
||||
#include "capitst.h"
|
||||
#include "unicode/ustring.h"
|
||||
#include <string.h>
|
||||
|
||||
void addCollAPITest(TestNode** root)
|
||||
{
|
||||
|
|
|
@ -64,7 +64,7 @@ void TestNumberFormat()
|
|||
UErrorCode status=U_ZERO_ERROR;
|
||||
UNumberFormatStyle style= UNUM_DEFAULT;
|
||||
UNumberFormat *pattern;
|
||||
UNumberFormat *def, *fr, *cur_def, *cur_fr, *per_def, *per_fr, *spellout_def, *cur_frpattern;
|
||||
UNumberFormat *def, *fr, *cur_def, *cur_fr, *per_def, *per_fr, *cur_frpattern;
|
||||
/* Testing unum_open() with various Numberformat styles and locales*/
|
||||
status = U_ZERO_ERROR;
|
||||
log_verbose("Testing unum_open() with default style and locale\n");
|
||||
|
|
|
@ -371,12 +371,11 @@ bool_t testConvertFromUnicode(const UChar *source, int sourceLen, const char *e
|
|||
UConverterFromUCallback action;
|
||||
char junk[9999];
|
||||
char offset_str[9999];
|
||||
char expOff[9999];
|
||||
char *p;
|
||||
|
||||
|
||||
for(i=0;i<NEW_MAX_BUFFER;i++)
|
||||
junkout[i] = 0xF0;
|
||||
junkout[i] = (char)0xF0;
|
||||
for(i=0;i<NEW_MAX_BUFFER;i++)
|
||||
junokout[i] = 0xFF;
|
||||
setNuConvTestName(codepage, "FROM");
|
||||
|
@ -604,7 +603,7 @@ bool_t testConvertToUnicode( const char *source, int sourcelen, const UChar *exp
|
|||
&src,
|
||||
srcLimit,
|
||||
checkOffsets ? offs : NULL,
|
||||
(srcLimit == realSourceEnd), /* flush if we're at the end of hte source data */
|
||||
(bool_t)(srcLimit == realSourceEnd), /* flush if we're at the end of hte source data */
|
||||
&status);
|
||||
|
||||
|
||||
|
|
|
@ -144,7 +144,7 @@ bool_t testConvertFromU( const UChar *source, int sourceLen, const char *expect
|
|||
bool_t doFlush;
|
||||
|
||||
for(i=0;i<NEW_MAX_BUFFER;i++)
|
||||
junkout[i] = 0xF0;
|
||||
junkout[i] = (char)0xF0;
|
||||
for(i=0;i<NEW_MAX_BUFFER;i++)
|
||||
junokout[i] = 0xFF;
|
||||
|
||||
|
@ -341,7 +341,7 @@ bool_t testConvertToU( const char *source, int sourcelen, const UChar *expect, i
|
|||
&src,
|
||||
srcLimit,
|
||||
checkOffsets ? offs : NULL,
|
||||
(srcLimit == realSourceEnd), /* flush if we're at the end of hte source data */
|
||||
(bool_t)(srcLimit == realSourceEnd), /* flush if we're at the end of hte source data */
|
||||
&status);
|
||||
|
||||
/* offs += (targ-oldTarg); */
|
||||
|
@ -473,7 +473,7 @@ void TestNewConvertWithBufferSizes(int32_t outsize, int32_t insize )
|
|||
|
||||
/* Sahha [health], slashed h's */
|
||||
const UChar malteseUChars[] = { 0x0053, 0x0061, 0x0127, 0x0127, 0x0061 };
|
||||
const char expectedMaltese913[] = { 0x53, 0x61, 0xB1, 0xB1, 0x61 };
|
||||
const char expectedMaltese913[] = { (char)0x53, (char)0x61, (char)0xB1, (char)0xB1, (char)0x61 };
|
||||
/*********************************** START OF CODE finally *************/
|
||||
|
||||
gInBufferSize = insize;
|
||||
|
@ -551,7 +551,6 @@ void TestConverterTypesAndStarters()
|
|||
UConverter* myConverter[3];
|
||||
UErrorCode err = U_ZERO_ERROR;
|
||||
bool_t mystarters[256];
|
||||
int i;
|
||||
|
||||
const bool_t expectedKSCstarters[256] = {
|
||||
FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
|
||||
|
|
|
@ -136,7 +136,7 @@ unescape(const char *s)
|
|||
value *= 16;
|
||||
value += digitvalue(*s++);
|
||||
|
||||
*alias++ = value;
|
||||
*alias++ = (UChar)value;
|
||||
}
|
||||
else
|
||||
*alias++ = *s++;
|
||||
|
|
|
@ -222,8 +222,8 @@ double IntlTestDateFormat::randDouble()
|
|||
if (d > 0.0)
|
||||
{
|
||||
double e = uprv_floor(uprv_log10(d));
|
||||
if (e < -2.0) d *= uprv_pow10(-e-2);
|
||||
else if (e > -1.0) d /= uprv_pow10(e+1);
|
||||
if (e < -2.0) d *= uprv_pow10((long)-e-2);
|
||||
else if (e > -1.0) d /= uprv_pow10((long)e+1);
|
||||
}
|
||||
return d;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue