From 2f13a42d9c9aa9d24bd6f9b4bf3d03cc38efff09 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 12 Feb 2015 22:20:19 +0100 Subject: [PATCH] dwarf2out.c (output_die): Use "%s", name instead of name to avoid -Wformat-security warning. * dwarf2out.c (output_die): Use "%s", name instead of name to avoid -Wformat-security warning. From-SVN: r220661 --- gcc/ChangeLog | 3 +++ gcc/dwarf2out.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4cd36c73987..b58657e8392 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2015-02-12 Jakub Jelinek + * dwarf2out.c (output_die): Use "%s", name instead of name to + avoid -Wformat-security warning. + * dwarf2asm.c (dw2_asm_output_vms_delta): Only define if ASM_OUTPUT_DWARF_VMS_DELTA is defined. * dwarf2out.c (output_die): Use dw2_asm_output_vms_delta diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 71dc3556c14..4492f8afc43 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -8897,14 +8897,14 @@ output_die (dw_die_ref die) for (i = len - 1; i >= 0; --i) { dw2_asm_output_data (l, a->dw_attr_val.v.val_wide->elt (i), - name); + "%s", name); name = NULL; } else for (i = 0; i < len; ++i) { dw2_asm_output_data (l, a->dw_attr_val.v.val_wide->elt (i), - name); + "%s", name); name = NULL; } } -- 2.30.2