🔧 build(compile Werror): reduce warning

This commit is contained in:
yangwei
2024-08-07 11:34:52 +08:00
committed by luwenpeng
parent 0c6b441157
commit 526171618f
28 changed files with 41 additions and 24 deletions

View File

@@ -37,7 +37,7 @@ int packet_dump_pcap(const struct packet *pkt, const char *file)
const char *data = packet_get_raw_data(pkt);
uint16_t len = packet_get_raw_len(pkt);
struct pcap_pkt_hdr pkt_hdr = {0};
struct pcap_pkt_hdr pkt_hdr = {};
struct pcap_file_hdr file_hdr = {
.magic = 0xA1B2C3D4,
.version_major = 0x0002,
@@ -60,7 +60,7 @@ int packet_dump_pcap(const struct packet *pkt, const char *file)
return -1;
}
struct timeval ts = {0};
struct timeval ts = {};
gettimeofday(&ts, NULL);
pkt_hdr.tv_sec = ts.tv_sec;