From b1b5cd8e2162ad859d2453815c9c056aa97ad44b Mon Sep 17 00:00:00 2001 From: Andrew Evans Date: Tue, 12 Apr 2011 10:40:15 -0700 Subject: [PATCH] pcap: Silence warnings about fwrite(3) return value being ignored. --- lib/pcap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/pcap.c b/lib/pcap.c index afd41fa8..9c95c409 100644 --- a/lib/pcap.c +++ b/lib/pcap.c @@ -100,7 +100,7 @@ pcap_write_header(FILE *file) ph.sigfigs = 0; ph.snaplen = 1518; ph.network = 1; /* Ethernet */ - fwrite(&ph, sizeof ph, 1, file); + ignore(fwrite(&ph, sizeof ph, 1, file)); } int @@ -159,6 +159,6 @@ pcap_write(FILE *file, struct ofpbuf *buf) prh.ts_usec = 0; prh.incl_len = buf->size; prh.orig_len = buf->size; - fwrite(&prh, sizeof prh, 1, file); - fwrite(buf->data, buf->size, 1, file); + ignore(fwrite(&prh, sizeof prh, 1, file)); + ignore(fwrite(buf->data, buf->size, 1, file)); } -- 2.30.2