Could you please look at wxGIFHandler_WriteWord() function? gcc warns
about the variable "buf" being set but not used in it and this is indeed
the case so the current code -- and here it is in its entirety:
bool wxGIFHandler_WriteWord(wxOutputStream *stream, wxUint16 word)
{
wxUint8 buf[2];
buf[0] = word & 0xff;
buf[1] = (word >> 8) & 0xff;
return wxGIFHandler_Write(stream, &word, sizeof(word));
}
doesn't make much sense. I suppose we should pass buf to
wxGIFHandler_Write() but I'm not totally sure so I'd appreciate if you
could check this.
TIA,
VZ
> buf[0] = word & 0xff;
> buf[1] = (word >> 8) & 0xff;
> return wxGIFHandler_Write(stream, &word, sizeof(word));
> doesn't make much sense. I suppose we should pass buf to
> wxGIFHandler_Write() but I'm not totally sure so I'd appreciate if you
> could check this.
You're right, and I didn't notice this during my review of the patch.
Just to be sure I also verified it causes havoc with a saved GIF image
when running on PowerPC. Thank you (& gcc)! Will commit soon.
Regards,
Dimitri