diff options
author | KWSys Upstream <kwrobot@kitware.com> | 2019-05-30 13:29:16 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-05-30 13:31:29 (GMT) |
commit | 9ef1e13bcccd46c822ee813017601781bbe9a43d (patch) | |
tree | ddf58836f46d20d8e03e22b4b2de39a078fdc3ab /ProcessWin32.c | |
parent | 49f8351a1812ea55acd97aca15f72bf677e00fa9 (diff) | |
download | CMake-9ef1e13bcccd46c822ee813017601781bbe9a43d.zip CMake-9ef1e13bcccd46c822ee813017601781bbe9a43d.tar.gz CMake-9ef1e13bcccd46c822ee813017601781bbe9a43d.tar.bz2 |
KWSys 2019-05-30 (f892bacf)
Code extracted from:
https://gitlab.kitware.com/utils/kwsys.git
at commit f892bacf6c563b1f6fb843ffb623b434bc2ded4f (master).
Upstream Shortlog
-----------------
Zsolt Parragi (1):
887b1da5 Fixing issues when building with clang 8.0 on Windows
Diffstat (limited to 'ProcessWin32.c')
-rw-r--r-- | ProcessWin32.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/ProcessWin32.c b/ProcessWin32.c index 2a2e737..68c5218 100644 --- a/ProcessWin32.c +++ b/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, |