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
This commit is contained in:
Jakub Jelinek 2016-01-15 21:20:58 +01:00 committed by Jakub Jelinek
parent 4c0f272cfc
commit f474299175
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2016-01-15 Jakub Jelinek <jakub@redhat.com>
* intrinsics/execute_command_line.c (set_cmdstat): Use "%s", msg
instead of msg to avoid -Wformat-security warning.
2016-01-04 Jakub Jelinek <jakub@redhat.com>
Update copyright years.

View File

@ -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);
}
}