diff options
| -rw-r--r-- | buffer.h | 4 | ||||
| -rw-r--r-- | text.h | 4 | ||||
| -rw-r--r-- | vis.h | 4 |
3 files changed, 6 insertions, 6 deletions
@@ -43,9 +43,9 @@ bool buffer_prepend(Buffer*, const void *data, size_t len); /* prepend NUL-terminated data */ bool buffer_prepend0(Buffer*, const char *data); /* set formatted buffer content, ensures NUL termination on success */ -bool buffer_printf(Buffer*, const char *fmt, ...); +bool buffer_printf(Buffer*, const char *fmt, ...) __attribute__((format(printf, 2, 3))); /* append formatted buffer content, ensures NUL termination on success */ -bool buffer_appendf(Buffer*, const char *fmt, ...); +bool buffer_appendf(Buffer*, const char *fmt, ...) __attribute__((format(printf, 2, 3))); /* return length of a buffer without trailing NUL byte */ size_t buffer_length0(Buffer*); /* return length of a buffer including possible NUL byte */ @@ -40,8 +40,8 @@ typedef struct { Text *text_load(const char *filename); /* file information at time of load or last save */ struct stat text_stat(Text*); -bool text_appendf(Text*, const char *format, ...); -bool text_printf(Text*, size_t pos, const char *format, ...); +bool text_appendf(Text*, const char *format, ...) __attribute__((format(printf, 2, 3))); +bool text_printf(Text*, size_t pos, const char *format, ...) __attribute__((format(printf, 3, 4))); /* inserts a line ending character (depending on file type) */ size_t text_insert_newline(Text*, size_t pos); /* insert `len' bytes starting from `data' at `pos' which has to be @@ -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, |
