Fix compiler warnings

This commit is contained in:
mayeut 2015-11-01 16:56:50 +01:00
parent 7dfcbf9d7b
commit ce26e523dd

View File

@ -558,8 +558,8 @@ struct tga_header
}; };
#endif /* INFORMATION_ONLY */ #endif /* INFORMATION_ONLY */
static unsigned short get_ushort(unsigned char *data) { static unsigned short get_ushort(const unsigned char *data) {
unsigned short val = *(unsigned short *)data; unsigned short val = *(const unsigned short *)data;
#ifdef OPJ_BIG_ENDIAN #ifdef OPJ_BIG_ENDIAN
val = ((val & 0xffU) << 8) | (val >> 8); val = ((val & 0xffU) << 8) | (val >> 8);
#endif #endif