gallium/aux/util/u_async_debug.c: Fix -Wtype-limits warning.
authorGert Wollny <gw.fossdev@gmail.com>
Thu, 16 Nov 2017 15:09:56 +0000 (16:09 +0100)
committerBrian Paul <brianp@vmware.com>
Fri, 17 Nov 2017 16:27:57 +0000 (09:27 -0700)
Use size_t instread of unsigned for new_max. realloc later expects
size_t as parameter anyway.

Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/util/u_async_debug.c

index 13791a5..04faa68 100644 (file)
@@ -46,7 +46,7 @@ u_async_debug_message(void *data, unsigned *id, enum pipe_debug_type type,
 
    simple_mtx_lock(&adbg->lock);
    if (adbg->count >= adbg->max) {
-      unsigned new_max = MAX2(16, adbg->max * 2);
+      size_t new_max = MAX2(16, adbg->max * 2);
 
       if (new_max < adbg->max ||
           new_max > SIZE_MAX / sizeof(*adbg->messages)) {