diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-12-22 16:36:06 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-12-23 19:41:41 +0100 |
| commit | e28459d8836810a1ea057ff2d47f223fb4f110e5 (patch) | |
| tree | fe8587ee43f6e23793457a529416b779e578bc4c /vis.h | |
| parent | 58001e979af57701e36c58e0b36ea5f79246b012 (diff) | |
| download | vis-e28459d8836810a1ea057ff2d47f223fb4f110e5.tar.gz vis-e28459d8836810a1ea057ff2d47f223fb4f110e5.tar.xz | |
Apply format string attribute to printf style functions
Not strictly C99 conform, but widely supported and easy enough to NOP
for compilers which do not support it. Besides it was already used to
mark certain functions as noreturn.
Diffstat (limited to 'vis.h')
| -rw-r--r-- | vis.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -122,7 +122,7 @@ int vis_window_height_get(const Win*); void vis_prompt_show(Vis*, const char *title); /* display a one line message to the user, will be hidden upon keypress */ -void vis_info_show(Vis*, const char *msg, ...); +void vis_info_show(Vis*, const char *msg, ...) __attribute__((format(printf, 2, 3))); void vis_info_hide(Vis*); /* display an arbitrary long message in a special window/file */ @@ -150,7 +150,7 @@ int vis_run(Vis*, int argc, char *argv[]); /* terminate editing session, given status will be the return value of vis_run */ void vis_exit(Vis*, int status); /* emergency exit, print given message, perform minimal ui cleanup and exit process */ -void vis_die(Vis*, const char *msg, ...) __attribute__((noreturn)); +void vis_die(Vis*, const char *msg, ...) __attribute__((noreturn,format(printf, 2, 3))); enum VisMode { VIS_MODE_NORMAL, |
