From 734ef0754897c4a25ed38dc0d4170aa9f80fd125 Mon Sep 17 00:00:00 2001 From: Brad King Date: Sat, 27 Sep 2008 08:04:13 -0400 Subject: 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. --- Source/kwsys/SharedForward.h.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/kwsys/SharedForward.h.in b/Source/kwsys/SharedForward.h.in index 87f53dc..aab2ede 100644 --- a/Source/kwsys/SharedForward.h.in +++ b/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 -- cgit v0.12