1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Consistently use gcc's __attribute__((format)) to check sprintf-style

format strings wherever possible.  Remarkably, this exercise didn't
turn up any inconsistencies, but it seems a good idea for the future.
This commit is contained in:
Tom Lane
2001-10-03 21:58:28 +00:00
parent 2e5fda7b7e
commit fcd2e372a7
8 changed files with 42 additions and 42 deletions

View File

@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup.h,v 1.14 2001/08/22 20:23:23 petere Exp $
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup.h,v 1.15 2001/10/03 21:58:28 tgl Exp $
*
* Modifications - 28-Jun-2000 - pjw@rhyme.com.au
*
@ -130,7 +130,8 @@ typedef struct _restoreOptions
* Main archiver interface.
*/
extern void exit_horribly(Archive *AH, const char *modulename, const char *fmt, ...) __attribute__((format(printf,3,4)));
extern void exit_horribly(Archive *AH, const char *modulename, const char *fmt, ...)
__attribute__((format(printf,3,4)));
extern char *
simple_prompt(const char *prompt, int maxlen, bool echo);
@ -188,6 +189,8 @@ extern void SortTocFromFile(Archive *AH, RestoreOptions *ropt);
/* Convenience functions used only when writing DATA */
extern int archputs(const char *s, Archive *AH);
extern int archputc(const char c, Archive *AH);
extern int archprintf(Archive *AH, const char *fmt,...);
extern int archprintf(Archive *AH, const char *fmt, ...)
/* This extension allows gcc to check the format string */
__attribute__((format(printf, 2, 3)));
#endif