[Piglit] [PATCH 1/2] fbo: Silence compiler warnings about const mismatches
Ian Romanick
idr at freedesktop.org
Tue Jan 22 21:33:10 UTC 2019
From: Ian Romanick <ian.d.romanick at intel.com>
tests/fbo/fbo-blending-format-quirks.c: In function ‘piglit_display’:
tests/fbo/fbo-blending-format-quirks.c:157:40: warning: passing argument 2 of ‘test_formats’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
result = test_formats(cases[i].name, cases[i].formats,
^~~~~
tests/fbo/fbo-blending-format-quirks.c:45:27: note: expected ‘GLenum * {aka unsigned int *}’ but argument is of type ‘const GLenum * {aka const unsigned int *}’
static enum piglit_result test_formats(const char *name, GLenum formats[2],
^~~~~~~~~~~~
tests/fbo/fbo-blending-format-quirks.c:158:11: warning: passing argument 3 of ‘test_formats’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-array-qualifiers]
cases[i].expect, cases[i].factors);
^~~~~
tests/fbo/fbo-blending-format-quirks.c:45:27: note: expected ‘float (*)[4]’ but argument is of type ‘const float (*)[4]’
static enum piglit_result test_formats(const char *name, GLenum formats[2],
^~~~~~~~~~~~
tests/fbo/fbo-blending-format-quirks.c:158:28: warning: passing argument 4 of ‘test_formats’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
cases[i].expect, cases[i].factors);
^~~~~
tests/fbo/fbo-blending-format-quirks.c:45:27: note: expected ‘GLenum * {aka unsigned int *}’ but argument is of type ‘const GLenum * {aka const unsigned int *}’
static enum piglit_result test_formats(const char *name, GLenum formats[2],
^~~~~~~~~~~~
---
tests/fbo/fbo-blending-format-quirks.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/fbo/fbo-blending-format-quirks.c b/tests/fbo/fbo-blending-format-quirks.c
index 1b71b3252..1e931e970 100644
--- a/tests/fbo/fbo-blending-format-quirks.c
+++ b/tests/fbo/fbo-blending-format-quirks.c
@@ -42,8 +42,9 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
PIGLIT_GL_TEST_CONFIG_END
-static enum piglit_result test_formats(const char *name, GLenum formats[2],
- float expect[2][4], GLenum factors[2])
+static enum piglit_result
+test_formats(const char *name, const GLenum formats[2],
+ const float expect[2][4], const GLenum factors[2])
{
GLboolean pass = GL_TRUE;
GLuint tex[2], fb;
--
2.14.5
More information about the Piglit
mailing list