From 14c5a314c819f444abb12af5fa51577265ef8793 Mon Sep 17 00:00:00 2001 From: Matthias Klose Date: Mon, 26 Nov 2018 11:50:31 +0000 Subject: [PATCH] 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 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/jit.dg/test-long-names.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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++) -- 2.30.2