[PATCH util-macros 2/2] Add -Wformat=2 to the default CWARNFLAGS

Matt Turner mattst88 at gmail.com
Wed Feb 3 07:45:29 PST 2010


On Tue, Feb 2, 2010 at 5:44 PM, Jeremy Huddleston
<jeremyhu at freedesktop.org> wrote:
> This will include -Wformat-security to catch possible security problems in formatting in printf, scanf, etc.
>
> Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
> ---
>  xorg-macros.m4.in |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in
> index 40f5939..6d6f044 100644
> --- a/xorg-macros.m4.in
> +++ b/xorg-macros.m4.in
> @@ -589,7 +589,7 @@ AC_REQUIRE([AC_PROG_CC])
>  if  test "x$GCC" = xyes ; then
>     CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
>  -Wmissing-declarations -Wnested-externs -Wstrict-aliasing=2 \
> --Wbad-function-cast"
> +-Wbad-function-cast -Wformat=2"
>     case `$CC -dumpversion` in
>     3.4.* | 4.*)
>        CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
> --
> 1.6.2
>
>
> _______________________________________________
> xorg-devel mailing list
> xorg-devel at lists.x.org
> http://lists.x.org/mailman/listinfo/xorg-devel

Reviewed-by: Matt Turner <mattst88 at gmail.com>


More information about the xorg-devel mailing list