[Piglit] [PATCH] fbo-alphatest-formats: silence piglit_report_subtest_result() format warnings
Brian Paul
brianp at vmware.com
Fri Sep 27 09:47:11 PDT 2013
silences "tests/fbo/fbo-alphatest-formats.c:184:3: warning: format not
a string literal and no format arguments [-Wformat-security]"
---
A number of tests are generating this warning. If there's no objection,
I'll clean up the other tests too.
---
tests/fbo/fbo-alphatest-formats.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/fbo/fbo-alphatest-formats.c b/tests/fbo/fbo-alphatest-formats.c
index e3c3827..59881c2 100644
--- a/tests/fbo/fbo-alphatest-formats.c
+++ b/tests/fbo/fbo-alphatest-formats.c
@@ -181,7 +181,7 @@ static enum piglit_result test_format(const struct format_desc *format)
if (status != GL_FRAMEBUFFER_COMPLETE_EXT) {
printf("- fbo incomplete (status = %s)\n",
piglit_get_gl_enum_name(status));
- piglit_report_subtest_result(PIGLIT_SKIP, format->name);
+ piglit_report_subtest_result(PIGLIT_SKIP, "%s", format->name);
return PIGLIT_SKIP;
}
printf("\n");
@@ -254,7 +254,7 @@ static enum piglit_result test_format(const struct format_desc *format)
if (!pass) {
piglit_present_results();
- piglit_report_subtest_result(PIGLIT_FAIL, format->name);
+ piglit_report_subtest_result(PIGLIT_FAIL, "%s", format->name);
return PIGLIT_FAIL;
}
@@ -316,7 +316,7 @@ static enum piglit_result test_format(const struct format_desc *format)
piglit_present_results();
piglit_report_subtest_result(pass ? PIGLIT_PASS : PIGLIT_FAIL,
- format->name);
+ "%s", format->name);
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
--
1.7.10.4
More information about the Piglit
mailing list