[Piglit] [PATCH] arb_framebuffer_no_attachments: Fix GCC format-security warning.

Vinson Lee vlee at freedesktop.org
Tue Jul 7 15:45:22 PDT 2015


atomic.c: In function ‘compare_counter’:
atomic.c:84:3: warning: format not a string literal and no format arguments [-Wformat-security]
   subtest);
   ^

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

diff --git a/tests/spec/arb_framebuffer_no_attachments/atomic.c b/tests/spec/arb_framebuffer_no_attachments/atomic.c
index c32990f..36c8d4b 100644
--- a/tests/spec/arb_framebuffer_no_attachments/atomic.c
+++ b/tests/spec/arb_framebuffer_no_attachments/atomic.c
@@ -81,7 +81,7 @@ compare_counter(uint32_t value, const char *subtest)
 			__func__, subtest, value, *ptr);
 	glUnmapBuffer(GL_ATOMIC_COUNTER_BUFFER);
 	piglit_report_subtest_result(result ? PIGLIT_PASS : PIGLIT_FAIL,
-		subtest);
+		"%s", subtest);
 	return result;
 }
 
-- 
2.1.4



More information about the Piglit mailing list