From 648bf7a5fba1ff857f7c510e16c1b16e0a928ac1 Mon Sep 17 00:00:00 2001 From: Scr3amer Date: Sat, 1 Apr 2023 17:19:05 -0400 Subject: [PATCH] ISO C90 - Mixed declaration and code. --- src/win32_monitor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/win32_monitor.c b/src/win32_monitor.c index d67085cf..aa242837 100644 --- a/src/win32_monitor.c +++ b/src/win32_monitor.c @@ -425,6 +425,8 @@ static BOOL CALLBACK monitorCallback(HMONITOR handle, LPARAM data) { MONITORINFOEXW mi; + char *possiblyMoreAccurateMonitorName = NULL; + ZeroMemory(&mi, sizeof(mi)); mi.cbSize = sizeof(mi); @@ -434,7 +436,6 @@ static BOOL CALLBACK monitorCallback(HMONITOR handle, if (wcscmp(mi.szDevice, monitor->win32.adapterName) == 0) { monitor->win32.handle = handle; - char *possiblyMoreAccurateMonitorName; possiblyMoreAccurateMonitorName = GetAccurateMonitorName(mi.szDevice); if(possiblyMoreAccurateMonitorName != NULL) {