aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Triplett <josh@freedesktop.org>2007-03-09 16:32:16 -0800
committerJosh Triplett <josh@freedesktop.org>2007-03-09 16:32:16 -0800
commite7680876c48d0f5470b72f3f51fa13f72122b19e (patch)
tree8c5fd8fadac609318810b8f06e826c746320f54a /compile-i386.c
parentFix typos in comments (diff)
downloadsparse-e7680876c48d0f5470b72f3f51fa13f72122b19e.tar.gz
sparse-e7680876c48d0f5470b72f3f51fa13f72122b19e.tar.bz2
sparse-e7680876c48d0f5470b72f3f51fa13f72122b19e.zip
Use GCC format and sentinel attributes on appropriate functions
Expose the FORMAT_ATTR portability macro in lib.h, and use it on the various printf-like functions in sparse. Add a new SENTINEL_ATTR portability macro for the GCC sentinel attribute, and use it on match_idents in parse.c. match_oplist in expression.c should use SENTINEL_ATTR, but GCC does not accept an integer 0 as a sentinel, only a pointer 0 like NULL. Signed-off-by: Josh Triplett <josh@freedesktop.org>
Diffstat (limited to 'compile-i386.c')
-rw-r--r--compile-i386.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/compile-i386.c b/compile-i386.c
index d61652e..74f56a1 100644
--- a/compile-i386.c
+++ b/compile-i386.c
@@ -173,7 +173,7 @@ static struct function *current_func = NULL;
static struct textbuf *unit_post_text = NULL;
static const char *current_section;
-static void emit_comment(const char * fmt, ...);
+static void emit_comment(const char * fmt, ...) FORMAT_ATTR(1);
static void emit_move(struct storage *src, struct storage *dest,
struct symbol *ctype, const char *comment);
static int type_is_signed(struct symbol *sym);