summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGert Wollny <[email protected]>2017-11-16 16:09:37 +0100
committerBrian Paul <[email protected]>2017-11-17 09:27:56 -0700
commit20d3e943b1a1a8edb910672d758716059937cddd (patch)
tree4f096818829e0bec4d3aa3991e3dbd16f0031162 /src
parent373c263e2c3886c88e84d853b9df61ad03d1a8ea (diff)
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 <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/util/u_dump_defines.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_dump_defines.c b/src/gallium/auxiliary/util/u_dump_defines.c
index e431cd969bd..50dfa37bab7 100644
--- a/src/gallium/auxiliary/util/u_dump_defines.c
+++ b/src/gallium/auxiliary/util/u_dump_defines.c
@@ -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);