af_packet: Add -Wunused and -Werror

This would've found the enable_defrag issue and also points out another
unused variable.
This commit is contained in:
Arne Welzel 2022-09-16 14:43:36 +02:00 committed by Tim Wojtulewicz
parent 41331e5605
commit 6ad8e3ed24
2 changed files with 8 additions and 7 deletions

View file

@ -5,6 +5,8 @@ project(ZeekPluginAF_Packet)
include(ZeekPlugin)
add_compile_options(-Wunused -Werror)
zeek_plugin_begin(Zeek AF_Packet)
zeek_plugin_cc(src/Plugin.cc)
zeek_plugin_cc(src/AF_Packet.cc)

View file

@ -225,7 +225,6 @@ bool AF_PacketSource::ExtractNextPacket(zeek::Packet* pkt)
struct tpacket3_hdr *packet = 0;
const u_char *data;
struct timeval ts;
while ( true )
{
if ( ! rx_ring->GetNextPacket(&packet) )