Skip to content

Commit

Permalink
Add -Wextra and -Wformat-security options to CFLAGS without autoconf …
Browse files Browse the repository at this point in the history
…tests.

All modern versions of GCC and Clang support these options.
  • Loading branch information
royhills committed Sep 15, 2024
1 parent 396c5ed commit 1e10d9d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 51 deletions.
4 changes: 1 addition & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@ fi
if test -n "$GCC"; then
AC_DEFINE([ATTRIBUTE_UNUSED], [__attribute__ ((__unused__))],
[Define to the compiler's unused pragma])
CFLAGS="$CFLAGS -Wall -Wshadow -Wwrite-strings"
GCC_WEXTRA
CFLAGS="$CFLAGS -Wall -Wextra -Wformat-security -Wshadow -Wwrite-strings"
GCC_STACK_PROTECT_CC
GCC_FORMAT_SECURITY
GCC_FORTIFY_SOURCE
dnl Uncomment the lines below for testing with stricter warnings.
dnl CFLAGS="$CFLAGS -pedantic -Wpointer-arith -Wcast-qual -Wcast-align -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline "
Expand Down
30 changes: 0 additions & 30 deletions m4/gcc-format-security.m4

This file was deleted.

18 changes: 0 additions & 18 deletions m4/gcc-wextra.m4

This file was deleted.

0 comments on commit 1e10d9d

Please sign in to comment.