Skip to content

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

Open
@mediantt

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions