* ada-lang.c (lim_warning): Change ATTR_FORMAT to ATTRIBUTE_PRINTF.
	* amd64-tdep.c (amd64_insn_length_fprintf): Likewise.
	* cli-out.c (cli_field_fmt): New ATTRIBUTE_PRINTF.
	(cli_message, out_field_fmt): Change ATTR_FORMAT to ATTRIBUTE_PRINTF.
	* complaints.c (find_complaint): New ATTRIBUTE_PRINTF.
	(vcomplaint): Change ATTR_FORMAT to ATTRIBUTE_PRINTF.
	* complaints.h (complaint, internal_complaint): Likewise.
	* defs.h: Change ATTR_FORMAT to ATTRIBUTE_PRINTF in the top comment.
	(ATTR_FORMAT): Remove.
	(query, nquery, yquery, vprintf_filtered, vfprintf_filtered)
	(fprintf_filtered, fprintfi_filtered, printf_filtered, printfi_filtered)
	(vprintf_unfiltered, vfprintf_unfiltered, fprintf_unfiltered)
	(printf_unfiltered, xasprintf, xvasprintf, xstrprintf, xstrvprintf)
	(xsnprintf, verror, error, vfatal, fatal, internal_verror)
	(internal_error, internal_vwarning, internal_warning, warning)
	(vwarning): Change ATTR_FORMAT to ATTRIBUTE_PRINTF.
	* disasm.c (fprintf_disasm): Likewise.
	* exceptions.c (throw_it): Likewise.
	* exceptions.h (exception_fprintf, throw_verror, throw_vfatal)
	(throw_error): Likewise.
	* language.h (type_error, range_error): Likewise.
	* linespec.c (cplusplus_error): Likewise.
	* mi/mi-interp.c (mi_interp_query_hook): Likewise.
	* mi/mi-out.c (mi_field_fmt, mi_message): Likewise.
	* monitor.c (monitor_debug): Likewise.
	* parser-defs.h (parser_fprintf): Likewise.
	* serial.h (serial_printf): Likewise.
	* tui/tui-hooks.c (tui_query_hook): 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): Likewise.
	* utils.c (vfprintf_maybe_filtered, internal_vproblem, defaulted_query):
	Likewise.
	* xml-support.h (gdb_xml_debug, gdb_xml_error): Likewise.
This commit is contained in:
Jan Kratochvil 2010-05-02 21:14:59 +00:00
parent 02a45ac028
commit a0b31db1be
22 changed files with 103 additions and 73 deletions

View File

@ -1,3 +1,40 @@
2010-05-02 Jan Kratochvil <jan.kratochvil@redhat.com>
* ada-lang.c (lim_warning): Change ATTR_FORMAT to ATTRIBUTE_PRINTF.
* amd64-tdep.c (amd64_insn_length_fprintf): Likewise.
* cli-out.c (cli_field_fmt): New ATTRIBUTE_PRINTF.
(cli_message, out_field_fmt): Change ATTR_FORMAT to ATTRIBUTE_PRINTF.
* complaints.c (find_complaint): New ATTRIBUTE_PRINTF.
(vcomplaint): Change ATTR_FORMAT to ATTRIBUTE_PRINTF.
* complaints.h (complaint, internal_complaint): Likewise.
* defs.h: Change ATTR_FORMAT to ATTRIBUTE_PRINTF in the top comment.
(ATTR_FORMAT): Remove.
(query, nquery, yquery, vprintf_filtered, vfprintf_filtered)
(fprintf_filtered, fprintfi_filtered, printf_filtered, printfi_filtered)
(vprintf_unfiltered, vfprintf_unfiltered, fprintf_unfiltered)
(printf_unfiltered, xasprintf, xvasprintf, xstrprintf, xstrvprintf)
(xsnprintf, verror, error, vfatal, fatal, internal_verror)
(internal_error, internal_vwarning, internal_warning, warning)
(vwarning): Change ATTR_FORMAT to ATTRIBUTE_PRINTF.
* disasm.c (fprintf_disasm): Likewise.
* exceptions.c (throw_it): Likewise.
* exceptions.h (exception_fprintf, throw_verror, throw_vfatal)
(throw_error): Likewise.
* language.h (type_error, range_error): Likewise.
* linespec.c (cplusplus_error): Likewise.
* mi/mi-interp.c (mi_interp_query_hook): Likewise.
* mi/mi-out.c (mi_field_fmt, mi_message): Likewise.
* monitor.c (monitor_debug): Likewise.
* parser-defs.h (parser_fprintf): Likewise.
* serial.h (serial_printf): Likewise.
* tui/tui-hooks.c (tui_query_hook): 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): Likewise.
* utils.c (vfprintf_maybe_filtered, internal_vproblem, defaulted_query):
Likewise.
* xml-support.h (gdb_xml_debug, gdb_xml_error): Likewise.
2010-05-02 Pedro Alves <pedro@codesourcery.com>
* cli-out.c (cli_table_begin, cli_table_body, cli_table_end)

