[Piglit] [PATCH] util: Fix GCC format-security warnings.
Vinson Lee
vlee at freedesktop.org
Fri Dec 20 18:33:40 PST 2013
This patches fixes these GCC warnings.
piglit-framework-gl.c: In function ‘piglit_run_selected_subtests’:
piglit-framework-gl.c:294:12: warning: format not a string literal and no format arguments [-Wformat-security]
subtest->name);
^
piglit-framework-gl.c:305:12: warning: format not a string literal and no format arguments [-Wformat-security]
all_subtests[i].name);
^
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
tests/util/piglit-framework-gl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/util/piglit-framework-gl.c b/tests/util/piglit-framework-gl.c
index a0ccbe0..561b1cd 100644
--- a/tests/util/piglit-framework-gl.c
+++ b/tests/util/piglit-framework-gl.c
@@ -290,7 +290,7 @@ piglit_run_selected_subtests(const struct piglit_gl_subtest *all_subtests,
}
subtest_result = subtest->subtest_func(subtest->data);
- piglit_report_subtest_result(subtest_result,
+ piglit_report_subtest_result(subtest_result, "%s",
subtest->name);
piglit_merge_result(&result, subtest_result);
@@ -301,7 +301,7 @@ piglit_run_selected_subtests(const struct piglit_gl_subtest *all_subtests,
for (i = 0; !PIGLIT_GL_SUBTEST_END(&all_subtests[i]); i++) {
const enum piglit_result subtest_result =
all_subtests[i].subtest_func(all_subtests[i].data);
- piglit_report_subtest_result(subtest_result,
+ piglit_report_subtest_result(subtest_result, "%s",
all_subtests[i].name);
piglit_merge_result(&result, subtest_result);
--
1.8.3.2
More information about the Piglit
mailing list