[Mesa-dev] [PATCH] Fix format not a string literal error with -Werror=format-security

Kenneth Graunke kenneth at whitecape.org
Fri Jun 10 12:22:18 PDT 2011


On 06/10/2011 11:26 AM, Eugeni Dodonov wrote:
> From: Eugeni Dodonov<eugeni at mandriva.com>
>
> A trivial fix for error: format not a string literal and no format
> arguments with compiling with -Werror=format-security flags.
> ---
>   src/mesa/drivers/dri/i965/brw_fs.cpp |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
> index 09033ae..7c73a8f 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
> @@ -100,7 +100,7 @@ fs_visitor::fail(const char *format, ...)
>      this->fail_msg = msg;
>
>      if (INTEL_DEBUG&  DEBUG_WM) {
> -      fprintf(stderr, msg);
> +      fprintf(stderr, "%s",  msg);
>      }
>   }

Thanks, pushed!  Welcome to the project :)

--Kenneth


More information about the mesa-dev mailing list