View File

@ -501,7 +501,7 @@ cond_offset_target (CORE_ADDR address, long offset)
/* FIXME: cagney/2004-10-10: This function is mimicking the behavior
provided by "complaint". */
static void lim_warning (const char *format, ...) ATTR_FORMAT (printf, 1, 2);
static void lim_warning (const char *format, ...) ATTRIBUTE_PRINTF (1, 2);
static void
lim_warning (const char *format, ...)

View File

@ -1026,7 +1026,7 @@ amd64_skip_prefixes (gdb_byte *insn)
This function is a nop, we don't want to print anything, we just want to
compute the length of the insn. */
static int ATTR_FORMAT (printf, 2, 3)
static int ATTRIBUTE_PRINTF (2, 3)
amd64_insn_length_fprintf (void *stream, const char *format, ...)
{
return 0;

View File

@ -38,7 +38,7 @@ static void field_separator (void);
static void out_field_fmt (struct ui_out *uiout, int fldno,
const char *fldname,
const char *format,...) ATTR_FORMAT (printf, 4, 5);
const char *format,...) ATTRIBUTE_PRINTF (4, 5);
/* These are the CLI output functions */
@ -209,7 +209,7 @@ cli_field_string (struct ui_out *uiout,
/* This is the only field function that does not align. */
static void
static void ATTRIBUTE_PRINTF (6, 0)
cli_field_fmt (struct ui_out *uiout, int fldno,
int width, enum ui_align align,
const char *fldname,
@ -244,7 +244,7 @@ cli_text (struct ui_out *uiout, const char *string)
fputs_filtered (string, data->stream);
}
static void ATTR_FORMAT (printf, 3,0)
static void ATTRIBUTE_PRINTF (3, 0)
cli_message (struct ui_out *uiout, int verbosity,
const char *format, va_list args)
{

View File

@ -120,7 +120,7 @@ get_complaints (struct complaints **c)
return (*c);
}
static struct complain *
static struct complain * ATTRIBUTE_PRINTF (4, 0)
find_complaint (struct complaints *complaints, const char *file,
int line, const char *fmt)
{
@ -164,7 +164,7 @@ static int stop_whining = 0;
/* Print a complaint, and link the complaint block into a chain for
later handling. */
static void ATTR_FORMAT (printf, 4, 0)
static void ATTRIBUTE_PRINTF (4, 0)
vcomplaint (struct complaints **c, const char *file, int line, const char *fmt,
va_list args)
{

View File

@ -31,10 +31,10 @@ extern struct complaints *symfile_complaints;
/* Register a complaint. */
extern void complaint (struct complaints **complaints, const char *fmt,
...) ATTR_FORMAT (printf, 2, 3);
...) ATTRIBUTE_PRINTF (2, 3);
extern void internal_complaint (struct complaints **complaints,
const char *file, int line, const char *fmt,
...) ATTR_FORMAT (printf, 4, 5);
...) ATTRIBUTE_PRINTF (4, 5);
/* Clear out / initialize all complaint counters that have ever been
incremented. If LESS_VERBOSE is 1, be less verbose about

View File

@ -1,4 +1,5 @@
/* *INDENT-OFF* */ /* ATTR_FORMAT confuses indent, avoid running it for now */
/* *INDENT-OFF* */ /* ATTRIBUTE_PRINTF confuses indent, avoid running it
for now. */
/* Basic, host-specific, and target-specific definitions for GDB.
Copyright (C) 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009,
@ -296,14 +297,6 @@ struct cleanup
#endif
#endif
#ifndef ATTR_FORMAT
#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 4))
#define ATTR_FORMAT(type, x, y) __attribute__ ((format(type, x, y)))
#else
#define ATTR_FORMAT(type, x, y) /* nothing */
#endif
#endif
/* Be conservative and use enum bitfields only with GCC.
This is copied from gcc 3.3.1, system.h. */
@ -404,9 +397,9 @@ extern void null_cleanup (void *);
extern int myread (int, char *, int);
extern int query (const char *, ...) ATTR_FORMAT (printf, 1, 2);
extern int nquery (const char *, ...) ATTR_FORMAT (printf, 1, 2);
extern int yquery (const char *, ...) ATTR_FORMAT (printf, 1, 2);
extern int query (const char *, ...) ATTRIBUTE_PRINTF (1, 2);
extern int nquery (const char *, ...) ATTRIBUTE_PRINTF (1, 2);
extern int yquery (const char *, ...) ATTRIBUTE_PRINTF (1, 2);
extern void init_page_info (void);
@ -492,25 +485,25 @@ extern void puts_filtered_tabular (char *string, int width, int right);
extern void puts_debug (char *prefix, char *string, char *suffix);
extern void vprintf_filtered (const char *, va_list) ATTR_FORMAT (printf, 1, 0);
extern void vprintf_filtered (const char *, va_list) ATTRIBUTE_PRINTF (1, 0);
extern void vfprintf_filtered (struct ui_file *, const char *, va_list) ATTR_FORMAT (printf, 2, 0);
extern void vfprintf_filtered (struct ui_file *, const char *, va_list) ATTRIBUTE_PRINTF (2, 0);
extern void fprintf_filtered (struct ui_file *, const char *, ...) ATTR_FORMAT (printf, 2, 3);
extern void fprintf_filtered (struct ui_file *, const char *, ...) ATTRIBUTE_PRINTF (2, 3);
extern void fprintfi_filtered (int, struct ui_file *, const char *, ...) ATTR_FORMAT (printf, 3, 4);
extern void fprintfi_filtered (int, struct ui_file *, const char *, ...) ATTRIBUTE_PRINTF (3, 4);
extern void printf_filtered (const char *, ...) ATTR_FORMAT (printf, 1, 2);
extern void printf_filtered (const char *, ...) ATTRIBUTE_PRINTF (1, 2);
extern void printfi_filtered (int, const char *, ...) ATTR_FORMAT (printf, 2, 3);
extern void printfi_filtered (int, const char *, ...) ATTRIBUTE_PRINTF (2, 3);
extern void vprintf_unfiltered (const char *, va_list) ATTR_FORMAT (printf, 1, 0);
extern void vprintf_unfiltered (const char *, va_list) ATTRIBUTE_PRINTF (1, 0);
extern void vfprintf_unfiltered (struct ui_file *, const char *, va_list) ATTR_FORMAT (printf, 2, 0);
extern void vfprintf_unfiltered (struct ui_file *, const char *, va_list) ATTRIBUTE_PRINTF (2, 0);
extern void fprintf_unfiltered (struct ui_file *, const char *, ...) ATTR_FORMAT (printf, 2, 3);
extern void fprintf_unfiltered (struct ui_file *, const char *, ...) ATTRIBUTE_PRINTF (2, 3);
extern void printf_unfiltered (const char *, ...) ATTR_FORMAT (printf, 1, 2);
extern void printf_unfiltered (const char *, ...) ATTRIBUTE_PRINTF (1, 2);
extern void print_spaces (int, struct ui_file *);
@ -900,19 +893,19 @@ 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 xasprintf (char **ret, const char *format, ...) ATTRIBUTE_PRINTF (2, 3);
extern void xvasprintf (char **ret, const char *format, va_list ap)
ATTR_FORMAT (printf, 2, 0);
ATTRIBUTE_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 *xstrprintf (const char *format, ...) ATTRIBUTE_PRINTF (1, 2);
extern char *xstrvprintf (const char *format, va_list ap)
ATTR_FORMAT (printf, 1, 0);
ATTRIBUTE_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, ...)
ATTR_FORMAT (printf, 3, 4);
ATTRIBUTE_PRINTF (3, 4);
extern int parse_escape (struct gdbarch *, char **);
@ -929,36 +922,36 @@ extern char *quit_pre_print;
extern char *warning_pre_print;
extern NORETURN void verror (const char *fmt, va_list ap)
ATTR_NORETURN ATTR_FORMAT (printf, 1, 0);
ATTR_NORETURN ATTRIBUTE_PRINTF (1, 0);
extern NORETURN void error (const char *fmt, ...) ATTR_NORETURN ATTR_FORMAT (printf, 1, 2);
extern NORETURN void error (const char *fmt, ...) ATTR_NORETURN ATTRIBUTE_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 ATTR_FORMAT (printf, 1, 0);
ATTR_NORETURN ATTRIBUTE_PRINTF (1, 0);
extern NORETURN void fatal (const char *fmt, ...) ATTR_NORETURN ATTR_FORMAT (printf, 1, 2);
extern NORETURN void fatal (const char *fmt, ...) ATTR_NORETURN ATTRIBUTE_PRINTF (1, 2);
extern NORETURN void internal_verror (const char *file, int line,
const char *, va_list ap)
ATTR_NORETURN ATTR_FORMAT (printf, 3, 0);
ATTR_NORETURN ATTRIBUTE_PRINTF (3, 0);
extern NORETURN void internal_error (const char *file, int line,
const char *, ...) ATTR_NORETURN ATTR_FORMAT (printf, 3, 4);
const char *, ...) ATTR_NORETURN ATTRIBUTE_PRINTF (3, 4);
extern void internal_vwarning (const char *file, int line,
const char *, va_list ap)
ATTR_FORMAT (printf, 3, 0);
ATTRIBUTE_PRINTF (3, 0);
extern void internal_warning (const char *file, int line,
const char *, ...) ATTR_FORMAT (printf, 3, 4);
const char *, ...) ATTRIBUTE_PRINTF (3, 4);
extern NORETURN void nomem (long) ATTR_NORETURN;
extern void warning (const char *, ...) ATTR_FORMAT (printf, 1, 2);
extern void warning (const char *, ...) ATTRIBUTE_PRINTF (1, 2);
extern void vwarning (const char *, va_list args) ATTR_FORMAT (printf, 1, 0);
extern void vwarning (const char *, va_list args) ATTRIBUTE_PRINTF (1, 0);
/* List of known OS ABIs. If you change this, make sure to update the
table in osabi.c. */

