Browse Source

squelch compiler warning

David Rose 17 years ago
parent
commit
2fc114a01e
1 changed files with 4 additions and 4 deletions
  1. 4 4
      panda/src/glstuff/glGraphicsStateGuardian_src.cxx

+ 4 - 4
panda/src/glstuff/glGraphicsStateGuardian_src.cxx

@@ -6748,14 +6748,14 @@ upload_usage_texture(int width, int height) {
     // answer wordwise, independently of machine byte-ordernig.
     // answer wordwise, independently of machine byte-ordernig.
     union {
     union {
       struct { 
       struct { 
-        char r, g, b, a;
+        unsigned char r, g, b, a;
       } b;
       } b;
       PN_uint32 w;
       PN_uint32 w;
     } store;
     } store;
 
 
-    store.b.r = (int)(c[0] * 255.0f);
-    store.b.g = (int)(c[1] * 255.0f);
-    store.b.b = (int)(c[2] * 255.0f);
+    store.b.r = (unsigned char)(c[0] * 255.0f);
+    store.b.g = (unsigned char)(c[1] * 255.0f);
+    store.b.b = (unsigned char)(c[2] * 255.0f);
     store.b.a = 0xff;
     store.b.a = 0xff;
 
 
     // Fill in the array.
     // Fill in the array.