diff options
author | Daniel Jacobowitz <drow@false.org> | 2005-07-31 20:56:26 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2005-07-31 20:56:26 +0000 |
commit | bee0189a82dcb04038b1c20d336e5825564f775c (patch) | |
tree | 4d260098c22e36b7efd8528cc91ee39282ce255c /gdb/defs.h | |
parent | 1b9ee6a2f0ff431cced5f27b28a2a9094abe7ae7 (diff) | |
download | gdb-bee0189a82dcb04038b1c20d336e5825564f775c.zip gdb-bee0189a82dcb04038b1c20d336e5825564f775c.tar.gz gdb-bee0189a82dcb04038b1c20d336e5825564f775c.tar.bz2 |
From Kaveh R. Ghazi <ghazi@caip.rutgers.edu>:
gdb/
* cli-out.c (cli_field_fmt, cli_message, out_field_fmt): Add
ATTR_FORMAT or ATTRIBUTE_FPTR_PRINTF.
* complaints.c (vcomplaint): Likewise.
* defs.h (xvasprintf, xstrvprintf, verror, vfatal)
(internal_verror, internal_vwarning, vwarning)
(deprecated_query_hook, deprecated_warning_hook)
(deprecated_readline_begin_hook): Likewise.
* disasm.c (fprintf_disasm): Likewise.
* exceptions.c (throw_it): Likewise.
* exceptions.h (throw_verror, throw_vfatal): Likewise.
* mi/mi-interp.c (mi_interp_query_hook): Likewise.
* mi/mi-out.c (mi_field_fmt, mi_message): Likewise.
* tui/tui-hooks.c (tui_query_hook): Likewise.
* tui/tui-out.c (tui_field_fmt, tui_message, out_field_fmt):
Likewise.
* ui-out.c (default_field_fmt, default_message, uo_field_fmt)
(uo_message): Likewise.
* ui-out.h (ui_out_field_fmt, ui_out_message, field_fmt_ftype)
(message_ftype): Likewise.
* utils.c (vfprintf_maybe_filtered, internal_vproblem)
(defaulted_query, printchar): Likewise.
gdb/gdbserver/
* server.h (error, fatal, warning): Add ATTR_FORMAT.
Diffstat (limited to 'gdb/defs.h')
-rw-r--r-- | gdb/defs.h | 29 |
1 files changed, 19 insertions, 10 deletions
@@ -872,12 +872,14 @@ extern void *xzalloc (size_t); /* Like asprintf/vasprintf but get an internal_error if the call fails. */ extern void xasprintf (char **ret, const char *format, ...) ATTR_FORMAT (printf, 2, 3); -extern void xvasprintf (char **ret, const char *format, va_list ap); +extern void xvasprintf (char **ret, const char *format, va_list ap) + ATTR_FORMAT (printf, 2, 0); /* Like asprintf and vasprintf, but return the string, throw an error if no memory. */ extern char *xstrprintf (const char *format, ...) ATTR_FORMAT (printf, 1, 2); -extern char *xstrvprintf (const char *format, va_list ap); +extern char *xstrvprintf (const char *format, va_list ap) + ATTR_FORMAT (printf, 1, 0); /* Like snprintf, but throw an error if the output buffer is too small. */ extern int xsnprintf (char *str, size_t size, const char *format, ...) @@ -897,24 +899,28 @@ extern char *quit_pre_print; extern char *warning_pre_print; -extern NORETURN void verror (const char *fmt, va_list ap) ATTR_NORETURN; +extern NORETURN void verror (const char *fmt, va_list ap) + ATTR_NORETURN ATTR_FORMAT (printf, 1, 0); extern NORETURN void error (const char *fmt, ...) ATTR_NORETURN ATTR_FORMAT (printf, 1, 2); extern NORETURN void error_stream (struct ui_file *) ATTR_NORETURN; -extern NORETURN void vfatal (const char *fmt, va_list ap) ATTR_NORETURN; +extern NORETURN void vfatal (const char *fmt, va_list ap) + ATTR_NORETURN ATTR_FORMAT (printf, 1, 0); extern NORETURN void fatal (const char *fmt, ...) ATTR_NORETURN ATTR_FORMAT (printf, 1, 2); extern NORETURN void internal_verror (const char *file, int line, - const char *, va_list ap) ATTR_NORETURN; + const char *, va_list ap) + ATTR_NORETURN ATTR_FORMAT (printf, 3, 0); extern NORETURN void internal_error (const char *file, int line, const char *, ...) ATTR_NORETURN ATTR_FORMAT (printf, 3, 4); extern void internal_vwarning (const char *file, int line, - const char *, va_list ap); + const char *, va_list ap) + ATTR_FORMAT (printf, 3, 0); extern void internal_warning (const char *file, int line, const char *, ...) ATTR_FORMAT (printf, 3, 4); @@ -923,7 +929,7 @@ extern NORETURN void nomem (long) ATTR_NORETURN; extern void warning (const char *, ...) ATTR_FORMAT (printf, 1, 2); -extern void vwarning (const char *, va_list args); +extern void vwarning (const char *, va_list args) ATTR_FORMAT (printf, 1, 0); /* List of known OS ABIs. If you change this, make sure to update the table in osabi.c. */ @@ -1092,15 +1098,18 @@ extern void (*deprecated_print_frame_info_listing_hook) (struct symtab * s, int line, int stopline, int noerror); extern struct frame_info *parse_frame_specification (char *frame_exp); -extern int (*deprecated_query_hook) (const char *, va_list); -extern void (*deprecated_warning_hook) (const char *, va_list); +extern int (*deprecated_query_hook) (const char *, va_list) + ATTRIBUTE_FPTR_PRINTF(1,0); +extern void (*deprecated_warning_hook) (const char *, va_list) + ATTRIBUTE_FPTR_PRINTF(1,0); extern void (*deprecated_flush_hook) (struct ui_file * stream); extern void (*deprecated_create_breakpoint_hook) (struct breakpoint * b); extern void (*deprecated_delete_breakpoint_hook) (struct breakpoint * bpt); extern void (*deprecated_modify_breakpoint_hook) (struct breakpoint * bpt); extern void (*deprecated_interactive_hook) (void); extern void (*deprecated_registers_changed_hook) (void); -extern void (*deprecated_readline_begin_hook) (char *,...); +extern void (*deprecated_readline_begin_hook) (char *, ...) + ATTRIBUTE_FPTR_PRINTF_1; extern char *(*deprecated_readline_hook) (char *); extern void (*deprecated_readline_end_hook) (void); extern void (*deprecated_register_changed_hook) (int regno); |