GCC issues the following warning in my build: In file included from ../../SOURCE/master/src/compiler/glsl_types.h:29:0, from ../../SOURCE/master/src/compiler/nir_types.h:36, from ../../SOURCE/master/src/compiler/nir/nir.h:39, from ../../SOURCE/master/src/compiler/nir/nir_linking_helpers.c:24: ../../SOURCE/master/src/compiler/nir/nir_linking_helpers.c: In function ‘remap_slots_and_components’: ../../SOURCE/master/src/compiler/nir/nir_linking_helpers.c:286:63: warning: ordered comparison of pointer with integer zero [-Wextra] assert(remap[var->data.location - VARYING_SLOT_VAR0] >= 0); ^ I looked at the code, and remap is declared as "struct varying_loc (*remap)[4]". It is comparing that a pointer to an array of 4 structures is >= 0. I'm not sure what the original intention was, but this tautology isn't doing it.
Fixed by: author Timothy Arceri <tarceri@itsqueeze.com> committer Timothy Arceri <tarceri@itsqueeze.com> commit cdeac002677774b14b78bb234aa082bbc499f933 nir: remove old assert This was originally intended to make sure the remap location was not -1. However the code has changed alot since then, the location is now never set to -1 and we also handle components meaning this old assert has been doing comparisons with the pointer to the array of component data. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105183
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.