Browse Source

Merge pull request #966 from diath/msvc_fixes

Silence Windows SDK warnings when building with MSVC
Konrad Kuśnierz 1 year ago
parent
commit
33b60e842f
No account linked to committer's email address
2 changed files with 20 additions and 0 deletions
  1. 12
    0
      src/framework/platform/win32crashhandler.cpp
  2. 8
    0
      src/framework/stdext/demangle.cpp

+ 12
- 0
src/framework/platform/win32crashhandler.cpp View File

@@ -29,8 +29,20 @@
29 29
 #include <winsock2.h>
30 30
 #include <windows.h>
31 31
 #include <process.h>
32
+
33
+#ifdef _MSC_VER
34
+
35
+#pragma warning (push)
36
+#pragma warning (disable:4091) // warning C4091: 'typedef ': ignored on left of '' when no variable is declared
37
+#include <imagehlp.h>
38
+#pragma warning (pop)
39
+
40
+#else
41
+
32 42
 #include <imagehlp.h>
33 43
 
44
+#endif
45
+
34 46
 const char *getExceptionName(DWORD exceptionCode)
35 47
 {
36 48
     switch (exceptionCode) {

+ 8
- 0
src/framework/stdext/demangle.cpp View File

@@ -23,13 +23,21 @@
23 23
 #include "demangle.h"
24 24
 
25 25
 #ifdef _MSC_VER
26
+
26 27
 #include <winsock2.h>
27 28
 #include <windows.h>
29
+
30
+#pragma warning (push)
31
+#pragma warning (disable:4091) // warning C4091: 'typedef ': ignored on left of '' when no variable is declared
28 32
 #include <dbghelp.h>
33
+#pragma warning (pop)
34
+
29 35
 #else
36
+
30 37
 #include <cxxabi.h>
31 38
 #include <cstring>
32 39
 #include <cstdlib>
40
+
33 41
 #endif
34 42
 
35 43
 namespace stdext {

Loading…
Cancel
Save