aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndersBroman <anders.broman@ericsson.com>2014-06-17 00:00:23 +0200
committerAnders Broman <a.broman58@gmail.com>2014-06-16 22:03:12 +0000
commitf5476e90a014eacbffe4b5449605badbbd6e748e (patch)
tree733163e5aa31ceb61147fc6d65c5c122f6e3a7a6
parent319ad977175e34dde70799aae7c68ff24f24b977 (diff)
Explicitly declare/cast 'unsigned <variable>' as 'unsigned int <variable>'
Applying part of Bug 7825 Change-Id: I460b5c61b04d793ccc27c25debbd5e8f08bc6974 Reviewed-on: https://code.wireshark.org/review/2280 Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r--wiretap/5views.c2
-rw-r--r--wiretap/file_access.c2
-rw-r--r--wiretap/i4btrace.c6
-rw-r--r--wiretap/iseries.c2
-rw-r--r--wsutil/md5.c2
5 files changed, 7 insertions, 7 deletions
diff --git a/wiretap/5views.c b/wiretap/5views.c
index c30571096c..c7440bd3f6 100644
--- a/wiretap/5views.c
+++ b/wiretap/5views.c
@@ -333,7 +333,7 @@ int _5views_dump_can_write_encap(int encap)
if (encap == WTAP_ENCAP_PER_PACKET)
return WTAP_ERR_ENCAP_PER_PACKET_UNSUPPORTED;
- if (encap < 0 || (unsigned) encap >= NUM_WTAP_ENCAPS || wtap_encap[encap] == -1)
+ if (encap < 0 || (unsigned int) encap >= NUM_WTAP_ENCAPS || wtap_encap[encap] == -1)
return WTAP_ERR_UNSUPPORTED_ENCAP;
return 0;
diff --git a/wiretap/file_access.c b/wiretap/file_access.c
index 995d00393c..2eb514302a 100644
--- a/wiretap/file_access.c
+++ b/wiretap/file_access.c
@@ -2331,7 +2331,7 @@ gboolean wtap_dump_file_write(wtap_dumper *wdh, const void *buf, size_t bufsize,
#ifdef HAVE_LIBZ
if (wdh->compressed) {
- nwritten = gzwfile_write((GZWFILE_T)wdh->fh, buf, (unsigned) bufsize);
+ nwritten = gzwfile_write((GZWFILE_T)wdh->fh, buf, (unsigned int) bufsize);
/*
* gzwfile_write() returns 0 on error.
*/
diff --git a/wiretap/i4btrace.c b/wiretap/i4btrace.c
index 3cf1da691f..e6952c51ff 100644
--- a/wiretap/i4btrace.c
+++ b/wiretap/i4btrace.c
@@ -44,9 +44,9 @@ static int i4b_read_rec(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr,
* Test some fields in the header to see if they make sense.
*/
#define I4B_HDR_IS_OK(hdr) \
- (!((unsigned)hdr.length < 3 || (unsigned)hdr.length > 16384 || \
- (unsigned)hdr.unit > 4 || (unsigned)hdr.type > 4 || \
- (unsigned)hdr.dir > 2 || (unsigned)hdr.trunc > 2048))
+ (!((unsigned int)hdr.length < 3 || (unsigned int)hdr.length > 16384 || \
+ (unsigned int)hdr.unit > 4 || (unsigned int)hdr.type > 4 || \
+ (unsigned int)hdr.dir > 2 || (unsigned int)hdr.trunc > 2048))
int i4btrace_open(wtap *wth, int *err, gchar **err_info)
{
diff --git a/wiretap/iseries.c b/wiretap/iseries.c
index 729ad7729e..dec299bb04 100644
--- a/wiretap/iseries.c
+++ b/wiretap/iseries.c
@@ -224,7 +224,7 @@ iseries_open (wtap * wth, int *err, gchar ** err_info)
* Check if this is a UNICODE formatted file by scanning for the magic string
*/
offset=0;
- while ((unsigned)offset < (ISERIES_LINE_LENGTH - (sizeof unicodemagic)))
+ while ((unsigned int)offset < (ISERIES_LINE_LENGTH - (sizeof unicodemagic)))
{
if (memcmp (magic + offset, unicodemagic, sizeof unicodemagic) == 0) {
if (file_seek (wth->fh, 0, SEEK_SET, err) == -1)
diff --git a/wsutil/md5.c b/wsutil/md5.c
index 54ab6533cd..ac9aac3c80 100644
--- a/wsutil/md5.c
+++ b/wsutil/md5.c
@@ -59,7 +59,7 @@
/*
* Note: this code is harmless on little-endian machines.
*/
-static void byteReverse(guint32 *buf, unsigned longs)
+static void byteReverse(guint32 *buf, unsigned int longs)
{
guint32 t;
do {