X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/db2c996e9cf5abfb6e5d91350c380a35815df3c8..40f1cf8aa72185cce0994aaaf8b14d524e5a4d8b:/tcpdump.c diff --git a/tcpdump.c b/tcpdump.c index 52af74af..ba154278 100644 --- a/tcpdump.c +++ b/tcpdump.c @@ -1041,7 +1041,8 @@ copy_argv(char **argv) static char * read_infile(char *fname) { - int i, fd, cc; + int i, fd; + ssize_t cc; char *cp; struct stat buf; @@ -1060,7 +1061,7 @@ read_infile(char *fname) if (cc < 0) error("read %s: %s", fname, pcap_strerror(errno)); if (cc != buf.st_size) - error("short read %s (%d != %d)", fname, cc, (int)buf.st_size); + error("short read %s (%zd != %d)", fname, cc, (int)buf.st_size); close(fd); /* replace "# comment" with spaces */ @@ -1446,7 +1447,7 @@ main(int argc, char **argv) char ebuf[PCAP_ERRBUF_SIZE]; char VFileLine[PATH_MAX + 1]; char *username = NULL; - char *chroot_dir = NULL; + const char *chroot_dir = NULL; char *ret = NULL; char *end; #ifdef HAVE_PCAP_FINDALLDEVS @@ -1727,7 +1728,7 @@ main(int argc, char **argv) break; case 's': - ndo->ndo_snaplen = strtol(optarg, &end, 0); + ndo->ndo_snaplen = (int)strtol(optarg, &end, 0); if (optarg == end || *end != '\0' || ndo->ndo_snaplen < 0 || ndo->ndo_snaplen > MAXIMUM_SNAPLEN) error("invalid snaplen %s (must be >= 0 and <= %d)",