On 05/16/2018 01:02 AM, jenny.q.cao wrote:
force cast the I to GLint to avoid the compile warning when type is GLenum16, in
vendor/intel/external/mesa3d-intel/src/mesa/main/get.c:3005:19: warning:
comparison of constant -32768 with
expression of type 'GLenum16' (aka 'unsigned short') is always false
-Wtautologicalia-constant-out-of-range-compare
Tests: compilation without this warning
Signed-off-by: jenny.q.cao <[email protected]>
---
src/mesa/main/get.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 90ab7ca60f8b..5f9a60b0801c 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -3002,7 +3002,7 @@ _mesa_GetFixedv(GLenum pname, GLfixed *params)
break;
case TYPE_ENUM16:
- params[0] = INT_TO_FIXED(((GLenum16 *) p)[0]);
+ params[0] = INT_TO_FIXED((GLint)(((GLenum16 *) p)[0]));
break;
case TYPE_INT_N:
Reviewed-by: Brian Paul <[email protected]>
I'll clean up the commit message a bit and commit this soon. Thanks.
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev