From a9d1fdfc44de37e9a4c2837cd75a56c4a0608826 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Tue, 30 Oct 2012 17:37:34 +0100 Subject: [PATCH] Fixed VC++ warnings. --- src/win32_fullscreen.c | 2 +- src/win32_input.c | 4 ++++ src/win32_window.c | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/win32_fullscreen.c b/src/win32_fullscreen.c index 045fecab..26740d11 100644 --- a/src/win32_fullscreen.c +++ b/src/win32_fullscreen.c @@ -43,7 +43,7 @@ static GLboolean getClosestVideoMode(int* width, int* height, int* bpp, int* refreshRate, GLboolean exactBPP) { - int mode, bestWidth, bestHeight, bestBPP, bestRate; + int mode, bestWidth = 0, bestHeight = 0, bestBPP = 0, bestRate = 0; unsigned int sizeDiff, rateDiff, leastSizeDiff, leastRateDiff; GLboolean foundMode = GL_FALSE; DEVMODE dm; diff --git a/src/win32_input.c b/src/win32_input.c index a9195838..2178b145 100644 --- a/src/win32_input.c +++ b/src/win32_input.c @@ -106,6 +106,8 @@ static LRESULT CALLBACK keyboardHook(int nCode, WPARAM wParam, LPARAM lParam) void _glfwPlatformEnableSystemKeys(_GLFWwindow* window) { + UNREFERENCED_PARAMETER(window); + if (_glfwLibrary.Win32.keyboardHook != NULL) { UnhookWindowsHookEx(_glfwLibrary.Win32.keyboardHook); @@ -120,6 +122,8 @@ void _glfwPlatformEnableSystemKeys(_GLFWwindow* window) void _glfwPlatformDisableSystemKeys(_GLFWwindow* window) { + UNREFERENCED_PARAMETER(window); + _glfwLibrary.Win32.keyboardHook = SetWindowsHookEx(WH_KEYBOARD_LL, keyboardHook, _glfwLibrary.Win32.instance, diff --git a/src/win32_window.c b/src/win32_window.c index 6bb9509d..75c8a8c1 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -41,6 +41,7 @@ static void hideCursor(_GLFWwindow* window) { + UNREFERENCED_PARAMETER(window); } @@ -69,6 +70,8 @@ static void captureCursor(_GLFWwindow* window) static void showCursor(_GLFWwindow* window) { + UNREFERENCED_PARAMETER(window); + // Un-capture cursor ReleaseCapture();