You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since NDIS_STATUS_INVALID_DATA == (NDIS_STATUS)0xC0010015L expands to (int) -1073676267 that's not suitable for a DWORD.
But with this patch, it compiles:
This is a good catch on the NEntries issue. Most of the other things I see are C++-isms that would be good ideas, but would fit better under a complete rewrite to C++. I'm not entirely certain why the choice was made to move from C to C++ for Packet.dll, but the driver is still C. Clang does not seem to be able to understand the WDK headers, and so cannot actually build the driver, but it did find a few unused variables that I have now removed.
When using clang-cl to compile the NPcap sources, there are some C++ errors that MSVC's compiler
does not even warn about even on
-W4
. Like this:Error:
Surely it should be:
A bug that surfaces depending on the raw location of
*NEntries
.And then there are these errors:
Since
NDIS_STATUS_INVALID_DATA == (NDIS_STATUS)0xC0010015L
expands to(int) -1073676267
that's not suitable for aDWORD
.But with this patch, it compiles:
Or adding
-Wno-c++11-narrowing
.I've not yet tried to use clang-cl for the driver code itself. I suspect more such issues there.
The text was updated successfully, but these errors were encountered: