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

Ian Romanick idr at freedesktop.org
Sat Nov 3 05:04:42 UTC 2018


Ah, I guess I didn't realize this took a format string.

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

On 11/02/2018 10:50 AM, Vinson Lee wrote:
> idtech-extension-strings.c: In function ‘check_extension_list’:
> idtech-extension-strings.c:131:10: warning: format not a string literal and no format arguments [-Wformat-security]
>           application_name);
>           ^~~~~~~~~~~~~~~~
> 
> Fixes: f787ad0b6086 ("Add tests for GL_EXTENSION_STRING vs. old idTech2 / idTech3 games")
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>  tests/general/idtech-extension-strings.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/general/idtech-extension-strings.c b/tests/general/idtech-extension-strings.c
> index 194ee5e144f1..cecd47bdef49 100644
> --- a/tests/general/idtech-extension-strings.c
> +++ b/tests/general/idtech-extension-strings.c
> @@ -128,7 +128,7 @@ check_extension_list(const char *application_name,
>  	}
>  
>  	piglit_report_subtest_result(pass ? PIGLIT_PASS : PIGLIT_FAIL,
> -				     application_name);
> +				     "%s", application_name);
>  	return pass;
>  }
>  
> 



More information about the Piglit mailing list