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

Brian Paul brianp at vmware.com
Tue Jul 7 15:46:10 PDT 2015


On 07/07/2015 04:45 PM, Vinson Lee wrote:
> 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;
>   }
>
>


Reviewed-by: Brian Paul <brianp at vmware.com>



More information about the Piglit mailing list