summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan Noblesmith <[email protected]>2012-04-01 18:59:28 +0000
committerDylan Noblesmith <[email protected]>2012-04-13 14:25:08 +0000
commit52d021d4d785a4567b9e73ef89e74a295e8cfed9 (patch)
treea7ab86a6534fbaeedbffbb3c41c3e253814604da
parent75fe7d1995cc828e821efddfaee8cbc52e27a52c (diff)
mesa: fix truncated value warning
Silences a clang warning: format_pack.c:2546:30: warning: implicit conversion from 'int' to 'GLubyte' (aka 'unsigned char') changes value from 65535 to 255 [-Wconstant-conversion] d[i] = d[i] ? 0xffff : 0x0; ~ ^~~~~~ Reviewed-by: Brian Paul <[email protected]>
-rw-r--r--src/mesa/main/format_pack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/format_pack.c b/src/mesa/main/format_pack.c
index ff08ac56112..7f0bda1278d 100644
--- a/src/mesa/main/format_pack.c
+++ b/src/mesa/main/format_pack.c
@@ -2605,7 +2605,7 @@ _mesa_pack_colormask(gl_format format, const GLubyte colorMask[4], void *dst)
if (bits == 8) {
GLubyte *d = (GLubyte *) dst;
for (i = 0; i < bytes; i++) {
- d[i] = d[i] ? 0xffff : 0x0;
+ d[i] = d[i] ? 0xff : 0x0;
}
}
else if (bits == 16) {