diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-07-02 14:04:55 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-07-02 14:04:55 +0300 |
commit | 1568ad915ce84af144d5b0c7d0f4b294930de1e2 (patch) | |
tree | be1119ee04980b17c87ed80979f3103eabc2a21f /include/smap | |
parent | 80dffb7fa56731b80befbbcbefe88e8018d63394 (diff) | |
download | smap-1568ad915ce84af144d5b0c7d0f4b294930de1e2.tar.gz smap-1568ad915ce84af144d5b0c7d0f4b294930de1e2.tar.bz2 |
Fix the mess with format specifications.
Diffstat (limited to 'include/smap')
-rw-r--r-- | include/smap/diag.h | 5 | ||||
-rw-r--r-- | include/smap/printf.h | 6 | ||||
-rw-r--r-- | include/smap/stream.h | 3 | ||||
-rw-r--r-- | include/smap/wordsplit.h | 6 |
4 files changed, 13 insertions, 7 deletions
diff --git a/include/smap/diag.h b/include/smap/diag.h index 17976a8..3968d0e 100644 --- a/include/smap/diag.h +++ b/include/smap/diag.h @@ -24,7 +24,7 @@ extern smap_stream_t smap_debug_str; extern smap_stream_t smap_trace_str; void smap_verror(const char *fmt, va_list ap); -void smap_error(const char *fmt, ...); +void smap_error(const char *fmt, ...) __attribute__ ((__format__ (__printf__, 1, 2))); extern char *smap_progname; @@ -39,7 +39,8 @@ size_t smtp_debug_locate_n(const char *name, size_t len); size_t smtp_debug_locate(const char *name); size_t smap_debug_alloc_n(const char *name, size_t n); size_t smap_debug_alloc(const char *name); -void smap_debug_printf(const char *fmt, ...); +void smap_debug_printf(const char *fmt, ...) + __attribute__ ((__format__ (__printf__, 1, 2))); int smap_debug_set(const char *spec); #define smap_debug(num, lev, args) \ diff --git a/include/smap/printf.h b/include/smap/printf.h index 01650fb..6391b5a 100644 --- a/include/smap/printf.h +++ b/include/smap/printf.h @@ -20,7 +20,9 @@ #include <stdarg.h> int smap_vasnprintf(char **pbuf, size_t *psize, const char *fmt, va_list ap); -int smap_asnprintf(char **pbuf, size_t *psize, const char *fmt, ...); -int smap_asprintf(char **pbuf, const char *fmt, ...); +int smap_asnprintf(char **pbuf, size_t *psize, const char *fmt, ...) + __attribute__ ((__format__ (__printf__, 3, 4))); +int smap_asprintf(char **pbuf, const char *fmt, ...) + __attribute__ ((__format__ (__printf__, 2, 3))); #endif diff --git a/include/smap/stream.h b/include/smap/stream.h index d4412e5..281f9bf 100644 --- a/include/smap/stream.h +++ b/include/smap/stream.h @@ -103,7 +103,8 @@ int smap_stream_set_flags(smap_stream_t stream, int fl); int smap_stream_clr_flags(smap_stream_t stream, int fl); int smap_stream_vprintf(smap_stream_t str, const char *fmt, va_list ap); -int smap_stream_printf(smap_stream_t stream, const char *fmt, ...); +int smap_stream_printf(smap_stream_t stream, const char *fmt, ...) + __attribute__ ((__format__ (__printf__, 2, 3))); int smap_fileout_stream_create (smap_stream_t *pstream, FILE *file, diff --git a/include/smap/wordsplit.h b/include/smap/wordsplit.h index de3a697..204a9e0 100644 --- a/include/smap/wordsplit.h +++ b/include/smap/wordsplit.h @@ -29,8 +29,10 @@ struct wordsplit const char *ws_delim; const char *ws_comment; void (*ws_alloc_die)(struct wordsplit *wsp); - void (*ws_error)(const char *, ...); - void (*ws_debug)(const char *, ...); + void (*ws_error)(const char *, ...) + __attribute__ ((__format__ (__printf__, 1, 2))); + void (*ws_debug)(const char *, ...) + __attribute__ ((__format__ (__printf__, 1, 2))); const char **ws_env; char *(*ws_getvar)(const char *, size_t); |