Skip to content

Commit

Permalink
static_cast to void in jaccessinspector.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
TheShermanTanker authored Jan 7, 2025
1 parent b91d2f3 commit 5bdae8b
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ INT_PTR CALLBACK jaccessinspectorDialogProc( HWND hWnd, UINT message,
RECT dialogBoxRect;
LONG lT;
HMENU menu;
// DWORD lastError = 0;
DWORD lastError = 0;

switch (message) {

Expand Down Expand Up @@ -976,11 +976,9 @@ INT_PTR CALLBACK jaccessinspectorDialogProc( HWND hWnd, UINT message,
prevMouseHook = SetWindowsHookEx( WH_MOUSE, MouseProc,
theInstance,
::GetCurrentThreadId() );
/*
if (! prevMouseHook) {
lastError = ::GetLastError();
}
*/
}
return TRUE;

Expand All @@ -998,11 +996,9 @@ INT_PTR CALLBACK jaccessinspectorDialogProc( HWND hWnd, UINT message,
prevKbdHook = SetWindowsHookEx( WH_KEYBOARD, KeyboardProc,
theInstance,
::GetCurrentThreadId() );
/*
if (! prevKbdHook) {
lastError = ::GetLastError();
}
*/
}
return TRUE;

Expand All @@ -1019,11 +1015,9 @@ INT_PTR CALLBACK jaccessinspectorDialogProc( HWND hWnd, UINT message,
MF_BYCOMMAND | MFS_CHECKED);
prevKbdHook = SetWindowsHookEx( WH_KEYBOARD, KeyboardProc,
theInstance, ::GetCurrentThreadId() );
/*
if (! prevKbdHook) {
lastError = ::GetLastError();
}
*/
}
return TRUE;

Expand Down Expand Up @@ -1215,6 +1209,7 @@ INT_PTR CALLBACK jaccessinspectorDialogProc( HWND hWnd, UINT message,
return TRUE;
}

static_cast<void>(lastError);
return FALSE;
}

Expand Down

0 comments on commit 5bdae8b

Please sign in to comment.