GCC issues the following warning in my build:
In file included from ../../SOURCE/master/src/compiler/glsl_types.h:29:0,
../../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)". 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.
author Timothy Arceri <email@example.com>
committer Timothy Arceri <firstname.lastname@example.org>
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 <email@example.com>
Reviewed-by: Iago Toral Quiroga <firstname.lastname@example.org>