Browse Source

COMP: Avoid incompatible pointer warning

In SharedForward, the call to execvp warned on MinGW because the
signature declared in process.h has an extra const.  We use an explicit
cast to convert the pointer type.
Brad King 17 years ago
parent
commit
734ef07548
1 changed files with 3 additions and 0 deletions
  1. 3 0
      Source/kwsys/SharedForward.h.in

+ 3 - 0
Source/kwsys/SharedForward.h.in

@@ -512,6 +512,9 @@ static void kwsys_shared_forward_execvp(const char* cmd, char* const* argv)
   /* Invoke the child process.  */
 #if defined(_MSC_VER)
   _execvp(cmd, argv);
+#elif defined(__MINGW32__)
+   /* Avoid incompatible pointer warning with a cast.  */
+  execvp(cmd, (char const* const*)argv);
 #else
   execvp(cmd, argv);
 #endif