projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
75fe7d1
)
mesa: fix truncated value warning
author
Dylan Noblesmith
<nobled@dreamwidth.org>
Sun, 1 Apr 2012 18:59:28 +0000
(18:59 +0000)
committer
Dylan Noblesmith
<nobled@dreamwidth.org>
Fri, 13 Apr 2012 14:25:08 +0000
(14:25 +0000)
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 <brianp@vmware.com>
src/mesa/main/format_pack.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/format_pack.c
b/src/mesa/main/format_pack.c
index ff08ac561121a4e21b4adab1d7ac0ff2f1cdfc87..7f0bda1278daf17ede6e31b34852f47ac9cabbb5 100644
(file)
--- 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] ? 0xff
ff
: 0x0;
+ d[i] = d[i] ? 0xff : 0x0;
}
}
else if (bits == 16) {