execute_command_line.c (set_cmdstat): Use "%s", msg instead of msg to avoid -Wformat...
authorJakub Jelinek <jakub@redhat.com>
Fri, 15 Jan 2016 20:20:58 +0000 (21:20 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 15 Jan 2016 20:20:58 +0000 (21:20 +0100)
* intrinsics/execute_command_line.c (set_cmdstat): Use "%s", msg
instead of msg to avoid -Wformat-security warning.

From-SVN: r232449

libgfortran/ChangeLog
libgfortran/intrinsics/execute_command_line.c

index 362c835..c993191 100644 (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.
index 256c12d..c9f9176 100644 (file)
@@ -1,6 +1,6 @@
 /* Implementation of the EXECUTE_COMMAND_LINE intrinsic.
    Copyright (C) 2009-2016 Free Software Foundation, Inc.
-   Contributed by FranÃ\83§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);
     }
 }