diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index 843824aa45ee39dc5da1dfe17ece6fe0888e4ea3..089e56307ec71b0d993a4eba9300396822ddd9b2 100755
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -69,7 +69,9 @@ if (WINDOWS)
       /DLL_WINDOWS=1
       /DNOMINMAX
       /DUNICODE
-      /D_UNICODE 
+      /D_UNICODE
+      /D_CRT_SECURE_NO_WARNINGS
+      /D_WINSOCK_DEPRECATED_NO_WARNINGS
       )
 
   add_compile_options(
diff --git a/indra/llcommon/llallocator_heap_profile.cpp b/indra/llcommon/llallocator_heap_profile.cpp
index 38da04cc7814433beafb18afceddb1abce4e5a28..9a8f8133feba69cdf8356f921b94fc89c4a84a2c 100755
--- a/indra/llcommon/llallocator_heap_profile.cpp
+++ b/indra/llcommon/llallocator_heap_profile.cpp
@@ -32,13 +32,6 @@
 #endif
 #include "llallocator_heap_profile.h"
 
-#if LL_MSVC
-// disable warning about boost::lexical_cast returning uninitialized data
-// when it fails to parse the string
-#pragma warning (disable:4701)
-#pragma warning (disable:4702)
-#endif
-
 #include <boost/algorithm/string/split.hpp>
 #include <boost/bind.hpp>
 #include <boost/lexical_cast.hpp>
diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp
index 1c928b3db890e54a3c3a665b381d897c2de3810b..e0a1c12f5c955fa1afa512dbf6c7163b2be8a7ad 100755
--- a/indra/llcommon/llevents.cpp
+++ b/indra/llcommon/llevents.cpp
@@ -45,21 +45,13 @@
 #include <cctype>
 // external library headers
 #include <boost/range/iterator_range.hpp>
-#if LL_WINDOWS
-#pragma warning (push)
-#pragma warning (disable : 4701) // compiler thinks might use uninitialized var, but no
-#endif
 #include <boost/lexical_cast.hpp>
-#if LL_WINDOWS
-#pragma warning (pop)
-#endif
+
 // other Linden headers
 #include "stringize.h"
 #include "llerror.h"
 #include "llsdutil.h"
-#if LL_MSVC
-#pragma warning (disable : 4702)
-#endif
+
 
 /*****************************************************************************
 *   queue_names: specify LLEventPump names that should be instantiated as
diff --git a/indra/llcommon/llevents.h b/indra/llcommon/llevents.h
index 0cbd1da32d0d82e5be8139827e13482b7831fbe3..f0db5ee5d420b5750081190d0c95b6e5901992db 100755
--- a/indra/llcommon/llevents.h
+++ b/indra/llcommon/llevents.h
@@ -38,16 +38,8 @@
 #include <vector>
 #include <deque>
 #include <stdexcept>
-#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/llpreprocessor.h b/indra/llcommon/llpreprocessor.h
index 2169a3d7acacc6539490b101400dcc466e4af510..02f4e10056a530cfaeb39918109190f216ed74cb 100755
--- a/indra/llcommon/llpreprocessor.h
+++ b/indra/llcommon/llpreprocessor.h
@@ -150,7 +150,7 @@
 #pragma warning( 3      :  4266 )	// 'function' : no override available for virtual member function from base 'type'; function is hidden
 #pragma warning (disable : 4180)	// qualifier applied to function type has no meaning; ignored
 #pragma warning( disable : 4800 )	// 'BOOL' : forcing value to bool 'true' or 'false' (performance warning)
-#pragma warning( disable : 4996 )	// warning: deprecated
+//#pragma warning( disable : 4996 )	// warning: deprecated
 
 // Linker optimization with "extern template" generates these warnings
 #pragma warning( disable : 4506 )   // no definition for inline function
@@ -168,7 +168,7 @@
 #pragma warning (disable : 4018) // '<' : signed/unsigned mismatch	
 
 #if _WIN64
-#pragma warning (disable : 4267) // member needs to have dll-interface to be used by clients of class
+#pragma warning (disable : 4267) // 'var' : conversion from 'size_t' to 'type', possible loss of data
 #endif
 
 #endif	//	LL_MSVC
diff --git a/indra/llcommon/llstacktrace.cpp b/indra/llcommon/llstacktrace.cpp
index 5798b3b52759f21028e3b57b98897a4d44aae314..4874002383d5d7058e869fa6a80197d09a64be8a 100755
--- a/indra/llcommon/llstacktrace.cpp
+++ b/indra/llcommon/llstacktrace.cpp
@@ -33,9 +33,9 @@
 #include <sstream>
 
 #include "llwin32headerslean.h"
-#pragma warning (push)
-#pragma warning (disable : 4091) // compiler thinks might use uninitialized var, but no
-#include "Dbghelp.h"
+#pragma warning (push)
+#pragma warning (disable : 4091) // compiler thinks might use uninitialized var, but no
+#include "Dbghelp.h"
 #pragma warning (pop)
 
 typedef USHORT NTAPI RtlCaptureStackBackTrace_Function(
diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp
index b94bc28883f4892ffa168d51036bb4733d081976..fe875a263c84fface48055507c2251b4885c6396 100755
--- a/indra/llcommon/llsys.cpp
+++ b/indra/llcommon/llsys.cpp
@@ -303,24 +303,24 @@ LLOSInfo::LLOSInfo() :
 		mOSStringSimple += "32-bit ";
 	}
 
-	OSVERSIONINFOEX osvi;
-	BOOL bOsVersionInfoEx;
-	// Try calling GetVersionEx using the OSVERSIONINFOEX structure.
-	ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
-	osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
-	if (!(bOsVersionInfoEx = GetVersionEx((OSVERSIONINFO *) &osvi)))
-	{
-		// If OSVERSIONINFOEX doesn't work, try OSVERSIONINFO.
-		osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
-		bOsVersionInfoEx = GetVersionEx((OSVERSIONINFO *) &osvi);
-	}
+	OSVERSIONINFOEX osvi;
+	BOOL bOsVersionInfoEx;
+	// Try calling GetVersionEx using the OSVERSIONINFOEX structure.
+	ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
+	osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
+	if (!(bOsVersionInfoEx = GetVersionEx((OSVERSIONINFO *) &osvi)))
+	{
+		// If OSVERSIONINFOEX doesn't work, try OSVERSIONINFO.
+		osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+		bOsVersionInfoEx = GetVersionEx((OSVERSIONINFO *) &osvi);
+	}
 
 	
 	std::string tmpstr;
 	if (bOsVersionInfoEx)
 	{
-		mMajorVer = osvi.dwMajorVersion;
-		mMinorVer = osvi.dwMinorVersion;
+		mMajorVer = osvi.dwMajorVersion;
+		mMinorVer = osvi.dwMinorVersion;
 		mBuild = osvi.dwBuildNumber;
 		tmpstr = llformat("%s(Build %d)", service_pack.c_str(), mBuild);
 	}
diff --git a/indra/llmath/llsimdtypes.h b/indra/llmath/llsimdtypes.h
index 9c4a0b1a82c5a98ad6e27c056f8b38e85c7559db..8cb36e2af8f3884d865306078da8ce225d853bd5 100755
--- a/indra/llmath/llsimdtypes.h
+++ b/indra/llmath/llsimdtypes.h
@@ -36,7 +36,7 @@ typedef __m128	LLQuad;
 
 #if LL_WINDOWS
 #pragma warning(push)
-#pragma warning( disable : 4800 3 ) // Disable warning about casting int to bool for this class.
+#pragma warning( disable : 4800 ) // Disable warning about casting int to bool for this class.
 #endif // LL_WINDOWS
 
 class LLBool32
diff --git a/indra/llmath/v3color.h b/indra/llmath/v3color.h
index daf3a6857b489c5f01701ebfb9bbb66169b0c4de..d5934ddbf88997eb4cb873ec8a7ad2aaf05f2cb3 100755
--- a/indra/llmath/v3color.h
+++ b/indra/llmath/v3color.h
@@ -181,10 +181,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/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp
index 3f566775940d0ae61d29a395939c0d889ffb7e0f..7ff802f76be605f14a27be56dbc1f759613f9139 100755
--- a/indra/llprimitive/llmodel.cpp
+++ b/indra/llprimitive/llmodel.cpp
@@ -31,18 +31,11 @@
 #include "llconvexdecomposition.h"
 #include "llsdserialize.h"
 #include "llvector4a.h"
-#if LL_MSVC
-#pragma warning (disable : 4263)
-#pragma warning (disable : 4264)
-#endif
+
 #include "dae.h"
 #include "dae/daeErrorHandler.h"
 #include "dom/domConstants.h"
 #include "dom/domMesh.h"
-#if LL_MSVC
-#pragma warning (default : 4263)
-#pragma warning (default : 4264)
-#endif
 
 #ifdef LL_USESYSTEMLIBS
 # include <zlib.h>
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 238358ce07782f92540d9e84cdab949a8fe7fbdd..f2f3be30228339e7696c8ab534ed20d848465fdf 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -26,10 +26,6 @@
 
 #include "llviewerprecompiledheaders.h"
 
-#if LL_MSVC
-#pragma warning (disable : 4263)
-#pragma warning (disable : 4264)
-#endif
 #include "dae.h"
 //#include "dom.h"
 #include "dom/domAsset.h"
@@ -51,10 +47,6 @@
 #include "dom/domScale.h"
 #include "dom/domTranslate.h"
 #include "dom/domVisual_scene.h"
-#if LL_MSVC
-#pragma warning (default : 4263)
-#pragma warning (default : 4264)
-#endif
 
 #include "llfloatermodelpreview.h"
 
diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp
index f3a9032ca88e36797c4bb66426ee7a80dfe280bf..3a8704010f97acd79775224b7647c99cd4331d8c 100755
--- a/indra/newview/llgroupmgr.cpp
+++ b/indra/newview/llgroupmgr.cpp
@@ -54,18 +54,8 @@
 #include "llviewerregion.h"
 #include <boost/regex.hpp>
 #include <boost/format.hpp>
-
-#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/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 87ae14b6b269c3112b8aa804ffba0f13018e419c..1acd2647ac99e7c95c1ec249ff8fbf37ee22df2c 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -127,11 +127,6 @@
 #include "llosxnotificationcenter.h"
 #endif
 
-#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/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h
index 999d9092bd29944b97ff97d89cc58cd8211fb4f3..c28d1f3053c720df60a16f16ffdd4d4d7891c73d 100755
--- a/indra/newview/llviewerprecompiledheaders.h
+++ b/indra/newview/llviewerprecompiledheaders.h
@@ -35,21 +35,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/llwindebug.h b/indra/newview/llwindebug.h
index 1afca3e3def873eeb10f8a2af9b3fb9e8121ab83..dfdb83e50c3042074da183c8933fcfc69d99cbff 100755
--- a/indra/newview/llwindebug.h
+++ b/indra/newview/llwindebug.h
@@ -30,13 +30,13 @@
 #include "stdtypes.h"
 #include "llwin32headerslean.h"
 
-#if LL_WINDOWS
-#pragma warning (push)
-#pragma warning (disable : 4091)
-#endif
-#include <dbghelp.h>
-#if LL_WINDOWS
-#pragma warning (pop)
+#if LL_WINDOWS
+#pragma warning (push)
+#pragma warning (disable : 4091)
+#endif
+#include <dbghelp.h>
+#if LL_WINDOWS
+#pragma warning (pop)
 #endif
 
 class LLWinDebug: