[Win] Clean up some 64-bit warnings from Visual Studio analyzer
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Apr 2014 01:02:01 +0000 (01:02 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Apr 2014 01:02:01 +0000 (01:02 +0000)
https://bugs.webkit.org/show_bug.cgi?id=131514

Reviewed by Tim Horton.

* WTF.vcxproj/WTF.vcxproj: Use correct platform settings for
64-bit build.
* config.h: Ditto.
* wtf/CurrentTime.cpp:
(WTF::highResUpTime): Resolve warning about deprecated API.
* wtf/StackBounds.cpp:
(WTF::StackBounds::initialize): Silence warning about
an uninitialized variable.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167101 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WTF/ChangeLog
Source/WTF/WTF.vcxproj/WTF.vcxproj
Source/WTF/config.h
Source/WTF/wtf/CurrentTime.cpp
Source/WTF/wtf/StackBounds.cpp

index 9b94f2e..36ed8b8 100644 (file)
@@ -1,3 +1,19 @@
+2014-04-10  Brent Fulgham  <bfulgham@apple.com>
+
+        [Win] Clean up some 64-bit warnings from Visual Studio analyzer
+        https://bugs.webkit.org/show_bug.cgi?id=131514
+
+        Reviewed by Tim Horton.
+
+        * WTF.vcxproj/WTF.vcxproj: Use correct platform settings for
+        64-bit build.
+        * config.h: Ditto.
+        * wtf/CurrentTime.cpp:
+        (WTF::highResUpTime): Resolve warning about deprecated API.
+        * wtf/StackBounds.cpp:
+        (WTF::StackBounds::initialize): Silence warning about
+        an uninitialized variable.
+
 2014-04-09  Geoffrey Garen  <ggaren@apple.com>
 
         Rolled back in r166972.
index 60a720b..9778424 100644 (file)
       </BrowseInformationFile>
       <StringPooling>
       </StringPooling>
-      <PreprocessorDefinitions>WIN32;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
       </BrowseInformationFile>
       <StringPooling>
       </StringPooling>
-      <PreprocessorDefinitions>WIN32;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
       </BrowseInformationFile>
       <StringPooling>
       </StringPooling>
-      <PreprocessorDefinitions>WIN32;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
       </BrowseInformationFile>
       <StringPooling>
       </StringPooling>
-      <PreprocessorDefinitions>WIN32;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
index 4c34852..5c22316 100644 (file)
 #if OS(WINDOWS)
 
 #ifndef _WIN32_WINNT
+#if defined(_M_X64) || defined(__x86_64__) 
+#define _WIN32_WINNT 0x600
+#else
 #define _WIN32_WINNT 0x0502
 #endif
+#endif
 
 #ifndef WINVER
+#if defined(_M_X64) || defined(__x86_64__) 
+#define WINVER 0x0600
+#else
 #define WINVER 0x0502
 #endif
+#endif
 
 #if !COMPILER(MSVC7_OR_LOWER) && !OS(WINCE)
 // We need to define this before the first #include of stdlib.h or it won't contain rand_s.
index dde115a..ad3a6a5 100644 (file)
@@ -106,7 +106,11 @@ static double highResUpTime()
 
     LARGE_INTEGER qpc;
     QueryPerformanceCounter(&qpc);
+#if defined(_M_IX86) || defined(__i386__)
     DWORD tickCount = GetTickCount();
+#else
+    ULONGLONG tickCount = GetTickCount64();
+#endif
 
     if (inited) {
         __int64 qpcElapsed = ((qpc.QuadPart - qpcLast.QuadPart) * 1000) / qpcFrequency.QuadPart;
index 4cb031c..1c86750 100644 (file)
@@ -119,7 +119,7 @@ void StackBounds::initialize()
 
 void StackBounds::initialize()
 {
-    MEMORY_BASIC_INFORMATION stackOrigin;
+    MEMORY_BASIC_INFORMATION stackOrigin = { 0 };
     VirtualQuery(&stackOrigin, &stackOrigin, sizeof(stackOrigin));
     // stackOrigin.AllocationBase points to the reserved stack memory base address.