mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 01:08:03 +02:00
gallium/aux/util/u_dump_defines.c: Fix -Wcompare-unsigned warning
u_bit_scan may return -1 that then may be interpreted as (unsigned)-1 in the following comparison, since num_names is unsigned. Convert the latter to be int as well. Signed-off-by: Gert Wollny <gw.fossdev@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
373c263e2c
commit
20d3e943b1
1 changed files with 1 additions and 1 deletions
|
|
@ -99,7 +99,7 @@ util_dump_flags_continuous(FILE *stream, unsigned value, unsigned num_names,
|
|||
|
||||
while (value) {
|
||||
int i = u_bit_scan(&value);
|
||||
if (i >= num_names || !names[i])
|
||||
if (i >= (int)num_names || !names[i])
|
||||
unknown |= 1u << i;
|
||||
if (!first)
|
||||
fputs("|", stream);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue