From: Jakub Jelinek Date: Fri, 15 Jan 2016 20:20:58 +0000 (+0100) Subject: execute_command_line.c (set_cmdstat): Use "%s", msg instead of msg to avoid -Wformat... X-Git-Tag: basepoints/gcc-7~1584 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f47429917545ac2811630ff8648f05aa01aa3edf;p=thirdparty%2Fgcc.git execute_command_line.c (set_cmdstat): Use "%s", msg instead of msg to avoid -Wformat-security warning. * intrinsics/execute_command_line.c (set_cmdstat): Use "%s", msg instead of msg to avoid -Wformat-security warning. From-SVN: r232449 --- diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 362c835899fd..c993191f3719 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,8 @@ +2016-01-15 Jakub Jelinek + + * intrinsics/execute_command_line.c (set_cmdstat): Use "%s", msg + instead of msg to avoid -Wformat-security warning. + 2016-01-04 Jakub Jelinek Update copyright years. diff --git a/libgfortran/intrinsics/execute_command_line.c b/libgfortran/intrinsics/execute_command_line.c index 256c12dc3eec..c9f9176c2a20 100644 --- a/libgfortran/intrinsics/execute_command_line.c +++ b/libgfortran/intrinsics/execute_command_line.c @@ -1,6 +1,6 @@ /* Implementation of the EXECUTE_COMMAND_LINE intrinsic. Copyright (C) 2009-2016 Free Software Foundation, Inc. - Contributed by François-Xavier Coudert. + Contributed by François-Xavier Coudert. This file is part of the GNU Fortran runtime library (libgfortran). @@ -55,7 +55,7 @@ set_cmdstat (int *cmdstat, int value) #define MSGLEN 200 char msg[MSGLEN] = "EXECUTE_COMMAND_LINE: "; strncat (msg, cmdmsg_values[value], MSGLEN - strlen(msg) - 1); - runtime_error (msg); + runtime_error ("%s", msg); } }