[Piglit] [PATCH] egl-query-surface: Fix printf format warning.

Brian Paul brianp at vmware.com
Thu Dec 1 06:35:39 PST 2011


On 11/30/2011 03:29 PM, Vinson Lee wrote:
> Fixes this GCC warning.
> egl-query-surface.c: In function ‘usage_error’:
> egl-query-surface.c:55:2: warning: format not a string literal and no format arguments [-Wformat-security]
>
> Signed-off-by: Vinson Lee<vlee at vmware.com>
> ---
>   tests/egl/egl-query-surface.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/tests/egl/egl-query-surface.c b/tests/egl/egl-query-surface.c
> index c590018..f9c315d 100644
> --- a/tests/egl/egl-query-surface.c
> +++ b/tests/egl/egl-query-surface.c
> @@ -52,7 +52,7 @@ usage_error()
>   		"    egl-query-surface [-auto] --attr=EGL_WIDTH\n"
>   		"    egl-query-surface [-auto] --attr=EGL_HEIGHT\n"
>   		"        Call eglQueryDrawable() with the given attribute.\n";
> -	printf(message);
> +	printf("%s", message);
>   	piglit_report_result(PIGLIT_FAIL);
>   }
>


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


More information about the Piglit mailing list