From cedb800012d25c7b43172477e18ed0f81bd54908 Mon Sep 17 00:00:00 2001 From: Mina Brown Date: Fri, 15 Aug 2025 11:44:51 -0700 Subject: [PATCH] Fix annotations for WinMain Fix "C28251 Inconsistent annotation for function" compiler warning by correctly defining WinMain. --- WinPowerDMS/WinPowerDMS.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WinPowerDMS/WinPowerDMS.c b/WinPowerDMS/WinPowerDMS.c index abb2d36..f493d9a 100644 --- a/WinPowerDMS/WinPowerDMS.c +++ b/WinPowerDMS/WinPowerDMS.c @@ -337,7 +337,7 @@ static LRESULT CALLBACK WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM l return DefWindowProc(hWnd, uMsg, wParam, lParam); } -int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { +int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPSTR lpCmdLine, _In_ int nShowCmd) { if (!LoadPrefs()) { // set both battery and AC to current display mode if there are no preferences set DISPLAY_MODE currentMode = GetCurrentDisplayMode(); userPrefs.modeAC = currentMode;