mirror of
https://github.com/mfontanini/libtins
synced 2026-01-25 11:41:35 +01:00
Fix -Wextra compiler warnings. (#184)
* Fix -Wextra compiler warnings. Fix #183. Signed-off-by: Kyle Fazzari <github@status.e4ward.com> * Comment out unused parameters. This is done everywhere possible instead of using Internals::unused(). Note that this involved moving some implementations into the corresponding .cpp file. Signed-off-by: Kyle Fazzari <github@status.e4ward.com> * Fix warnings in tests as well. Signed-off-by: Kyle Fazzari <github@status.e4ward.com> * Leave IPv4Reassembler alone, it's growing. Signed-off-by: Kyle Fazzari <github@status.e4ward.com>
This commit is contained in:
committed by
Matias Fontanini
parent
94e5ac2109
commit
a71a3d29ff
@@ -31,6 +31,7 @@
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#include <stdexcept>
|
||||
#include <string.h>
|
||||
#include "packet_writer.h"
|
||||
#include "packet.h"
|
||||
#include "pdu.h"
|
||||
@@ -71,11 +72,11 @@ void PacketWriter::write(Packet& packet) {
|
||||
|
||||
void PacketWriter::write(PDU& pdu, const struct timeval& tv) {
|
||||
PDU::serialization_type buffer = pdu.serialize();
|
||||
struct pcap_pkthdr header = {
|
||||
tv,
|
||||
static_cast<bpf_u_int32>(buffer.size()),
|
||||
static_cast<bpf_u_int32>(buffer.size())
|
||||
};
|
||||
struct pcap_pkthdr header;
|
||||
memset(&header, 0, sizeof(header));
|
||||
header.ts = tv;
|
||||
header.caplen = static_cast<bpf_u_int32>(buffer.size());
|
||||
header.len = static_cast<bpf_u_int32>(buffer.size());
|
||||
pcap_dump((u_char*)dumper_, &header, &buffer[0]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user