diff --git a/src/osgPlugins/3ds/readwrite.cpp b/src/osgPlugins/3ds/readwrite.cpp index e2b236522..139d3af66 100644 --- a/src/osgPlugins/3ds/readwrite.cpp +++ b/src/osgPlugins/3ds/readwrite.cpp @@ -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); } diff --git a/src/osgPlugins/bsp/BITSET.cpp b/src/osgPlugins/bsp/BITSET.cpp index 29a1a194d..6898e666c 100644 --- a/src/osgPlugins/bsp/BITSET.cpp +++ b/src/osgPlugins/bsp/BITSET.cpp @@ -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(m_bits_aux[bitNumber>>3] & 1<<(bitNumber&7)); }