summaryrefslogtreecommitdiff
path: root/wt-status.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-07-22 18:23:59 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-07-22 18:23:59 (GMT)
commite9f1a6c189c34a7ea98cbdb92acc677a72a5b4ea (patch)
tree54a4008e527cd1094e14cc9914c0cc55ac46a0a6 /wt-status.h
parentd0b3fa8fd9faf5d18d54e2beb04741fff88af358 (diff)
parent9fe3edc47f1f17a53272671c572c90ba71eb4f74 (diff)
downloadgit-e9f1a6c189c34a7ea98cbdb92acc677a72a5b4ea.zip
git-e9f1a6c189c34a7ea98cbdb92acc677a72a5b4ea.tar.gz
git-e9f1a6c189c34a7ea98cbdb92acc677a72a5b4ea.tar.bz2
Merge branch 'jk/gcc-function-attributes'
Use the function attributes extension to catch mistakes in use of our own variadic functions that use NULL sentinel at the end (i.e. like execl(3)) and format strings (i.e. like printf(3)). * jk/gcc-function-attributes: Add the LAST_ARG_MUST_BE_NULL macro wt-status: use "format" function attribute for status_printf use "sentinel" function attribute for variadic lists add missing "format" function attributes
Diffstat (limited to 'wt-status.h')
-rw-r--r--wt-status.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/wt-status.h b/wt-status.h
index 4121bc2..fb7152e 100644
--- a/wt-status.h
+++ b/wt-status.h
@@ -96,9 +96,9 @@ void wt_status_get_state(struct wt_status_state *state, int get_detached_from);
void wt_shortstatus_print(struct wt_status *s);
void wt_porcelain_print(struct wt_status *s);
-void status_printf_ln(struct wt_status *s, const char *color, const char *fmt, ...)
- ;
-void status_printf(struct wt_status *s, const char *color, const char *fmt, ...)
- ;
+__attribute__((format (printf, 3, 4)))
+void status_printf_ln(struct wt_status *s, const char *color, const char *fmt, ...);
+__attribute__((format (printf, 3, 4)))
+void status_printf(struct wt_status *s, const char *color, const char *fmt, ...);
#endif /* STATUS_H */