Mesa (master): util: Avoid signed/unsigned comparison in u_trim_pipe_prim() .

Jose Fonseca jrfonseca at kemper.freedesktop.org
Mon Nov 14 10:42:32 UTC 2011


Module: Mesa
Branch: master
Commit: 6246c217ec1d00bf94a121508802eb7e49d5b61e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6246c217ec1d00bf94a121508802eb7e49d5b61e

Author: José Fonseca <jfonseca at vmware.com>
Date:   Fri Nov 11 08:25:13 2011 +0000

util: Avoid signed/unsigned comparison in u_trim_pipe_prim().

---

 src/gallium/auxiliary/util/u_prim.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_prim.h b/src/gallium/auxiliary/util/u_prim.h
index ca7c67d..070df64 100644
--- a/src/gallium/auxiliary/util/u_prim.h
+++ b/src/gallium/auxiliary/util/u_prim.h
@@ -78,7 +78,7 @@ static INLINE boolean u_validate_pipe_prim( unsigned pipe_prim, unsigned nr )
 static INLINE boolean u_trim_pipe_prim( unsigned pipe_prim, unsigned *nr )
 {
    boolean ok = TRUE;
-   const static int values[][2] = {
+   const static unsigned values[][2] = {
       { 1, 0 }, /* PIPE_PRIM_POINTS */
       { 2, 2 }, /* PIPE_PRIM_LINES */
       { 2, 0 }, /* PIPE_PRIM_LINE_LOOP */




More information about the mesa-commit mailing list