ICU-5445 Fix some compiler warnings.

X-SVN-Rev: 22320
This commit is contained in:
George Rhoten 2007-08-08 18:39:02 +00:00
parent 096748976d
commit dd6812cfa0
4 changed files with 10 additions and 6 deletions

View file

@ -53,6 +53,9 @@ BMPSet::BMPSet(const BMPSet &otherBMPSet, const int32_t *newParentList, int32_t
uprv_memcpy(list4kStarts, otherBMPSet.list4kStarts, sizeof(list4kStarts));
}
BMPSet::~BMPSet() {
}
/*
* Set bits in a bit rectangle in "vertical" bit organization.
* start<limit<=0x800
@ -577,7 +580,7 @@ BMPSet::spanUTF8(const uint8_t *s, int32_t length, USetSpanCondition spanConditi
if(twoBits<=1) {
// All 64 code points with this lead byte and middle trail byte
// are either in the set or not.
if(twoBits!=spanCondition) {
if(twoBits!=(uint32_t)spanCondition) {
return s-1;
}
} else {
@ -693,7 +696,7 @@ BMPSet::spanBackUTF8(const uint8_t *s, int32_t length, USetSpanCondition spanCon
if(twoBits<=1) {
// All 64 code points with the same bits 15..6
// are either in the set or not.
if(twoBits!=spanCondition) {
if(twoBits!=(uint32_t)spanCondition) {
return prev+1;
}
} else {

View file

@ -36,6 +36,7 @@ class BMPSet : public UMemory {
public:
BMPSet(const int32_t *parentList, int32_t parentListLength);
BMPSet(const BMPSet &otherBMPSet, const int32_t *newParentList, int32_t newParentListLength);
virtual ~BMPSet();
virtual UBool contains(UChar32 c) const;

View file

@ -394,7 +394,7 @@ _toTitle(UCaseMap *csm,
#endif
U_CFUNC int32_t
static int32_t
utf8_foldCase(const UCaseProps *csp,
uint8_t *dest, int32_t destCapacity,
const uint8_t *src, int32_t srcLength,

View file

@ -62,7 +62,7 @@ public:
// Call exactly once if the list is to be used.
void setMaxLength(int32_t maxLength) {
if(maxLength<=sizeof(staticList)) {
if(maxLength<=(int32_t)sizeof(staticList)) {
capacity=(int32_t)sizeof(staticList);
} else {
UBool *l=(UBool *)uprv_malloc(maxLength);
@ -272,7 +272,7 @@ UnicodeSetStringSpan::UnicodeSetStringSpan(const UnicodeSet &set,
allocSize+=stringsLength*4+utf8Length;
}
}
if(allocSize<=sizeof(staticLengths)) {
if(allocSize<=(int32_t)sizeof(staticLengths)) {
utf8Lengths=staticLengths;
} else {
utf8Lengths=(int32_t *)uprv_malloc(allocSize);
@ -403,7 +403,7 @@ UnicodeSetStringSpan::UnicodeSetStringSpan(const UnicodeSetStringSpan &otherStri
// UTF-8 lengths, 4 sets of span lengths, UTF-8 strings.
int32_t stringsLength=strings.size();
int32_t allocSize=stringsLength*(4+1+1+1+1)+utf8Length;
if(allocSize<=sizeof(staticLengths)) {
if(allocSize<=(int32_t)sizeof(staticLengths)) {
utf8Lengths=staticLengths;
} else {
utf8Lengths=(int32_t *)uprv_malloc(allocSize);