--- xv-3.10a.old/xvimage.c +++ xv-3.10a/xvimage.c @@ -1714,7 +1714,8 @@ case 12: case 15: case 16: { - unsigned short *imagedata, *ip; + unsigned short *imagedata; + unsigned char *ip; byte *pp; imagedata = (unsigned short *) malloc((size_t) (2*wide*high)); @@ -1734,25 +1735,27 @@ pp = (dithpic) ? dithpic : pic8; if (xim->byte_order == MSBFirst) { - for (i=wide*high, ip=imagedata; i>0; i--,pp++) { + for (i = wide * high, ip = (unsigned char *) imagedata; + i > 0; i--, pp++) { if (((i+1)&0x1ffff) == 0) WaitCursor(); if (dithpic) xcol = ((*pp) ? white : black) & 0xffff; else xcol = xcolors[*pp] & 0xffff; - *((unsigned char *)ip)++ = (xcol>>8) & 0xff; - *((unsigned char *)ip)++ = (xcol) & 0xff; + *ip++ = (xcol >> 8) & 0xff; + *ip++ = (xcol ) & 0xff; } } else { /* LSBFirst */ - for (i=wide*high, ip=imagedata; i>0; i--,pp++) { + for (i = wide * high, ip = (unsigned char *) imagedata; + i > 0; i--, pp++) { if (((i+1)&0x1ffff) == 0) WaitCursor(); if (dithpic) xcol = ((*pp) ? white : black) & 0xffff; else xcol = xcolors[*pp]; - *((unsigned char *)ip)++ = (xcol) & 0xff; - *((unsigned char *)ip)++ = (xcol>>8) & 0xff; + *ip++ = (xcol ) & 0xff; + *ip++ = (xcol >> 8) & 0xff; } } }