Skip to content

Commit

Permalink
Few fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nibanks committed Dec 3, 2023
1 parent c959815 commit eaea4f3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/inc/msquic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,16 @@ struct CxPlatLock {
void Release() noexcept { CxPlatLockRelease(&Handle); }
};

#pragma warning(push)
#pragma warning(disable:28167) // TODO - Fix SAL annotations for IRQL changes
struct CxPlatLockDispatch {
CXPLAT_DISPATCH_LOCK Handle;
CxPlatLockDispatch() noexcept { CxPlatDispatchLockInitialize(&Handle); }
~CxPlatLockDispatch() noexcept { CxPlatDispatchLockUninitialize(&Handle); }
_IRQL_raises_(DISPATCH_LEVEL)
void Acquire() noexcept { CxPlatDispatchLockAcquire(&Handle); }
void Release() noexcept { CxPlatDispatchLockRelease(&Handle); }
};
#pragma warning(pop)

struct CxPlatPool {
CXPLAT_POOL Handle;
Expand Down
2 changes: 1 addition & 1 deletion src/perf/bin/appmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ main(
constexpr const char* DriverSearch = "driverName";
size_t DriverLen = strlen(DriverSearch);

UniquePtr<char*[]> ArgValues = UniquePtr<char*[]>(new char*[argc]);
UniquePtr<char*[]> ArgValues = UniquePtr<char*[]>(new (std::nothrow) char*[argc]);

if (ArgValues.get() == nullptr) {
return QUIC_STATUS_OUT_OF_MEMORY;
Expand Down
2 changes: 1 addition & 1 deletion src/perf/lib/PerfClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ PerfClientConnection::Initialize() {
Worker.Lock.Release();
auto CredConfig = MsQuicCredentialConfig(QUIC_CREDENTIAL_FLAG_CLIENT | QUIC_CREDENTIAL_FLAG_NO_CERTIFICATE_VALIDATION);
TcpConn = // TODO: replace new/delete with pool alloc/free
new TcpConnection(
new (std::nothrow) TcpConnection(
Client.Engine.get(),
&CredConfig,
Client.TargetFamily,
Expand Down

0 comments on commit eaea4f3

Please sign in to comment.