summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/SharedForward.h.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-09-27 12:04:13 (GMT)
committerBrad King <brad.king@kitware.com>2008-09-27 12:04:13 (GMT)
commit734ef0754897c4a25ed38dc0d4170aa9f80fd125 (patch)
tree65e8cfe31a7bdb93038a66314ac022ab699c8359 /Source/kwsys/SharedForward.h.in
parentf01df7fa3de4c64d7be9629bb03c46e8bd228087 (diff)
downloadCMake-734ef0754897c4a25ed38dc0d4170aa9f80fd125.zip
CMake-734ef0754897c4a25ed38dc0d4170aa9f80fd125.tar.gz
CMake-734ef0754897c4a25ed38dc0d4170aa9f80fd125.tar.bz2
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.
Diffstat (limited to 'Source/kwsys/SharedForward.h.in')
-rw-r--r--Source/kwsys/SharedForward.h.in3
1 files changed, 3 insertions, 0 deletions
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