diff options
author | Guy Harris <guy@alum.mit.edu> | 2012-12-26 13:49:04 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2012-12-26 13:49:04 +0000 |
commit | 6cb00759ccbdb9d65f8b79132b4f9564f369e0e3 (patch) | |
tree | 2af9e8b958bf9a96ca788125ad13319ef0d47907 /rawshark.c | |
parent | c2945ff831a1587e3e18cd8b9c297d20b171e55a (diff) |
Squelch some Windows-only warnings - the third argument to _read() is
int, not size_t.
svn path=/trunk/; revision=46787
Diffstat (limited to 'rawshark.c')
-rw-r--r-- | rawshark.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rawshark.c b/rawshark.c index 186082da03..67bd6998e3 100644 --- a/rawshark.c +++ b/rawshark.c @@ -813,7 +813,7 @@ main(int argc, char *argv[]) size_t bytes_left = sizeof(struct pcap_hdr) + sizeof(guint32); gchar buf[sizeof(struct pcap_hdr) + sizeof(guint32)]; while (bytes_left != 0) { - ssize_t bytes = read(fd, buf, bytes_left); + ssize_t bytes = read(fd, buf, (int)bytes_left); if (bytes <= 0) { cmdarg_err("Not enough bytes for pcap header."); exit(2); @@ -896,7 +896,7 @@ raw_pipe_read(struct wtap_pkthdr *phdr, guchar * pd, int *err, const gchar **err /* Copied from capture_loop.c */ while (bytes_needed > 0) { - bytes_read = read(fd, ptr, bytes_needed); + bytes_read = read(fd, ptr, (int)bytes_needed); if (bytes_read == 0) { *err = 0; return FALSE; @@ -941,7 +941,7 @@ raw_pipe_read(struct wtap_pkthdr *phdr, guchar * pd, int *err, const gchar **err ptr = pd; while (bytes_needed > 0) { - bytes_read = read(fd, ptr, bytes_needed); + bytes_read = read(fd, ptr, (int)bytes_needed); if (bytes_read == 0) { *err = WTAP_ERR_SHORT_READ; *err_info = "Got zero bytes reading data from pipe"; |