[Mesa-dev] [PATCH 5/5] i965: make swizzle_for_size() return unsigned

Brian Paul brian.e.paul at gmail.com
Fri Oct 7 07:30:30 PDT 2011


From: Brian Paul <brianp at vmware.com>

Silences a warning about comparing to an unsigned variable.  It looks like
the result of swizzle_for_size() is always assigned to unsigned vars.
---
 src/mesa/drivers/dri/i965/brw_vec4.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h
index 1caf1a6..eae841c 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_vec4.h
@@ -47,10 +47,10 @@ class dst_reg;
  * channels, as that will tell optimization passes that those other
  * channels are used.
  */
-static int
+static unsigned
 swizzle_for_size(int size)
 {
-   static const int size_swizzles[4] = {
+   static const unsigned size_swizzles[4] = {
       BRW_SWIZZLE4(SWIZZLE_X, SWIZZLE_X, SWIZZLE_X, SWIZZLE_X),
       BRW_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Y, SWIZZLE_Y),
       BRW_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_Z),
-- 
1.7.3.4



More information about the mesa-dev mailing list