mirror of
https://github.com/postgres/postgres.git
synced 2026-01-05 23:38:41 +03:00
Add missing format attributes
Add __attribute__ decorations for printf format checking to the places that
were missing them. Fix the resulting warnings. Add
-Wmissing-format-attribute to the standard set of warnings for GCC, so these
don't happen again.
The warning fixes here are relatively harmless. The one serious problem
discovered by this was already committed earlier in
cf15fb5cab.
This commit is contained in:
@@ -430,6 +430,7 @@ if test "$GCC" = yes -a "$ICC" = no; then
|
||||
# These work in some but not all gcc versions
|
||||
PGAC_PROG_CC_CFLAGS_OPT([-Wdeclaration-after-statement])
|
||||
PGAC_PROG_CC_CFLAGS_OPT([-Wendif-labels])
|
||||
PGAC_PROG_CC_CFLAGS_OPT([-Wmissing-format-attribute])
|
||||
# This was included in -Wall/-Wformat in older GCC versions
|
||||
PGAC_PROG_CC_CFLAGS_OPT([-Wformat-security])
|
||||
# Disable strict-aliasing rules; needed for gcc 3.3+
|
||||
|
||||
Reference in New Issue
Block a user