From: Matthias Klose Date: Mon, 26 Nov 2018 11:50:31 +0000 (+0000) Subject: test-long-names.c: Fix build with -Wformat-security. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=14c5a314c819f444abb12af5fa51577265ef8793;p=gcc.git test-long-names.c: Fix build with -Wformat-security. 2018-11-26 Matthias Klose * jit.dg/test-long-names.c: Fix build with -Wformat-security. From-SVN: r266454 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5a4b5a2a490..85092169967 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2018-11-26 Matthias Klose + + * jit.dg/test-long-names.c: Fix build with -Wformat-security. + 2018-11-25 Rainer Orth * lib/target-supports.exp (check_compile): Handle D. diff --git a/gcc/testsuite/jit.dg/test-long-names.c b/gcc/testsuite/jit.dg/test-long-names.c index 0fc7e676b39..8f4aa7e7026 100644 --- a/gcc/testsuite/jit.dg/test-long-names.c +++ b/gcc/testsuite/jit.dg/test-long-names.c @@ -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++)