On Fri, 16 Sep 2011 18:53:01 -0300, [email protected] wrote: > From: Paulo Zanoni <[email protected]> > > Enums are unsigned by default in gcc and we can't rely on any specific > signedess for the other compilers. > > i965_render.c: In function âi965_prepare_compositeâ: > i965_render.c:2018:2: warning: comparison of unsigned expression < 0 is > always false > i965_render.c:2025:2: warning: comparison of unsigned expression < 0 is > always false > i965_render.c:2050:3: warning: comparison of unsigned expression < 0 is > always false > i965_render.c:2057:3: warning: comparison of unsigned expression < 0 is > always false > > Signed-off-by: Paulo Zanoni <[email protected]> > --- > src/i965_render.c | 18 ++++++++++-------- > 1 files changed, 10 insertions(+), 8 deletions(-) > > I could also have defined FILTER_ERROR as -1, then gcc would have > automagically > converted the enum to signed, but I'm not sure what other compilers would do > in > this case.
That behaviour is guarranteed by the C standard. Besides which we only have one compiler. ;-) The extra verbosity is good, but you should also fixup all the switches that use those enums (in preparation for -Wswitch-enum). -Chris -- Chris Wilson, Intel Open Source Technology Centre
_______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
