From 58a7d6338c73969c831100b158f4dda66adb8a33 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 20 Sep 2014 22:07:40 +0000 Subject: [PATCH] Fix harmless g++ warning about "using NULL in arithmetic". ::SetThreadExecutionState() returns a DWORD, which is not a pointer, so compare its return value with 0, not NULL. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77746 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/power.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msw/power.cpp b/src/msw/power.cpp index 3e57d5f1ee..e573436c4a 100644 --- a/src/msw/power.cpp +++ b/src/msw/power.cpp @@ -59,7 +59,7 @@ bool UpdatePowerResourceExecutionState() if ( g_powerResourceSystemRefCount > 0 ) executionState |= ES_SYSTEM_REQUIRED; - if ( ::SetThreadExecutionState(executionState) == NULL ) + if ( ::SetThreadExecutionState(executionState) == 0 ) { wxLogLastError(wxT("SetThreadExecutionState()")); return false;