Am Sonntag, 31. Dezember 2006 21:45 schrieb Giel van Schijndel:
> This patch fixes some errors (compiler warnings actually) where a signed
> value is compared with or assigned to an unsigned variable.
>
> At some places unsigned something = -1; is used, I've replaced those
> instances with ~0 (-1 indicates all bits are set, ~0 which is bitwise
> not on 0 does the same).
> At other locations unsigned something = signed preprocessor macro; is
> used (especially OpenAL macro's) added a cast (mostly (ALuint) ) to those.
This patch has a problem:
#define AL_INVALID                                (-1)

My recommendation is to hange psSample->iSample to signed...

> I only added casts in two places.
> One is in lib/audio and are because of negative OpenAL macro's being
> assigned to unsigned variables.
> Second is in netplay/netplay.c where signed return values (from SDL
> functions) where being used as unsigned ones (i.e. both comparison and
> assignment with/to unsigned variables).
>
> In case of lib/widget/form.c I even had to remove casts to fix sign errors.
>
> There's one additional modification as well, namely removal of an unused
> variable from a function in lib/audio/openal_track.c:387

Attachment: pgpayN1IZQsL0.pgp
Description: PGP signature

_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to