Add gcc attribute format where it's missing

This commit is contained in:
Markus Armbruster 2008-08-02 12:00:33 -04:00
parent eb252201b6
commit 1d9aac2cf9
4 changed files with 8 additions and 2 deletions

View file

@ -43,7 +43,8 @@ struct xdstr {
natid cnum; /* dump for this country */ natid cnum; /* dump for this country */
int divine; /* is this a deity dump? */ int divine; /* is this a deity dump? */
int human; /* dump human-readable format */ int human; /* dump human-readable format */
void (*pr)(char *fmt, ...); /* callback for printing dump */ void (*pr)(char *fmt, ...) /* callback for printing dump */
ATTRIBUTE((format (printf, 1, 2)));
}; };
struct xdstr *xdinit(struct xdstr *, natid, int, void (*)(char *, ...)); struct xdstr *xdinit(struct xdstr *, natid, int, void (*)(char *, ...));

View file

@ -172,6 +172,7 @@ static void **ppvUserData;
/* Global flags. From empth_init parameter. */ /* Global flags. From empth_init parameter. */
static int global_flags; static int global_flags;
static void loc_debug(const char *, ...) ATTRIBUTE((format(printf, 1, 2)));
/************************ /************************
* loc_debug * loc_debug

View file

@ -64,6 +64,9 @@
static char journal_fname[] = "journal.log"; static char journal_fname[] = "journal.log";
static FILE *journal; static FILE *journal;
static void journal_entry(char *fmt, ...)
ATTRIBUTE((format (printf, 1, 2)));
static FILE * static FILE *
journal_open(void) journal_open(void)
{ {

View file

@ -45,7 +45,8 @@
#include "version.h" #include "version.h"
#include "xdump.h" #include "xdump.h"
static void exit_bad_arg(char *, ...) ATTRIBUTE((noreturn)); static void exit_bad_arg(char *, ...)
ATTRIBUTE((noreturn, format (printf, 1, 2)));
static void dump_table(int, int); static void dump_table(int, int);
static void pln_fixup(void); static void pln_fixup(void);
static void lnd_fixup(void); static void lnd_fixup(void);