Skip to content

Commit 10e1c08

Browse files
Fix build warnings and incorrect deprecation message (#88)
1 parent bfc5f67 commit 10e1c08

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

include/kf/FltCommunicationPort.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ namespace kf
120120
return status;
121121
}
122122

123-
const ULONG saclSize = sizeof(ACL) + lowMandatorySidLength + sizeof SYSTEM_MANDATORY_LABEL_ACE;
123+
const ULONG saclSize = sizeof(ACL) + lowMandatorySidLength + sizeof(SYSTEM_MANDATORY_LABEL_ACE);
124124
status = sacl.emplace(saclSize);
125125
if (!NT_SUCCESS(status))
126126
{

include/kf/FltResourceSharedLock.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace kf
55
//////////////////////////////////////////////////////////////////////////
66
// FltResourceSharedLock
77

8-
class [[deprecated("Use std::unique_lock instead")]] FltResourceSharedLock
8+
class [[deprecated("Use std::shared_lock instead")]] FltResourceSharedLock
99
{
1010
public:
1111
FltResourceSharedLock(_In_ PERESOURCE resource) : m_resource(FltResource::fromEResource(resource))

include/kf/GenericTableAvl.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ namespace kf
152152
__drv_allocatesMem(Mem)
153153
static void* NTAPI allocateRoutine(_In_ RTL_AVL_TABLE*, _In_ CLONG byteSize)
154154
{
155+
// 28160: Must succeed pool allocations are forbidden. Allocation failures cause a system crash.
156+
// 4996: ExAllocatePoolWithTag is deprecated, use ExAllocatePool2
157+
#pragma warning(suppress: 28160 4996)
155158
return ::ExAllocatePoolWithTag(poolType, byteSize, PoolTag);
156159
}
157160

0 commit comments

Comments
 (0)