diff options
author | Brad King <brad.king@kitware.com> | 2019-05-30 13:31:35 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-05-30 13:31:35 (GMT) |
commit | 3a7f493b7b92eeead6841c393d7bbed62b52cbc9 (patch) | |
tree | 2933710b08894d7edbca39cf7d66c72689fe4af5 /Source/kwsys/ProcessWin32.c | |
parent | c68efd196eace176bed5216573d99fabba66df84 (diff) | |
parent | 9ef1e13bcccd46c822ee813017601781bbe9a43d (diff) | |
download | CMake-3a7f493b7b92eeead6841c393d7bbed62b52cbc9.zip CMake-3a7f493b7b92eeead6841c393d7bbed62b52cbc9.tar.gz CMake-3a7f493b7b92eeead6841c393d7bbed62b52cbc9.tar.bz2 |
Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
KWSys 2019-05-30 (f892bacf)
Diffstat (limited to 'Source/kwsys/ProcessWin32.c')
-rw-r--r-- | Source/kwsys/ProcessWin32.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/Source/kwsys/ProcessWin32.c b/Source/kwsys/ProcessWin32.c index 2a2e737..68c5218 100644 --- a/Source/kwsys/ProcessWin32.c +++ b/Source/kwsys/ProcessWin32.c @@ -117,7 +117,6 @@ static kwsysProcessTime kwsysProcessTimeAdd(kwsysProcessTime in1, kwsysProcessTime in2); static kwsysProcessTime kwsysProcessTimeSubtract(kwsysProcessTime in1, kwsysProcessTime in2); -static void kwsysProcessSetExitException(kwsysProcess* cp, int code); static void kwsysProcessSetExitExceptionByIndex(kwsysProcess* cp, int code, int idx); static void kwsysProcessKillTree(int pid); @@ -358,13 +357,20 @@ kwsysProcess* kwsysProcess_New(void) # pragma warning(push) # ifdef __INTEL_COMPILER # pragma warning(disable : 1478) +# elif defined __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdeprecated-declarations" # else # pragma warning(disable : 4996) # endif #endif GetVersionEx(&osv); #ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx -# pragma warning(pop) +# ifdef __clang__ +# pragma clang diagnostic pop +# else +# pragma warning(pop) +# endif #endif if (osv.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) { /* Win9x no longer supported. */ @@ -2269,13 +2275,20 @@ static kwsysProcess_List* kwsysProcess_List_New(void) # pragma warning(push) # ifdef __INTEL_COMPILER # pragma warning(disable : 1478) +# elif defined __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdeprecated-declarations" # else # pragma warning(disable : 4996) # endif #endif GetVersionEx(&osv); #ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx -# pragma warning(pop) +# ifdef __clang__ +# pragma clang diagnostic pop +# else +# pragma warning(pop) +# endif #endif self->NT4 = (osv.dwPlatformId == VER_PLATFORM_WIN32_NT && osv.dwMajorVersion < 5) ? 1 @@ -2659,8 +2672,8 @@ static int kwsysProcessesAdd(HANDLE hProcess, DWORD dwProcessid, newSize = kwsysProcesses.Size ? kwsysProcesses.Size * 2 : 4; /* Try allocating the new block of memory. */ - if (newArray = (kwsysProcessInstance*)malloc( - newSize * sizeof(kwsysProcessInstance))) { + if ((newArray = (kwsysProcessInstance*)malloc( + newSize * sizeof(kwsysProcessInstance)))) { /* Copy the old process handles to the new memory. */ if (kwsysProcesses.Count > 0) { memcpy(newArray, kwsysProcesses.Processes, |