mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +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:
@ -204,7 +204,8 @@ const char *px_resolve_alias(const PX_Alias *aliases, const char *name);
|
||||
void px_set_debug_handler(void (*handler) (const char *));
|
||||
|
||||
#ifdef PX_DEBUG
|
||||
void px_debug(const char *fmt,...);
|
||||
void px_debug(const char *fmt, ...)
|
||||
__attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
|
||||
#else
|
||||
#define px_debug(...)
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user