Am Samstag, 29. Dezember 2007 09:32:43 schrieb Gerald Pfeifer:
Current snapshots of GCC 4.3 issue the following warning (with -Wextra, for example)
basetexture.c:437: warning: comparison of unsigned expression < 0 is always false basetexture.c:438: warning: comparison of unsigned expression < 0 is always false
Indeed WINED3DTEXF_NONE is 0 and thus the comparison is a noop. I see three ways to handle this:
- the straightforward patch below,
I think your patch is OK, this check just seems to be a range check for the parameters that was apparently written without taking the type of the enumeration into account.