Use size_t instread of unsigned for new_max. realloc later expects
size_t as parameter anyway.

Signed-off-by: Gert Wollny <gw.foss...@gmail.com>
Reviewed-by: Brian Paul <bri...@vmware.com>
---
 src/gallium/auxiliary/util/u_async_debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/util/u_async_debug.c 
b/src/gallium/auxiliary/util/u_async_debug.c
index 13791a578b..04faa6850e 100644
--- a/src/gallium/auxiliary/util/u_async_debug.c
+++ b/src/gallium/auxiliary/util/u_async_debug.c
@@ -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)) {
-- 
2.13.6

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to