C28108
Note
This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here
warning C28108: Variable holds an unexpected resource
The resource that the driver is using is in the expected C language type, but has a different semantic type.
Example
The following code example generates this warning:
KeAcquireInStackSpinLock(spinLock, lockHandle);
...
KeReleaseSpinLock(spinLock, 0);
The following code example avoids this warning:
KeAcquireInStackSpinLock(spinLock, lockHandle);
...
KeReleaseInStackSpinLock(lockHandle);