Patchwork [gccgo] Use %s to avoid warning

login
register
mail settings
Submitter Ian Taylor
Date July 21, 2010, 10:15 a.m.
Message ID <mcrzkxlcf8t.fsf@google.com>
Download mbox | patch
Permalink /patch/59430/
State New
Headers show

Comments

Ian Taylor - July 21, 2010, 10:15 a.m.
This patch uses %s to pass a string to error_at to avoid a warning about
an unknown format literal.  Committed to gccgo branch.

Ian

Patch

diff -r 1efbc309486c go/types.cc
--- a/go/types.cc	Wed Jul 21 03:11:16 2010 -0700
+++ b/go/types.cc	Wed Jul 21 03:13:52 2010 -0700
@@ -687,7 +687,7 @@ 
 
   mpfr_clear(fval);
 
-  error_at(location, errmsg);
+  error_at(location, "%s", errmsg);
   return false;
 }