Add casts, to avoid warnings.
authorEric Blake <ebb9@byu.net>
Fri, 6 Mar 2009 13:29:53 +0000 (14:29 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 6 Mar 2009 13:29:53 +0000 (14:29 +0100)
ChangeLog
lib/execute.c
lib/pipe.c

index 4c7fe2d301c2ad1eb38a55e6925064f6abbccce4..78ca71b2fb005df6885943ad15bda788d2b54567 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-03-06  Eric Blake  <ebb9@byu.net>
+
+       * lib/execute.c (execute) [WIN32_NATIVE]: Cast arguments of spawnvpe,
+       to avoid compiler warnings.
+       * lib/pipe.c (create_pipe) [WIN32_NATIVE]: Likewise.
+
 2009-03-05  Bruno Haible  <bruno@clisp.org>
 
        * tests/test-ftell.c (main): Disable test beyond end of file on
index c9f25b52d2a10fa2b8c28cb9f4f85b1d01430840..a6911d97b36e4cc4b4296e4cf8b19f63046fcc26 100644 (file)
@@ -154,14 +154,16 @@ execute (const char *progname,
        copy of the environment block - ignoring the effects of putenv() and
        [un]setenv().  */
     {
-      exitcode = spawnvpe (P_WAIT, prog_path, prog_argv, environ);
+      exitcode = spawnvpe (P_WAIT, prog_path, (const char **) prog_argv,
+                          (const char **) environ);
       if (exitcode < 0 && errno == ENOEXEC)
        {
          /* prog is not an native executable.  Try to execute it as a
             shell script.  Note that prepare_spawn() has already prepended
             a hidden element "sh.exe" to prog_argv.  */
          --prog_argv;
-         exitcode = spawnvpe (P_WAIT, prog_argv[0], prog_argv, environ);
+         exitcode = spawnvpe (P_WAIT, prog_argv[0], (const char **) prog_argv,
+                              (const char **) environ);
        }
     }
   if (nulloutfd >= 0)
index d44f62e5fde24ef1366509188b7c23e65ca3862e..f8e7dee104e9897be8bdfd2976cb3d321376d52b 100644 (file)
@@ -195,14 +195,16 @@ create_pipe (const char *progname,
        copy of the environment block - ignoring the effects of putenv() and
        [un]setenv().  */
     {
-      child = spawnvpe (P_NOWAIT, prog_path, prog_argv, environ);
+      child = spawnvpe (P_NOWAIT, prog_path, (const char **) prog_argv,
+                       (const char **) environ);
       if (child < 0 && errno == ENOEXEC)
        {
          /* prog is not an native executable.  Try to execute it as a
             shell script.  Note that prepare_spawn() has already prepended
             a hidden element "sh.exe" to prog_argv.  */
          --prog_argv;
-         child = spawnvpe (P_NOWAIT, prog_argv[0], prog_argv, environ);
+         child = spawnvpe (P_NOWAIT, prog_argv[0], (const char **) prog_argv,
+                           (const char **) environ);
        }
     }
   if (stdinfd >= 0)