Fixed warnings

This commit is contained in:
Robert Osfield
2009-01-28 12:28:04 +00:00
parent b328758058
commit 065b1d4978
2 changed files with 6 additions and 6 deletions

View File

@@ -276,7 +276,7 @@ lib3ds_string_read(char *s, int buflen, FILE *f)
{
int k=0;
ASSERT(f);
while ((*s++=fgetc(f))!=0) {
while ((*s++=char(fgetc(f)))!=0) {
if (++k>=buflen) {
return(LIB3DS_FALSE);
}
@@ -325,8 +325,8 @@ lib3ds_word_write(Lib3dsWord w, FILE *f)
Lib3dsByte b[2];
ASSERT(f);
b[1]=((Lib3dsWord)w & 0xFF00) >> 8;
b[0]=((Lib3dsWord)w & 0x00FF);
b[1]=(Lib3dsByte)(((Lib3dsWord)w & 0xFF00) >> 8);
b[0]=(Lib3dsByte)((Lib3dsWord)w & 0x00FF);
if (fwrite(b,2,1,f)!=1) {
return(LIB3DS_FALSE);
}
@@ -398,8 +398,8 @@ lib3ds_intw_write(Lib3dsIntw w, FILE *f)
Lib3dsByte b[2];
ASSERT(f);
b[1]=((Lib3dsWord)w & 0xFF00) >> 8;
b[0]=((Lib3dsWord)w & 0x00FF);
b[1]=(Lib3dsByte)(((Lib3dsWord)w & 0xFF00) >> 8);
b[0]=(Lib3dsByte)((Lib3dsWord)w & 0x00FF);
if (fwrite(b,2,1,f)!=1) {
return(LIB3DS_FALSE);
}

View File

@@ -49,5 +49,5 @@ void BITSET::Set(int bitNumber)
unsigned char BITSET::IsSet(int bitNumber) const
{
return m_bits_aux[bitNumber>>3] & 1<<(bitNumber&7);
return static_cast<unsigned char>(m_bits_aux[bitNumber>>3] & 1<<(bitNumber&7));
}