dwarf2out.c (output_die): Use "%s", name instead of name to avoid -Wformat-security...
authorJakub Jelinek <jakub@redhat.com>
Thu, 12 Feb 2015 21:20:19 +0000 (22:20 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 12 Feb 2015 21:20:19 +0000 (22:20 +0100)
* dwarf2out.c (output_die): Use "%s", name instead of name to
avoid -Wformat-security warning.

From-SVN: r220661

gcc/ChangeLog
gcc/dwarf2out.c

index 4cd36c739874e5de11724c4d8f899722dbd560c8..b58657e83925e68c61c3d41d588847f7fc6027a2 100644 (file)
@@ -1,5 +1,8 @@
 2015-02-12  Jakub Jelinek  <jakub@redhat.com>
 
+       * 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
index 71dc3556c14d5e87fa91309b45094543019e3081..4492f8afc43cc640d8ebdb056a38542fbf9ff945 100644 (file)
@@ -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;
                }
          }