Static analysis was failing with:
hidpassthrough\hidpassthrough.c(109): warning C28169: The dispatch function 'HidPassthroughDispatchIoctl' does not have any _Dispatch_type_ annotations: This can be corrected by adding appropriate _Dispatch_type_ annotations to the function. Unnecessary casts can cause this warning.
sys\device.c(271): warning C28170: The function 'VIOInputCreateChildPdo' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
sys\driver.c(88): warning C28208: Function VIOInputEvtDriverContextCleanup was previously defined with a different parameter list at c:\kvm-guest-drivers-windows\vioinput\sys\driver.c(38). Some analysis tools will yield incorrect results.
sys\driver.c(91): warning C28118: The current function is permitted to run at an IRQ level above the maximum permitted for '__PREfastPagedCode' (1). Prior function calls or annotation are inconsistent with use of that function: The current function may need _IRQL_requires_max_, or it may be that the limit is set by some prior call. Maximum legal IRQL was last set to 2 at line 90.
sys\hidkeyboard.c(162): warning C28625: Function call used to clear sensitive data will be optimized away.
sys\keymap.c(660): warning C6385: Reading invalid data from 'ReportCodeToUsageCodeTable': the readable size is '2456' bytes, but 'uEventCode' bytes may be read.
Signed-off-by: Ladi Prosek <[email protected]>
The driver can now build an HID report descriptor describing
controls from the consumer HID usage page. These usually come
in the form of special keyboard keys (volume up/down, launch
www browser, calculator, etc.)