pcapplusplus: disable `-Werror` and fix Clang's warning (#5742)
* pcapplusplus: patch for `-Werror=overloaded-virtual` * pcapplusplus: no warning as errorpull/5635/merge
parent
b833453f17
commit
885ea60d3e
2 changed files with 46 additions and 0 deletions
@ -0,0 +1,44 @@ |
|||||||
|
diff --git a/Pcap++/header/WinPcapLiveDevice.h b/Pcap++/header/WinPcapLiveDevice.h
|
||||||
|
index 9cc5a501..816a96cf 100644
|
||||||
|
--- a/Pcap++/header/WinPcapLiveDevice.h
|
||||||
|
+++ b/Pcap++/header/WinPcapLiveDevice.h
|
||||||
|
@@ -1,10 +1,8 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
-#if defined(_WIN32)
|
||||||
|
-
|
||||||
|
/// @file
|
||||||
|
|
||||||
|
-# include "PcapLiveDevice.h"
|
||||||
|
+#include "PcapLiveDevice.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \namespace pcpp
|
||||||
|
@@ -34,17 +32,17 @@ namespace pcpp
|
||||||
|
WinPcapLiveDevice& operator=(const WinPcapLiveDevice& other);
|
||||||
|
|
||||||
|
public:
|
||||||
|
- virtual LiveDeviceType getDeviceType() const
|
||||||
|
+ LiveDeviceType getDeviceType() const override
|
||||||
|
{
|
||||||
|
return WinPcapDevice;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool startCapture(OnPacketArrivesCallback onPacketArrives, void* onPacketArrivesUserCookie,
|
||||||
|
int intervalInSecondsToUpdateStats, OnStatsUpdateCallback onStatsUpdate,
|
||||||
|
- void* onStatsUpdateUserCookie);
|
||||||
|
+ void* onStatsUpdateUserCookie) override;
|
||||||
|
bool startCapture(int intervalInSecondsToUpdateStats, OnStatsUpdateCallback onStatsUpdate,
|
||||||
|
- void* onStatsUpdateUserCookie);
|
||||||
|
- bool startCapture(RawPacketVector& capturedPacketsVector)
|
||||||
|
+ void* onStatsUpdateUserCookie) override;
|
||||||
|
+ bool startCapture(RawPacketVector& capturedPacketsVector) override
|
||||||
|
{
|
||||||
|
return PcapLiveDevice::startCapture(capturedPacketsVector);
|
||||||
|
}
|
||||||
|
@@ -76,5 +74,3 @@ namespace pcpp
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace pcpp
|
||||||
|
-
|
||||||
|
-#endif // _WIN32
|
Loading…
Reference in new issue