From 3b2d75e2782f817e8998f00228b277fe9bd5080d Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Mon, 5 Apr 2021 14:31:42 -0400
Subject: [PATCH] Large cleanup of old warning supressions

---
 indra/llappearance/llavatarappearance.cpp  | 12 -----------
 indra/llcommon/llevents.h                  | 10 +--------
 indra/llcommon/llleap.cpp                  |  4 ----
 indra/llcommon/llstacktrace.cpp            |  3 ---
 indra/llcommon/llsys.cpp                   |  4 ----
 indra/llmath/v3color.h                     |  4 ----
 indra/llxml/llcontrol.h                    | 24 ----------------------
 indra/newview/llappearancemgr.cpp          |  5 -----
 indra/newview/llappviewer.cpp              |  5 -----
 indra/newview/llcallingcard.cpp            |  4 ----
 indra/newview/llfloaterbuycurrency.cpp     |  7 -------
 indra/newview/llfloaterbuyland.cpp         |  7 -------
 indra/newview/llfloatersellland.cpp        |  7 -------
 indra/newview/llgroupmgr.cpp               | 11 ----------
 indra/newview/llimprocessing.cpp           |  4 ----
 indra/newview/lllogchat.cpp                | 12 -----------
 indra/newview/llmediadataclient.cpp        |  5 -----
 indra/newview/llpanellogin.cpp             |  4 ----
 indra/newview/llparticipantlist.cpp        |  3 ---
 indra/newview/llviewerprecompiledheaders.h |  9 --------
 indra/newview/llviewerregion.cpp           |  4 ----
 indra/newview/llvoavatarself.cpp           | 11 ----------
 indra/newview/llwindebug.h                 |  3 ---
 indra/newview/llxmlrpclistener.cpp         |  4 ----
 indra/newview/rlvcommon.h                  |  7 -------
 indra/viewer_components/login/lllogin.cpp  |  7 -------
 26 files changed, 1 insertion(+), 179 deletions(-)

diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp
index 98a4f4e6d8f..48517804c96 100644
--- a/indra/llappearance/llavatarappearance.cpp
+++ b/indra/llappearance/llavatarappearance.cpp
@@ -24,12 +24,6 @@
  * $/LicenseInfo$
  */
 
-#if LL_MSVC
-// disable warning about boost::lexical_cast returning uninitialized data
-// when it fails to parse the string
-#pragma warning (disable:4701)
-#endif
-
 #include "linden_common.h"
 
 #include "llavatarappearance.h"
@@ -46,12 +40,6 @@
 #include "boost/bind.hpp"
 #include "boost/tokenizer.hpp"
 
-
-#if LL_MSVC
-// disable boost::lexical_cast warning
-#pragma warning (disable:4702)
-#endif
-
 #include <boost/lexical_cast.hpp>
 
 using namespace LLAvatarAppearanceDefines;
diff --git a/indra/llcommon/llevents.h b/indra/llcommon/llevents.h
index 186089f5b38..2ccc8c680e6 100644
--- a/indra/llcommon/llevents.h
+++ b/indra/llcommon/llevents.h
@@ -38,16 +38,8 @@
 #include <vector>
 #include <deque>
 #include <functional>
-#if LL_WINDOWS
-	#pragma warning (push)
-	#pragma warning (disable : 4263) // boost::signals2::expired_slot::what() has const mismatch
-	#pragma warning (disable : 4264) 
-#endif
-#include <boost/signals2.hpp>
-#if LL_WINDOWS
-	#pragma warning (pop)
-#endif
 
+#include <boost/signals2.hpp>
 #include <boost/bind.hpp>
 #include <boost/shared_ptr.hpp>
 #include <boost/enable_shared_from_this.hpp>
diff --git a/indra/llcommon/llleap.cpp b/indra/llcommon/llleap.cpp
index 7f1fc4b84f0..fdefe9ba0fd 100644
--- a/indra/llcommon/llleap.cpp
+++ b/indra/llcommon/llleap.cpp
@@ -34,10 +34,6 @@
 #include "llleaplistener.h"
 #include "llexception.h"
 
-#if LL_MSVC
-#pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally
-#endif
-
 class LLLeapImpl: public LLLeap
 {
     LOG_CLASS(LLLeap);
diff --git a/indra/llcommon/llstacktrace.cpp b/indra/llcommon/llstacktrace.cpp
index 8a136f0f6c8..a2a1198f5a3 100644
--- a/indra/llcommon/llstacktrace.cpp
+++ b/indra/llcommon/llstacktrace.cpp
@@ -33,10 +33,7 @@
 #include <sstream>
 
 #include "llwin32headerslean.h"
-#pragma warning (push)
-#pragma warning (disable:4091) // a microsoft header has warnings. Very nice.
 #include <dbghelp.h>
-#pragma warning (pop)
 
 typedef USHORT NTAPI RtlCaptureStackBackTrace_Function(
     IN ULONG frames_to_skip,
diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp
index 61922da380d..3b9e68a6234 100644
--- a/indra/llcommon/llsys.cpp
+++ b/indra/llcommon/llsys.cpp
@@ -24,10 +24,6 @@
  * $/LicenseInfo$
  */
 
-#if LL_WINDOWS
-#pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally
-#endif
-
 #include "linden_common.h"
 
 #include "llsys.h"
diff --git a/indra/llmath/v3color.h b/indra/llmath/v3color.h
index 43a632408c7..8f65946cc8c 100644
--- a/indra/llmath/v3color.h
+++ b/indra/llmath/v3color.h
@@ -198,10 +198,6 @@ inline LLColor3::LLColor3(const F32 *vec)
 	mV[VZ] = vec[VZ];
 }
 
-#if LL_WINDOWS
-# pragma warning( disable : 4996 ) // strncpy teh sux0r
-#endif
-
 inline LLColor3::LLColor3(const char* color_string) // takes a string of format "RRGGBB" where RR is hex 00..FF 
 {
 	if (strlen(color_string) <  6)		/* Flawfinder: ignore */
diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h
index 7264d0b7497..5029bc7c801 100644
--- a/indra/llxml/llcontrol.h
+++ b/indra/llxml/llcontrol.h
@@ -39,32 +39,8 @@
 #include <vector>
 #include <string_view>
 
-// *NOTE: boost::visit_each<> generates warning 4675 on .net 2003
-// Disable the warning for the boost includes.
-#if LL_WINDOWS
-# if (_MSC_VER >= 1300 && _MSC_VER < 1400)
-#   pragma warning(push)
-#   pragma warning( disable : 4675 )
-# endif
-#endif
-
 #include <boost/bind.hpp>
-
-#if LL_WINDOWS
-	#pragma warning (push)
-	#pragma warning (disable : 4263) // boost::signals2::expired_slot::what() has const mismatch
-	#pragma warning (disable : 4264) 
-#endif
 #include <boost/signals2.hpp>
-#if LL_WINDOWS
-	#pragma warning (pop)
-#endif
-
-#if LL_WINDOWS
-# if (_MSC_VER >= 1300 && _MSC_VER < 1400)
-#   pragma warning(pop)
-# endif
-#endif
 
 class LLVector3;
 class LLVector3d;
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 5d1b338cd36..c50496f52d8 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -68,11 +68,6 @@
 
 #include "llavatarpropertiesprocessor.h"
 
-#if LL_MSVC
-// disable boost::lexical_cast warning
-#pragma warning (disable:4702)
-#endif
-
 namespace 
 {
     const S32   BAKE_RETRY_MAX_COUNT = 5;
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 8a568482e38..b0c90221c72 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -269,11 +269,6 @@
 #include "glib.h"
 #endif // (LL_LINUX || LL_SOLARIS) && LL_GTK
 
-#if LL_MSVC
-// disable boost::lexical_cast warning
-#pragma warning (disable:4702)
-#endif
-
 static LLAppViewerListener sAppViewerListener(LLAppViewer::instance);
 
 ////// Windows-specific includes to the bottom - nasty defines in these pollute the preprocessor
diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp
index 85ef0bebc17..dc2678cc7ca 100644
--- a/indra/newview/llcallingcard.cpp
+++ b/indra/newview/llcallingcard.cpp
@@ -26,10 +26,6 @@
 
 #include "llviewerprecompiledheaders.h"
 
-#if LL_WINDOWS
-#pragma warning( disable : 4800 ) // performance warning in <functional>
-#endif
-
 #include "llcallingcard.h"
 
 #include <algorithm>
diff --git a/indra/newview/llfloaterbuycurrency.cpp b/indra/newview/llfloaterbuycurrency.cpp
index af5d1fc2f7f..bdc6b454d6e 100644
--- a/indra/newview/llfloaterbuycurrency.cpp
+++ b/indra/newview/llfloaterbuycurrency.cpp
@@ -82,13 +82,6 @@ LLFloater* LLFloaterBuyCurrency::buildFloater(const LLSD& key)
 	return floater;
 }
 
-#if LL_WINDOWS
-// passing 'this' during construction generates a warning. The callee
-// only uses the pointer to hold a reference to 'this' which is
-// already valid, so this call does the correct thing. Disable the
-// warning so that we can compile without generating a warning.
-#pragma warning(disable : 4355)
-#endif 
 LLFloaterBuyCurrencyUI::LLFloaterBuyCurrencyUI(const LLSD& key)
 :	LLFloater(key),
 	mChildren(*this),
diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp
index 80d4ab01686..cb219be340b 100644
--- a/indra/newview/llfloaterbuyland.cpp
+++ b/indra/newview/llfloaterbuyland.cpp
@@ -272,13 +272,6 @@ LLFloater* LLFloaterBuyLand::buildFloater(const LLSD& key)
 // LLFloaterBuyLandUI
 //----------------------------------------------------------------------------
 
-#if LL_WINDOWS
-// passing 'this' during construction generates a warning. The callee
-// only uses the pointer to hold a reference to 'this' which is
-// already valid, so this call does the correct thing. Disable the
-// warning so that we can compile without generating a warning.
-#pragma warning(disable : 4355)
-#endif 
 LLFloaterBuyLandUI::LLFloaterBuyLandUI(const LLSD& key)
 :	LLFloater(LLSD()),
 	mParcelSelectionObserver(this),
diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp
index 19b5548b3f1..6c08f9969cc 100644
--- a/indra/newview/llfloatersellland.cpp
+++ b/indra/newview/llfloatersellland.cpp
@@ -120,13 +120,6 @@ LLFloater* LLFloaterSellLand::buildFloater(const LLSD& key)
 	return floater;
 }
 
-#if LL_WINDOWS
-// passing 'this' during construction generates a warning. The callee
-// only uses the pointer to hold a reference to 'this' which is
-// already valid, so this call does the correct thing. Disable the
-// warning so that we can compile without generating a warning.
-#pragma warning(disable : 4355)
-#endif 
 LLFloaterSellLandUI::LLFloaterSellLandUI(const LLSD& key)
 :	LLFloater(key),
 	mParcelSelectionObserver(this),
diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp
index c6d1a3b4a80..9913a8ccb4f 100644
--- a/indra/newview/llgroupmgr.cpp
+++ b/indra/newview/llgroupmgr.cpp
@@ -54,19 +54,8 @@
 #include <boost/regex.hpp>
 #include "llcorehttputil.h"
 
-
-#if LL_MSVC
-#pragma warning(push)   
-// disable boost::lexical_cast warning
-#pragma warning (disable:4702)
-#endif
-
 #include <boost/lexical_cast.hpp>
 
-#if LL_MSVC
-#pragma warning(pop)   // Restore all warnings to the previous state
-#endif
-
 const U32 MAX_CACHED_GROUPS = 20;
 
 //
diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp
index 8dfd75b092e..2879764fadf 100644
--- a/indra/newview/llimprocessing.cpp
+++ b/indra/newview/llimprocessing.cpp
@@ -64,10 +64,6 @@
 
 #include <boost/regex.hpp>
 #include "boost/lexical_cast.hpp"
-#if LL_MSVC
-// disable boost::lexical_cast warning
-#pragma warning (disable:4702)
-#endif
 
 extern void on_new_message(const LLSD& msg);
 
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp
index f2457aba697..f2f311919d4 100644
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -42,19 +42,7 @@
 #include <boost/algorithm/string/replace.hpp>
 #include <boost/regex.hpp>
 #include <boost/regex/v4/match_results.hpp>
-
-#if LL_MSVC
-#pragma warning(push)  
-// disable warning about boost::lexical_cast unreachable code
-// when it fails to parse the string
-#pragma warning (disable:4702)
-#endif
-
 #include <boost/date_time/gregorian/gregorian.hpp>
-#if LL_MSVC
-#pragma warning(pop)   // Restore all warnings to the previous state
-#endif
-
 #include <boost/date_time/posix_time/posix_time.hpp>
 #include <boost/date_time/local_time_adjustor.hpp>
 
diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp
index 5a4f4c1a185..9174751b51c 100644
--- a/indra/newview/llmediadataclient.cpp
+++ b/indra/newview/llmediadataclient.cpp
@@ -29,11 +29,6 @@
 #include "llmediadataclient.h"
 #include "llviewercontrol.h"
 
-#if LL_MSVC
-// disable boost::lexical_cast warning
-#pragma warning (disable:4702)
-#endif
-
 #include <algorithm>
 #include <boost/lexical_cast.hpp>
 
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index bc7122dd65a..fb982c75f98 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -66,10 +66,6 @@
 #include "llglheaders.h"
 #include "llpanelloginlistener.h"
 
-#if LL_WINDOWS
-#pragma warning(disable: 4355)      // 'this' used in initializer list
-#endif  // LL_WINDOWS
-
 #include "llsdserialize.h"
 
 LLPanelLogin *LLPanelLogin::sInstance = NULL;
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index ee6893907e2..bdaee694958 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -34,9 +34,6 @@
 #include "llspeakers.h"
 
 //LLParticipantList retrieves add, clear and remove events and updates view accordingly 
-#if LL_MSVC
-#pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally
-#endif
 
 // See EXT-4301.
 /**
diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h
index e378c2448ac..1bd3c9443fb 100644
--- a/indra/newview/llviewerprecompiledheaders.h
+++ b/indra/newview/llviewerprecompiledheaders.h
@@ -37,21 +37,12 @@
 
 #include "linden_common.h"
 
-// Work around stupid Microsoft STL warning
-#ifdef LL_WINDOWS
-#pragma warning (disable : 4702) // warning C4702: unreachable code
-#endif
-
 #include <algorithm>
 #include <deque>
 #include <functional>
 #include <map>
 #include <set>
 
-#ifdef LL_WINDOWS
-#pragma warning (3 : 4702) // we like level 3, not 4
-#endif
-
 // Library headers from llcommon project:
 #include "indra_constants.h"
 #include "llinitparam.h"
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 5c0ed66c139..83e5d8b7b85 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -83,10 +83,6 @@
 #include "llsettingsdaycycle.h"
 #include "llviewerparcelmgr.h"
 
-#ifdef LL_WINDOWS
-	#pragma warning(disable:4355)
-#endif
-
 // When we receive a base grant of capabilities that has a different number of 
 // capabilities than the original base grant received for the region, print 
 // out the two lists of capabilities for analysis.
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 7557e34c2d9..aa46ab5dfb2 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -24,12 +24,6 @@
  * $/LicenseInfo$
  */
 
-#if LL_MSVC
-// disable warning about boost::lexical_cast returning uninitialized data
-// when it fails to parse the string
-#pragma warning (disable:4701)
-#endif
-
 #include "llviewerprecompiledheaders.h"
 
 #include "llvoavatarself.h"
@@ -77,11 +71,6 @@
 extern BOOL gTeleportDisplay;
 // [/SL:KB]
 
-#if LL_MSVC
-// disable boost::lexical_cast warning
-#pragma warning (disable:4702)
-#endif
-
 #include <boost/lexical_cast.hpp>
 
 LLPointer<LLVOAvatarSelf> gAgentAvatarp = NULL;
diff --git a/indra/newview/llwindebug.h b/indra/newview/llwindebug.h
index 5b1cbd0a4c3..7e904eea260 100644
--- a/indra/newview/llwindebug.h
+++ b/indra/newview/llwindebug.h
@@ -30,10 +30,7 @@
 #include "stdtypes.h"
 #include "llwin32headerslean.h"
 
-#pragma warning (push)
-#pragma warning (disable:4091) // a microsoft header has warnings. Very nice.
 #include <dbghelp.h>
-#pragma warning (pop)
 
 class LLWinDebug final :
 	public LLSingleton<LLWinDebug>
diff --git a/indra/newview/llxmlrpclistener.cpp b/indra/newview/llxmlrpclistener.cpp
index bc20b2ac1da..4460e317cdc 100644
--- a/indra/newview/llxmlrpclistener.cpp
+++ b/indra/newview/llxmlrpclistener.cpp
@@ -47,10 +47,6 @@
 #include "llxmlrpctransaction.h"
 #include "llsecapi.h"
 
-#if LL_WINDOWS
-#pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally
-#endif
-
 template <typename STATUS>
 class StatusMapperBase
 {
diff --git a/indra/newview/rlvcommon.h b/indra/newview/rlvcommon.h
index 6bc9ef831a5..70d2ee873fb 100644
--- a/indra/newview/rlvcommon.h
+++ b/indra/newview/rlvcommon.h
@@ -22,14 +22,7 @@
 
 #include "rlvdefines.h"
 
-#ifdef LL_WINDOWS
-	#pragma warning (push)
-	#pragma warning (disable : 4702) // warning C4702: unreachable code
-#endif
 #include <boost/variant.hpp>
-#ifdef LL_WINDOWS
-	#pragma warning (pop)
-#endif
 
 // ============================================================================
 // Forward declarations
diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp
index d485203fa18..4909526d4b6 100644
--- a/indra/viewer_components/login/lllogin.cpp
+++ b/indra/viewer_components/login/lllogin.cpp
@@ -28,13 +28,6 @@
 #include "llsd.h"
 #include "llsdutil.h"
 
-/*==========================================================================*|
-#ifdef LL_WINDOWS
-	// non-virtual destructor warning, boost::statechart does this intentionally.
-	#pragma warning (disable : 4265) 
-#endif
-|*==========================================================================*/
-
 #include "lllogin.h"
 
 #include <boost/bind.hpp>
-- 
GitLab