mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 11:50:09 +01:00
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 <brianp@vmware.com>
This commit is contained in:
parent
75fe7d1995
commit
52d021d4d7
1 changed files with 1 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue