From 2fc114a01e9299e461d564775336600fb86171d3 Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 5 Feb 2009 20:01:44 +0000 Subject: [PATCH] squelch compiler warning --- panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 9a0a588cdf..ef3d908c3c 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -6748,14 +6748,14 @@ upload_usage_texture(int width, int height) { // answer wordwise, independently of machine byte-ordernig. union { struct { - char r, g, b, a; + unsigned char r, g, b, a; } b; PN_uint32 w; } 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; // Fill in the array.