Skip to content

Commit

Permalink
Mute unreferenced variable warnings in release builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
forderud committed Nov 13, 2024
1 parent 4b330ce commit a8e98fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions TailLight/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ NTSTATUS EvtSelfManagedIoInit(WDFDEVICE device) {

BOOLEAN inQueue = WdfTimerStart(timer, 0); // no wait
NT_ASSERTMSG("TailLight: timer already in queue", !inQueue);
UNREFERENCED_PARAMETER(inQueue);

return status;
}
Expand Down
3 changes: 3 additions & 0 deletions TailLight/wmi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ VOID SelfTestTimerProc (_In_ WDFTIMER timer) {
stCtx->Result = status;
LONG wasSignaled = KeSetEvent(&deviceContext->SelfTestCompleted, IO_MOUSE_INCREMENT, FALSE);
NT_ASSERTMSG("TailLight: SelfTest method set to signaled while already signaled.\n", wasSignaled == 0);
UNREFERENCED_PARAMETER(wasSignaled);
return; // abort self-test
}

Expand All @@ -23,12 +24,14 @@ VOID SelfTestTimerProc (_In_ WDFTIMER timer) {
stCtx->Result = STATUS_SUCCESS;
LONG wasSignaled = KeSetEvent(&deviceContext->SelfTestCompleted, IO_MOUSE_INCREMENT, FALSE);
NT_ASSERTMSG("TailLight: SelfTest method set to signaled while already signaled.\n", wasSignaled == 0);
UNREFERENCED_PARAMETER(wasSignaled);
return;
}

// enqueue the next callback
BOOLEAN inQueue = WdfTimerStart(timer, WDF_REL_TIMEOUT_IN_MS(SELF_TEST_CONTEXT::DURATION_MS));
NT_ASSERTMSG("TailLight: Previous active timer overwritten", !inQueue);
UNREFERENCED_PARAMETER(inQueue);
}

static NTSTATUS EvtWmiInstanceExecuteMethod(
Expand Down

0 comments on commit a8e98fb

Please sign in to comment.