[Piglit] [PATCH] arb_query_buffer_object: Fix format-security warning.

Vinson Lee vlee at freedesktop.org
Wed May 11 00:48:07 UTC 2016


qbo.c: In function ‘run_subtest_and_present’:
qbo.c:269:2: warning: format not a string literal and no format arguments [-Wformat-security]
  piglit_report_subtest_result(r, subtest_name);
  ^

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 tests/spec/arb_query_buffer_object/qbo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/spec/arb_query_buffer_object/qbo.c b/tests/spec/arb_query_buffer_object/qbo.c
index bd47dd2a3989..1bcbe1035fad 100644
--- a/tests/spec/arb_query_buffer_object/qbo.c
+++ b/tests/spec/arb_query_buffer_object/qbo.c
@@ -266,7 +266,7 @@ run_subtest_and_present(void)
 	asprintf(&subtest_name, "query-%s-%s",
 		 piglit_get_gl_enum_name(query_type),
 		 sync_mode_names[sync_mode]);
-	piglit_report_subtest_result(r, subtest_name);
+	piglit_report_subtest_result(r, "%s", subtest_name);
 	free(subtest_name);
 	return r;
 }
-- 
2.7.4



More information about the Piglit mailing list