View File

@ -335,7 +335,7 @@ do_assembly_only (struct gdbarch *gdbarch, struct ui_out *uiout,
/* Initialize the disassemble info struct ready for the specified
stream. */
static int ATTR_FORMAT (printf, 2, 3)
static int ATTRIBUTE_PRINTF (2, 3)
fprintf_disasm (void *stream, const char *format, ...)
{
va_list args;

View File

@ -374,7 +374,7 @@ print_any_exception (struct ui_file *file, const char *prefix,
}
}
NORETURN static void ATTR_NORETURN ATTR_FORMAT (printf, 3, 0)
NORETURN static void ATTR_NORETURN ATTRIBUTE_PRINTF (3, 0)
throw_it (enum return_reason reason, enum errors error, const char *fmt,
va_list ap)
{

View File

@ -153,7 +153,7 @@ int exceptions_state_mc_action_iter_1 (void);
extern void exception_print (struct ui_file *file, struct gdb_exception e);
extern void exception_fprintf (struct ui_file *file, struct gdb_exception e,
const char *prefix,
...) ATTR_FORMAT (printf, 3, 4);
...) ATTRIBUTE_PRINTF (3, 4);
/* Throw an exception (as described by "struct gdb_exception"). Will
execute a LONG JUMP to the inner most containing exception handler
@ -168,11 +168,11 @@ extern void exception_fprintf (struct ui_file *file, struct gdb_exception e,
extern NORETURN void throw_exception (struct gdb_exception exception) ATTR_NORETURN;
extern NORETURN void throw_verror (enum errors, const char *fmt, va_list ap)
ATTR_NORETURN ATTR_FORMAT (printf, 2, 0);
ATTR_NORETURN ATTRIBUTE_PRINTF (2, 0);
extern NORETURN void throw_vfatal (const char *fmt, va_list ap)
ATTR_NORETURN ATTR_FORMAT (printf, 1, 0);
ATTR_NORETURN ATTRIBUTE_PRINTF (1, 0);
extern NORETURN void throw_error (enum errors error, const char *fmt,
...) ATTR_NORETURN ATTR_FORMAT (printf, 2, 3);
...) ATTR_NORETURN ATTRIBUTE_PRINTF (2, 3);
/* Instead of deprecated_throw_reason, code should use catch_exception
and throw_exception. */

View File

@ -461,9 +461,9 @@ extern void binop_type_check (struct value *, struct value *, int);
/* Error messages */
extern void type_error (const char *, ...) ATTR_FORMAT (printf, 1, 2);
extern void type_error (const char *, ...) ATTRIBUTE_PRINTF (1, 2);
extern void range_error (const char *, ...) ATTR_FORMAT (printf, 1, 2);
extern void range_error (const char *, ...) ATTRIBUTE_PRINTF (1, 2);
/* Data: Does this value represent "truth" to the current language? */

View File

@ -80,7 +80,7 @@ static struct symtabs_and_lines find_method (int funfirstline,
static NORETURN void cplusplus_error (const char *name,
const char *fmt, ...)
ATTR_NORETURN ATTR_FORMAT (printf, 2, 3);
ATTR_NORETURN ATTRIBUTE_PRINTF (2, 3);
static int total_number_of_methods (struct type *type);

View File

@ -44,7 +44,7 @@ static void mi_command_loop (int mi_version);
so we can report interesting things that happened "behind the mi's
back" in this command */
static int mi_interp_query_hook (const char *ctlstr, va_list ap)
ATTR_FORMAT (printf, 1, 0);
ATTRIBUTE_PRINTF (1, 0);
static void mi3_command_loop (void);
static void mi2_command_loop (void);

View File

@ -55,12 +55,12 @@ static void mi_field_string (struct ui_out *uiout, int fldno, int width,
static void mi_field_fmt (struct ui_out *uiout, int fldno,
int width, enum ui_align align,
const char *fldname, const char *format,
va_list args) ATTR_FORMAT (printf, 6, 0);
va_list args) ATTRIBUTE_PRINTF (6, 0);
static void mi_spaces (struct ui_out *uiout, int numspaces);
static void mi_text (struct ui_out *uiout, const char *string);
static void mi_message (struct ui_out *uiout, int verbosity,
const char *format, va_list args)
ATTR_FORMAT (printf, 3, 0);
ATTRIBUTE_PRINTF (3, 0);
static void mi_wrap_hint (struct ui_out *uiout, char *identstring);
static void mi_flush (struct ui_out *uiout);

View File

@ -119,7 +119,7 @@ static ptid_t monitor_ptid;
/* Monitor specific debugging information. Typically only useful to
the developer of a new monitor interface. */
static void monitor_debug (const char *fmt, ...) ATTR_FORMAT(printf, 1, 2);
static void monitor_debug (const char *fmt, ...) ATTRIBUTE_PRINTF (1, 2);
static int monitor_debug_p = 0;

View File

@ -318,7 +318,7 @@ extern void print_subexp_standard (struct expression *, int *,
/* Function used to avoid direct calls to fprintf
in the code generated by the bison parser. */
extern void parser_fprintf (FILE *, const char *, ...) ATTR_FORMAT (printf, 2 ,3);
extern void parser_fprintf (FILE *, const char *, ...) ATTRIBUTE_PRINTF (2, 3);
extern int exp_uses_objfile (struct expression *exp, struct objfile *objfile);

View File

@ -87,7 +87,7 @@ extern int serial_write (struct serial *scb, const char *str, int len);
/* Write a printf style string onto the serial port. */
extern void serial_printf (struct serial *desc,
const char *,...) ATTR_FORMAT (printf, 2, 3);
const char *,...) ATTRIBUTE_PRINTF (2, 3);
/* Allow pending output to drain. */

View File

@ -64,7 +64,7 @@ tui_new_objfile_hook (struct objfile* objfile)
tui_display_main ();
}
static int ATTR_FORMAT (printf, 1, 0)
static int ATTRIBUTE_PRINTF (1, 0)
tui_query_hook (const char *msg, va_list argp)
{
int retval;

View File

@ -177,12 +177,12 @@ static void default_field_fmt (struct ui_out *uiout, int fldno,
int width, enum ui_align align,
const char *fldname,
const char *format,
va_list args) ATTR_FORMAT (printf, 6, 0);
va_list args) ATTRIBUTE_PRINTF (6, 0);
static void default_spaces (struct ui_out *uiout, int numspaces);
static void default_text (struct ui_out *uiout, const char *string);
static void default_message (struct ui_out *uiout, int verbosity,
const char *format,
va_list args) ATTR_FORMAT (printf, 3, 0);
va_list args) ATTRIBUTE_PRINTF (3, 0);
static void default_wrap_hint (struct ui_out *uiout, char *identstring);
static void default_flush (struct ui_out *uiout);
@ -245,12 +245,12 @@ static void uo_field_skip (struct ui_out *uiout, int fldno, int width,
static void uo_field_fmt (struct ui_out *uiout, int fldno, int width,
enum ui_align align, const char *fldname,
const char *format, va_list args)
ATTR_FORMAT (printf, 6, 0);
ATTRIBUTE_PRINTF (6, 0);
static void uo_spaces (struct ui_out *uiout, int numspaces);
static void uo_text (struct ui_out *uiout, const char *string);
static void uo_message (struct ui_out *uiout, int verbosity,
const char *format, va_list args)
ATTR_FORMAT (printf, 3, 0);
ATTRIBUTE_PRINTF (3, 0);
static void uo_wrap_hint (struct ui_out *uiout, char *identstring);
static void uo_flush (struct ui_out *uiout);
static int uo_redirect (struct ui_out *uiout, struct ui_file *outstream);

View File

@ -124,7 +124,7 @@ extern void ui_out_field_stream (struct ui_out *uiout, const char *fldname,
extern void ui_out_field_fmt (struct ui_out *uiout, const char *fldname,
const char *format, ...)
ATTR_FORMAT (printf, 3, 4);
ATTRIBUTE_PRINTF (3, 4);
extern void ui_out_field_skip (struct ui_out *uiout, const char *fldname);
@ -134,7 +134,7 @@ extern void ui_out_text (struct ui_out *uiout, const char *string);
extern void ui_out_message (struct ui_out *uiout, int verbosity,
const char *format, ...)
ATTR_FORMAT (printf, 3, 4);
ATTRIBUTE_PRINTF (3, 4);
extern struct ui_stream *ui_out_stream_new (struct ui_out *uiout);

View File

@ -92,7 +92,7 @@ void (*deprecated_error_begin_hook) (void);
/* Prototypes for local functions */
static void vfprintf_maybe_filtered (struct ui_file *, const char *,
va_list, int) ATTR_FORMAT (printf, 2, 0);
va_list, int) ATTRIBUTE_PRINTF (2, 0);
static void fputs_maybe_filtered (const char *, struct ui_file *, int);
@ -916,7 +916,7 @@ struct internal_problem
has been reported, and assuming GDB didn't quit, the caller can
either allow execution to resume or throw an error. */
static void ATTR_FORMAT (printf, 4, 0)
static void ATTRIBUTE_PRINTF (4, 0)
internal_vproblem (struct internal_problem *problem,
const char *file, int line, const char *fmt, va_list ap)
{
@ -1452,7 +1452,7 @@ gdb_print_host_address (const void *addr, struct ui_file *stream)
ARGS are the arguments passed along with the CTLSTR argument to
printf. */
static int ATTR_FORMAT (printf, 1, 0)
static int ATTRIBUTE_PRINTF (1, 0)
defaulted_query (const char *ctlstr, const char defchar, va_list args)
{
int answer;

View File

@ -199,13 +199,13 @@ int gdb_xml_parse (struct gdb_xml_parser *parser, const char *buffer);
/* Issue a debugging message from one of PARSER's handlers. */
void gdb_xml_debug (struct gdb_xml_parser *parser, const char *format, ...)
ATTR_FORMAT (printf, 2, 0);
ATTRIBUTE_PRINTF (2, 0);
/* Issue an error message from one of PARSER's handlers, and stop
parsing. */
void gdb_xml_error (struct gdb_xml_parser *parser, const char *format, ...)
ATTR_NORETURN ATTR_FORMAT (printf, 2, 0);
ATTR_NORETURN ATTRIBUTE_PRINTF (2, 0);
/* Parse an integer attribute into a ULONGEST. */