From 93b19b3f28c37fe7d0c5bbd5a927fb4cff69ce31 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 11 Aug 2013 14:22:33 +0200 Subject: [PATCH] pcap_io: Fix compiler warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fix the following compiler warning that occurs when building with "-W -Wall -Wextra": pcap_io.h: In function ‘pcap_prepare_header’: pcap_io.h:628:255: warning: signed and unsigned type in conditional expression [-Wsign-compare] Signed-off-by: Tobias Klauser --- pcap_io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcap_io.h b/pcap_io.h index 8eb503a1..5d338bb5 100644 --- a/pcap_io.h +++ b/pcap_io.h @@ -625,7 +625,7 @@ static inline void pcap_prepare_header(struct pcap_filehdr *hdr, uint32_t magic, hdr->magic = magic; hdr->version_major = swapped ? ___constant_swab16(PCAP_VERSION_MAJOR) : PCAP_VERSION_MAJOR; hdr->version_minor = swapped ? ___constant_swab16(PCAP_VERSION_MINOR) : PCAP_VERSION_MINOR; - hdr->thiszone = swapped ? ___constant_swab32(thiszone) : thiszone; + hdr->thiszone = swapped ? (int32_t) ___constant_swab32(thiszone) : thiszone; hdr->sigfigs = 0; hdr->snaplen = swapped ? ___constant_swab32(snaplen) : snaplen; hdr->linktype = swapped ? ___constant_swab32(linktype) : linktype; -- 2.11.4.GIT