summaryrefslogtreecommitdiff
path: root/nasmlib.h
diff options
context:
space:
mode:
authorVictor van den Elzen <victor.vde@gmail.com>2009-08-11 02:10:16 +0200
committerVictor van den Elzen <victor.vde@gmail.com>2009-08-11 02:43:41 +0200
commit15bb2330368783724cf526dfec5c02d028bd5b98 (patch)
treefa653bd47ff1a50eb5e0264cadf158413e3b9ca0 /nasmlib.h
parent5a49e7c578378308c4e866313ea08c65e6869a06 (diff)
downloadnasm-15bb2330368783724cf526dfec5c02d028bd5b98.tar.gz
Fix some format strings for nasm_error
Added a format attribute to nasm_error (only for GCC) and used the resulting warnings to fix some format strings.
Diffstat (limited to 'nasmlib.h')
-rw-r--r--nasmlib.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/nasmlib.h b/nasmlib.h
index 3cb15bae..c42c3fd2 100644
--- a/nasmlib.h
+++ b/nasmlib.h
@@ -84,7 +84,11 @@ extern unsigned char nasm_tolower_tab[256];
*/
typedef void (*efunc) (int severity, const char *fmt, ...);
typedef void (*vefunc) (int severity, const char *fmt, va_list ap);
+#ifdef __GNUC__
+void nasm_error(int severity, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
+#else
void nasm_error(int severity, const char *fmt, ...);
+#endif
void nasm_set_verror(vefunc);
/*