Fix selftest::temp_source_file ctor
authorDavid Malcolm <dmalcolm@redhat.com>
Mon, 25 Jul 2016 19:15:22 +0000 (19:15 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Mon, 25 Jul 2016 19:15:22 +0000 (19:15 +0000)
gcc/ChangeLog:
* input.c (selftest::temp_source_file::temp_source_file): Fix
missing "%s" in fprintf.

From-SVN: r238732

gcc/ChangeLog
gcc/input.c

index 97a9ab0..03f8af7 100644 (file)
@@ -1,3 +1,8 @@
+2016-07-25  David Malcolm  <dmalcolm@redhat.com>
+
+       * input.c (selftest::temp_source_file::temp_source_file): Fix
+       missing "%s" in fprintf.
+
 2016-07-25  John David Anglin  <danglin@gcc.gnu.org>
 
        PR middle-end/71732
index a916597..47845d0 100644 (file)
@@ -1175,7 +1175,7 @@ temp_source_file::temp_source_file (const location &loc, const char *suffix,
   if (!out)
     ::selftest::fail_formatted (loc, "unable to open tempfile: %s",
                                m_filename);
-  fprintf (out, content);
+  fprintf (out, "%s", content);
   fclose (out);
 }