Add ATTRIBUTE_PRINTF attributes, and fix fallout
Fixes building gdb on x86_64-apple-darwin14 with clang, which produces a number of warnings from -Wformat-nonliteral. Ref: https://sourceware.org/ml/gdb/2015-02/msg00047.html gdb/ChangeLog: 2015-02-26 Pedro Alves <palves@redhat.com> * auto-load.h (file_is_auto_load_safe): Add ATTRIBUTE_PRINTF. * complaints.c (vcomplaint): Pass argument FMT directly to printf-like functions instead of complaint->fmt. * ctf.c (ctf_save_write_metadata): Add ATTRIBUTE_PRINTF. * darwin-nat.c (inferior_debug): Add ATTRIBUTE_PRINTF. * compile/compile-loc2c.c (pushf, unary, binary): Add ATTRIBUTE_PRINTF. (do_compile_dwarf_expr_to_c): Pass string literal as format string to pushf. (BINARY): Pass string literal as format string to 'binary'. * compile/compile-object-load.c (link_callbacks_einfo): Add ATTRIBUTE_PRINTF. * guile/guile-internal.h (gdbscm_printf): Add ATTRIBUTE_PRINTF.
This commit is contained in:
parent
06b73f4199
commit
77b64a49e2
9 changed files with 61 additions and 13 deletions
|
@ -171,6 +171,9 @@ __attribute__ ((section ("__TEXT,__info_plist"),used)) =
|
|||
"</dict>\n"
|
||||
"</plist>\n";
|
||||
|
||||
static void inferior_debug (int level, const char *fmt, ...)
|
||||
ATTRIBUTE_PRINTF (2, 3);
|
||||
|
||||
static void
|
||||
inferior_debug (int level, const char *fmt, ...)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue