From d3fa1bd4d5a8ec82ffa41b996d7169711ee5831d Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 23 Feb 2016 09:44:54 +0100 Subject: Fix warnings reported by MSVC Mainly it's related on a bad practice in SDL to force-define __SSE__ and __SSE2__ flags which generates quite some warnings and causes too much noise. There are some other warnings fixed. Should be no functional changes. NeXyon, please check the changes in audaspace :) --- source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp | 4 ---- source/gameengine/GameLogic/Joystick/SCA_Joystick.h | 11 +++++++++++ source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp | 4 ---- 3 files changed, 11 insertions(+), 8 deletions(-) (limited to 'source/gameengine/GameLogic/Joystick') diff --git a/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp b/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp index b03570e3c28..1a66b2aee52 100644 --- a/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp +++ b/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp @@ -29,10 +29,6 @@ * \ingroup gamelogic */ -#ifdef WITH_SDL -# include -#endif - #include #include diff --git a/source/gameengine/GameLogic/Joystick/SCA_Joystick.h b/source/gameengine/GameLogic/Joystick/SCA_Joystick.h index dd9fbefa545..c9221753d45 100644 --- a/source/gameengine/GameLogic/Joystick/SCA_Joystick.h +++ b/source/gameengine/GameLogic/Joystick/SCA_Joystick.h @@ -34,7 +34,18 @@ #include "SCA_JoystickDefines.h" #ifdef WITH_SDL +/* SDL force defines __SSE__ and __SSE2__ flags, which generates warnings + * because we pass those defines via command line as well. For until there's + * proper ifndef added to SDL headers we ignore the redefinition warning. + */ +# ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable : 4005) +# endif # include "SDL.h" +# ifdef _MSC_VER +# pragma warning(pop) +# endif #endif /** diff --git a/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp b/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp index 0033c137eb6..fd3d713b3d2 100644 --- a/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp +++ b/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp @@ -29,10 +29,6 @@ * \ingroup gamelogic */ -#ifdef WITH_SDL -# include -#endif - #include "SCA_Joystick.h" #include "SCA_JoystickPrivate.h" -- cgit v1.2.3