Skip to content

Warnings when building a WDK driver with code analysis ON #501

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mediantt opened this issue Feb 10, 2025 · 0 comments
Open

Warnings when building a WDK driver with code analysis ON #501

mediantt opened this issue Feb 10, 2025 · 0 comments

Comments

@mediantt
Copy link

Building a driver with WDK 10.0.22000 and code analysis ON produces several warnings:

C:\work\repos\core.mono_repo\core.driver\packages\Microsoft.Windows.ImplementationLibrary.1.0.240803.1\include\wil\resource.h(6793): warning C28157: The IRQL in 'spinLockSavedIrql' was never restored.
C:\work\repos\core.mono_repo\core.driver\packages\Microsoft.Windows.ImplementationLibrary.1.0.240803.1\include\wil\resource.h(6819): warning C28158: No IRQL was saved into 'return'.
C:\work\repos\core.mono_repo\core.driver\packages\Microsoft.Windows.ImplementationLibrary.1.0.240803.1\include\wil\resource.h(6961): warning C28167: The function 'acquire_fast_mutex' changes the IRQL and does not restore the IRQL before it exits. It should be annotated to reflect the change or the IRQL should be restored. IRQL was last set to 1 at line 6963.
C:\work\repos\core.mono_repo\core.driver\packages\Microsoft.Windows.ImplementationLibrary.1.0.240803.1\include\wil\resource.h(6969): warning C28167: The function 'try_acquire_fast_mutex' changes the IRQL and does not restore the IRQL before it exits. It should be annotated to reflect the change or the IRQL should be restored. IRQL was last set to 1 at line 6971.

mediantt pushed a commit to mediantt/wil that referenced this issue Feb 10, 2025
mediantt pushed a commit to mediantt/wil that referenced this issue Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant