]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
test-long-names.c: Fix build with -Wformat-security.
authorMatthias Klose <doko@ubuntu.com>
Mon, 26 Nov 2018 11:57:16 +0000 (11:57 +0000)
committerMatthias Klose <doko@gcc.gnu.org>
Mon, 26 Nov 2018 11:57:16 +0000 (11:57 +0000)
2018-11-26  Matthias Klose  <doko@ubuntu.com>

        * jit.dg/test-long-names.c: Fix build with -Wformat-security.

From-SVN: r266457

gcc/testsuite/ChangeLog
gcc/testsuite/jit.dg/test-long-names.c

index 798ad9565e5b780f016b0c7b88f7f29146489be6..542a9f937235cc197943e74138a4dfdcd1f674d3 100644 (file)
@@ -1,3 +1,7 @@
+2018-11-26  Matthias Klose  <doko@ubuntu.com>
+
+       * jit.dg/test-long-names.c: Fix build with -Wformat-security.
+
 2018-11-25  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
        Backport from trunk
index 0fc7e676b3975cc0f1f1be2ed2e963afe43b2232..8f4aa7e7026f0bd3495041d3cda0421a9889975e 100644 (file)
@@ -24,7 +24,7 @@ populate_name (const char *prefix, char *buffer)
   int i;
 
   /* Begin with the given prefix: */
-  sprintf (buffer, prefix);
+  sprintf (buffer, "%s", prefix);
 
   /* Populate the rest of the buffer with 0123456789 repeatedly: */
   for (i = strlen (prefix); i < NAME_LENGTH - 1; i++)