]> The Tcpdump Group git mirrors - libpcap/commitdiff
Squelch some (valid) compiler warnings.
authorGuy Harris <[email protected]>
Sun, 10 Jan 2010 02:25:22 +0000 (18:25 -0800)
committerGuy Harris <[email protected]>
Sun, 10 Jan 2010 02:25:22 +0000 (18:25 -0800)
sf-pcap-ng.c

index 7397203f1745240b871a6bf064e8d4213425cedf..54a7363a49403ae6a9ab05e4651c78b1f72d9552 100644 (file)
@@ -267,7 +267,7 @@ read_block(FILE *fp, pcap_t *p, struct block_cursor *cursor, char *errbuf)
                snprintf(errbuf, PCAP_ERRBUF_SIZE,
                    "block in pcap-ng dump file has a length of %u < %lu",
                    bhdr.total_length,
-                   sizeof(struct block_header) + sizeof(struct block_trailer));
+                   (unsigned long)(sizeof(struct block_header) + sizeof(struct block_trailer)));
                return (-1);
        }
 
@@ -587,7 +587,7 @@ pcap_ng_check_header(pcap_t *p, bpf_u_int32 magic, FILE *fp, char *errbuf)
                snprintf(errbuf, PCAP_ERRBUF_SIZE,
                    "Section Header Block in pcap-ng dump file has a length of %u < %lu",
                    total_length,
-                   sizeof(*bhdrp) + sizeof(*shbp) + sizeof(struct block_trailer));
+                   (unsigned long)(sizeof(*bhdrp) + sizeof(*shbp) + sizeof(struct block_trailer)));
                return (-1);
        }