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
This commit is contained in:
@@ -59,7 +59,7 @@ bool UpdatePowerResourceExecutionState()
|
|||||||
if ( g_powerResourceSystemRefCount > 0 )
|
if ( g_powerResourceSystemRefCount > 0 )
|
||||||
executionState |= ES_SYSTEM_REQUIRED;
|
executionState |= ES_SYSTEM_REQUIRED;
|
||||||
|
|
||||||
if ( ::SetThreadExecutionState(executionState) == NULL )
|
if ( ::SetThreadExecutionState(executionState) == 0 )
|
||||||
{
|
{
|
||||||
wxLogLastError(wxT("SetThreadExecutionState()"));
|
wxLogLastError(wxT("SetThreadExecutionState()"));
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user