ICU-535 fixed some compiler warnings

X-SVN-Rev: 2379
This commit is contained in:
George Rhoten 2000-08-29 17:16:53 +00:00
parent 5cfcc7e736
commit d3de68a538
2 changed files with 7 additions and 7 deletions

View File

@ -481,7 +481,7 @@ MBCSAddToUnicode(MBCSData *mbcsData,
fprintf(stderr, "error: byte sequence too short, ends in non-final state %hu: %lx (U+%lx)\n", state, b, c);
return FALSE;
}
state=(uint8_t)entry&0x7f;
state=(uint8_t)(entry&0x7f);
offset+=entry>>7;
} else {
if(i<length) {
@ -748,12 +748,12 @@ MBCSTransformEUC(MBCSData *mbcsData) {
*q++=*p++;
} else if(b==0x8e) {
/* code set 2 */
*q++=*p++&0x7f;
*q++=(uint8_t)(*p++&0x7f);
*q++=*p++;
} else /* b==0x8f */ {
/* code set 3 */
*q++=*p++;
*q++=*p++&0x7f;
*q++=(uint8_t)(*p++&0x7f);
}
if(oldLength==4) {
*q++=*p++;

View File

@ -76,16 +76,16 @@ udata_create(const char *dir, const char *type, const char *name,
}
/* write the header information */
headerSize=pInfo->size+4;
headerSize=(uint16_t)(pInfo->size+4);
if(comment!=NULL && *comment!=0) {
commentLength=uprv_strlen(comment)+1;
commentLength=(uint16_t)(uprv_strlen(comment)+1);
headerSize+=commentLength;
} else {
commentLength=0;
}
/* write the size of the header, take padding into account */
pData->headerSize=(headerSize+15)&~0xf;
pData->headerSize=(uint16_t)((headerSize+15)&~0xf);
pData->magic1=0xda;
pData->magic2=0x27;
T_FileStream_write(pData->file, &pData->headerSize, 4);
@ -101,7 +101,7 @@ udata_create(const char *dir, const char *type, const char *name,
/* write padding bytes to align the data section to 16 bytes */
headerSize&=0xf;
if(headerSize!=0) {
headerSize=16-headerSize;
headerSize=(uint16_t)(16-headerSize);
uprv_memset(bytes, 0, headerSize);
T_FileStream_write(pData->file, bytes, headerSize);
}