Bug 965008 - Suppress warning C4996 for VC12+. r=froydnj
authorMasatoshi Kimura <VYV03354@nifty.ne.jp>
Wed, 29 Jan 2014 08:37:47 +0900
changeset 165669 ebaa4b58e71cad16d6100f6ad3df7bf59bcfa808
parent 165668 118d5c5d71bbbdce5102c0d570c0f9ac637324cc
child 165670 757f2fc89dbf5f44f321b02955833d5969e25c7b
push id26100
push useremorley@mozilla.com
push dateWed, 29 Jan 2014 10:32:52 +0000
treeherdermozilla-central@cb10967d98f2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs965008
milestone29.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 965008 - Suppress warning C4996 for VC12+. r=froydnj
xpcom/components/ManifestParser.cpp
--- a/xpcom/components/ManifestParser.cpp
+++ b/xpcom/components/ManifestParser.cpp
@@ -446,22 +446,25 @@ ParseManifest(NSLocationType type, FileL
         abi.Insert(char16_t('_'), 0);
         abi.Insert(osTarget, 0);
       }
     }
   }
 
   nsAutoString osVersion;
 #if defined(XP_WIN)
+#pragma warning(push)
+#pragma warning(disable:4996) // VC12+ deprecates GetVersionEx
   OSVERSIONINFO info = { sizeof(OSVERSIONINFO) };
   if (GetVersionEx(&info)) {
     nsTextFormatter::ssprintf(osVersion, MOZ_UTF16("%ld.%ld"),
                                          info.dwMajorVersion,
                                          info.dwMinorVersion);
   }
+#pragma warning(pop)
 #elif defined(MOZ_WIDGET_COCOA)
   SInt32 majorVersion = nsCocoaFeatures::OSXVersionMajor();
   SInt32 minorVersion = nsCocoaFeatures::OSXVersionMinor();
   nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(),
                                        majorVersion,
                                        minorVersion);
 #elif defined(MOZ_WIDGET_GTK)
   nsTextFormatter::ssprintf(osVersion, MOZ_UTF16("%ld.%ld"),