--- ray/src/common/bmpfile.c 2016/03/10 01:49:00 2.16 +++ ray/src/common/bmpfile.c 2016/03/10 23:18:59 2.17 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: bmpfile.c,v 2.16 2016/03/10 01:49:00 schorsch Exp $"; +static const char RCSid[] = "$Id: bmpfile.c,v 2.17 2016/03/10 23:18:59 schorsch Exp $"; #endif /* * Windows and OS/2 BMP file support @@ -548,9 +548,8 @@ BMPmappedHeader(int xr, int yr, int infolen, int ncolo n = 8; else return NULL; - /* XXX VC warns about 32 bit shift coerced to 64 bit */ hdr = (BMPHeader *)malloc(sizeof(BMPHeader) + - sizeof(RGBquad)*(1<palette) + infolen); if (hdr == NULL) @@ -564,8 +563,7 @@ BMPmappedHeader(int xr, int yr, int infolen, int ncolo hdr->nColors = ncolors; hdr->impColors = 0; /* says all colors important */ hdr->infoSiz = infolen; - /* XXX VC warns about 32 bit shift coerced to 64 bit */ - memset((void *)hdr->palette, 0, sizeof(RGBquad)*(1<palette, 0, sizeof(RGBquad)*((size_t)1<palette[n].r = hdr->palette[n].g = hdr->palette[n].b = n*255/(ncolors-1);