From 317e63e7baa20118b3203c89763b87e884ec9480 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Tue, 19 Aug 2014 20:12:14 -0700 Subject: [PATCH] msvc: disable compiler warnings when building all Externals (cl /W0), except for wxWidgets, where all warnings are fixed. Note warnings may still be generated by code in Externals if it is included into warning-enabled code (this is the case for libusb). Also, quiet an intellisense warning in wxWidgets caused by using __w64 for an inapplicable type. --- Externals/Bochs_disasm/Bochs_disasm.vcxproj | 1 + Externals/LZO/LZO.vcxproj | 1 + Externals/SFML/build/vc2010/SFML_Network.vcxproj | 1 + Externals/SOIL/SOIL.vcxproj | 1 + Externals/libpng/png/png.vcxproj | 1 + Externals/libusbx/msvc/libusb_static_2013.vcxproj | 1 + Externals/miniupnpc/miniupnpc.vcxproj | 1 + Externals/polarssl/visualc/PolarSSL.vcxproj | 1 + Externals/portaudio/build/portaudio.vcxproj | 1 + Externals/soundtouch/SoundTouch.vcxproj | 1 + Externals/wxWidgets3/include/wx/defs.h | 4 +++- Externals/wxWidgets3/src/common/cmdproc.cpp | 2 +- Externals/wxWidgets3/src/common/glcmn.cpp | 2 +- Externals/zlib/zlib.vcxproj | 1 + Source/VSProps/ClDisableAllWarnings.props | 11 +++++++++++ 15 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 Source/VSProps/ClDisableAllWarnings.props diff --git a/Externals/Bochs_disasm/Bochs_disasm.vcxproj b/Externals/Bochs_disasm/Bochs_disasm.vcxproj index a4479fe029..0adab9e7f5 100644 --- a/Externals/Bochs_disasm/Bochs_disasm.vcxproj +++ b/Externals/Bochs_disasm/Bochs_disasm.vcxproj @@ -39,6 +39,7 @@ + diff --git a/Externals/LZO/LZO.vcxproj b/Externals/LZO/LZO.vcxproj index 5c4e787eca..123f02624e 100644 --- a/Externals/LZO/LZO.vcxproj +++ b/Externals/LZO/LZO.vcxproj @@ -39,6 +39,7 @@ + diff --git a/Externals/SFML/build/vc2010/SFML_Network.vcxproj b/Externals/SFML/build/vc2010/SFML_Network.vcxproj index 0f419209d4..78620e6564 100644 --- a/Externals/SFML/build/vc2010/SFML_Network.vcxproj +++ b/Externals/SFML/build/vc2010/SFML_Network.vcxproj @@ -39,6 +39,7 @@ + diff --git a/Externals/SOIL/SOIL.vcxproj b/Externals/SOIL/SOIL.vcxproj index 08f2ba5461..731d0d36da 100644 --- a/Externals/SOIL/SOIL.vcxproj +++ b/Externals/SOIL/SOIL.vcxproj @@ -39,6 +39,7 @@ + diff --git a/Externals/libpng/png/png.vcxproj b/Externals/libpng/png/png.vcxproj index c2688b88c7..f801a36e93 100644 --- a/Externals/libpng/png/png.vcxproj +++ b/Externals/libpng/png/png.vcxproj @@ -39,6 +39,7 @@ + diff --git a/Externals/libusbx/msvc/libusb_static_2013.vcxproj b/Externals/libusbx/msvc/libusb_static_2013.vcxproj index 433edd9628..c2ee80d41b 100644 --- a/Externals/libusbx/msvc/libusb_static_2013.vcxproj +++ b/Externals/libusbx/msvc/libusb_static_2013.vcxproj @@ -40,6 +40,7 @@ + diff --git a/Externals/miniupnpc/miniupnpc.vcxproj b/Externals/miniupnpc/miniupnpc.vcxproj index dab80a35bb..e1e8baaab9 100644 --- a/Externals/miniupnpc/miniupnpc.vcxproj +++ b/Externals/miniupnpc/miniupnpc.vcxproj @@ -39,6 +39,7 @@ + diff --git a/Externals/polarssl/visualc/PolarSSL.vcxproj b/Externals/polarssl/visualc/PolarSSL.vcxproj index ff32a513f7..cda9713866 100644 --- a/Externals/polarssl/visualc/PolarSSL.vcxproj +++ b/Externals/polarssl/visualc/PolarSSL.vcxproj @@ -39,6 +39,7 @@ + diff --git a/Externals/portaudio/build/portaudio.vcxproj b/Externals/portaudio/build/portaudio.vcxproj index 7cfcaf3c16..2de37063bf 100644 --- a/Externals/portaudio/build/portaudio.vcxproj +++ b/Externals/portaudio/build/portaudio.vcxproj @@ -39,6 +39,7 @@ + diff --git a/Externals/soundtouch/SoundTouch.vcxproj b/Externals/soundtouch/SoundTouch.vcxproj index 51fdc4f321..7d0207d40f 100644 --- a/Externals/soundtouch/SoundTouch.vcxproj +++ b/Externals/soundtouch/SoundTouch.vcxproj @@ -39,6 +39,7 @@ + diff --git a/Externals/wxWidgets3/include/wx/defs.h b/Externals/wxWidgets3/include/wx/defs.h index a15f7cc576..48a823c7b9 100644 --- a/Externals/wxWidgets3/include/wx/defs.h +++ b/Externals/wxWidgets3/include/wx/defs.h @@ -1228,7 +1228,9 @@ typedef wxUint32 wxDword; each time we cast it to a pointer or a handle (which results in hundreds of warnings as Win32 API often passes pointers in them) */ -#if wxCHECK_VISUALC_VERSION(7) +// (dolphin-emu) Just disable __w64 usage. It's not meant to be used anymore, +// even on 32bit builds. +#if 0 #define wxW64 __w64 #else #define wxW64 diff --git a/Externals/wxWidgets3/src/common/cmdproc.cpp b/Externals/wxWidgets3/src/common/cmdproc.cpp index 4534de633e..55107a9d91 100644 --- a/Externals/wxWidgets3/src/common/cmdproc.cpp +++ b/Externals/wxWidgets3/src/common/cmdproc.cpp @@ -333,7 +333,7 @@ bool wxCommandProcessor::IsDirty() const { // We have never been saved, so we are dirty if and only if we have any // commands at all. - return m_currentCommand; + return !!m_currentCommand; } if ( !m_currentCommand ) diff --git a/Externals/wxWidgets3/src/common/glcmn.cpp b/Externals/wxWidgets3/src/common/glcmn.cpp index c8276bc384..acaa9e2983 100644 --- a/Externals/wxWidgets3/src/common/glcmn.cpp +++ b/Externals/wxWidgets3/src/common/glcmn.cpp @@ -16,8 +16,8 @@ // ---------------------------------------------------------------------------- // for compilers that support precompilation, includes "wx.h". -#define GL_GLEXT_PROTOTYPES #include "wx/wxprec.h" +#define GL_GLEXT_PROTOTYPES #ifdef __BORLANDC__ #pragma hdrstop diff --git a/Externals/zlib/zlib.vcxproj b/Externals/zlib/zlib.vcxproj index 717847d780..6ca4f02bef 100644 --- a/Externals/zlib/zlib.vcxproj +++ b/Externals/zlib/zlib.vcxproj @@ -39,6 +39,7 @@ + diff --git a/Source/VSProps/ClDisableAllWarnings.props b/Source/VSProps/ClDisableAllWarnings.props new file mode 100644 index 0000000000..6710049dee --- /dev/null +++ b/Source/VSProps/ClDisableAllWarnings.props @@ -0,0 +1,11 @@ + + + + + + + TurnOffAllWarnings + + + + \ No newline at end of file