This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
gold patch committed: use a format with gold_warning
- From: Ian Lance Taylor <iant at google dot com>
- To: binutils at sourceware dot org
- Date: Wed, 04 Feb 2009 07:19:48 -0800
- Subject: gold patch committed: use a format with gold_warning
I applied this patch from PR 9812 to gold to avoid a warning with
-Wformat.
Ian
2009-02-04 Duncan Sands <baldrick@free.fr>
PR 9812
* reduced_debug_output.h
(Output_reduced_debug_abbrev_section::failed): Use format for
gold_warning.
(Output_reduced_debug_info_section::faild): Likewise.
Index: reduced_debug_output.h
===================================================================
RCS file: /cvs/src/src/gold/reduced_debug_output.h,v
retrieving revision 1.1
diff -p -u -r1.1 reduced_debug_output.h
--- reduced_debug_output.h 28 May 2008 20:48:16 -0000 1.1
+++ reduced_debug_output.h 4 Feb 2009 15:18:26 -0000
@@ -64,7 +64,7 @@ class Output_reduced_debug_abbrev_sectio
void
failed(std::string reason)
{
- gold_warning(reason.c_str());
+ gold_warning("%s", reason.c_str());
failed_ = true;
}
@@ -110,7 +110,7 @@ class Output_reduced_debug_info_section
void
failed(std::string reason)
{
- gold_warning(reason.c_str());
+ gold_warning("%s", reason.c_str());
this->failed_ = true;
}