diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-07-22 11:23:59 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-07-22 11:23:59 -0700 |
commit | e9f1a6c189c34a7ea98cbdb92acc677a72a5b4ea (patch) | |
tree | 54a4008e527cd1094e14cc9914c0cc55ac46a0a6 /wt-status.h | |
parent | Merge branch 'db/show-ref-head' (diff) | |
parent | Add the LAST_ARG_MUST_BE_NULL macro (diff) | |
download | tgif-e9f1a6c189c34a7ea98cbdb92acc677a72a5b4ea.tar.xz |
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.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/wt-status.h b/wt-status.h index 4121bc208d..fb7152e187 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 */ |