From 7939ade813f00bc72ff44ed599b156354431c9c9 Mon Sep 17 00:00:00 2001 From: "bfulgham@apple.com" Date: Fri, 11 Apr 2014 01:02:01 +0000 Subject: [PATCH] [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. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167101 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WTF/ChangeLog | 16 ++++++++++++++++ Source/WTF/WTF.vcxproj/WTF.vcxproj | 4 ---- Source/WTF/config.h | 8 ++++++++ Source/WTF/wtf/CurrentTime.cpp | 4 ++++ Source/WTF/wtf/StackBounds.cpp | 2 +- 5 files changed, 29 insertions(+), 5 deletions(-) diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog index 9b94f2ebe9a5..36ed8b8bd8e7 100644 --- a/Source/WTF/ChangeLog +++ b/Source/WTF/ChangeLog @@ -1,3 +1,19 @@ +2014-04-10 Brent Fulgham + + [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 Rolled back in r166972. diff --git a/Source/WTF/WTF.vcxproj/WTF.vcxproj b/Source/WTF/WTF.vcxproj/WTF.vcxproj index 60a720b7d430..9778424e4dae 100644 --- a/Source/WTF/WTF.vcxproj/WTF.vcxproj +++ b/Source/WTF/WTF.vcxproj/WTF.vcxproj @@ -479,7 +479,6 @@ - WIN32;_LIB;%(PreprocessorDefinitions) Windows @@ -518,7 +517,6 @@ - WIN32;_LIB;%(PreprocessorDefinitions) Windows @@ -635,7 +633,6 @@ - WIN32;_LIB;%(PreprocessorDefinitions) Windows @@ -672,7 +669,6 @@ - WIN32;_LIB;%(PreprocessorDefinitions) Windows diff --git a/Source/WTF/config.h b/Source/WTF/config.h index 4c3485234ec2..5c223160ea6c 100644 --- a/Source/WTF/config.h +++ b/Source/WTF/config.h @@ -29,12 +29,20 @@ #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. diff --git a/Source/WTF/wtf/CurrentTime.cpp b/Source/WTF/wtf/CurrentTime.cpp index dde115ae7662..ad3a6a5eb491 100644 --- a/Source/WTF/wtf/CurrentTime.cpp +++ b/Source/WTF/wtf/CurrentTime.cpp @@ -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; diff --git a/Source/WTF/wtf/StackBounds.cpp b/Source/WTF/wtf/StackBounds.cpp index 4cb031cb2146..1c86750c26e7 100644 --- a/Source/WTF/wtf/StackBounds.cpp +++ b/Source/WTF/wtf/StackBounds.cpp @@ -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. -- 2.36.0