From c948aab96ca512247124819c4a2736e7385ea95d Mon Sep 17 00:00:00 2001 From: David Heidelberger Date: Mon, 7 Oct 2013 18:06:11 +0200 Subject: [PATCH] r300g/compiler: Fix unsigned comparison with less than zero MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit rc_find_free_temporary_list() returns signed integer (in case of lack of free temporary registers returns -1), so new_index in radeon_rename_regs() should be signed. https://bugs.freedesktop.org/show_bug.cgi?id=54867 Signed-off-by: Marek Olšák --- src/gallium/drivers/r300/compiler/radeon_rename_regs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/r300/compiler/radeon_rename_regs.c b/src/gallium/drivers/r300/compiler/radeon_rename_regs.c index 7b29eceb684..498b88fca67 100644 --- a/src/gallium/drivers/r300/compiler/radeon_rename_regs.c +++ b/src/gallium/drivers/r300/compiler/radeon_rename_regs.c @@ -68,7 +68,7 @@ void rc_rename_regs(struct radeon_compiler *c, void *user) variables = rc_get_variables(c); for (var_ptr = variables; var_ptr; var_ptr = var_ptr->Next) { - unsigned new_index; + int new_index; unsigned writemask; struct rc_variable * var = var_ptr->Item; -- 2.30.2