summaryrefslogtreecommitdiff
path: root/epan
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2012-10-09 08:40:02 +0000
committerAnders Broman <anders.broman@ericsson.com>2012-10-09 08:40:02 +0000
commiteb618abad9a969fcdf32129ab807f6cf7c5acb55 (patch)
tree3b341d16838d9e4f6f7c65babb8896279e3c38b6 /epan
parent41ad59d6a7f4d3657862fcb20f17af7b85bb0683 (diff)
downloadwireshark-eb618abad9a969fcdf32129ab807f6cf7c5acb55.tar.gz
From Bill Parker:
Explicitly declare/cast 'unsigned <variable>' as 'unsigned int <variable>' https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7810 svn path=/trunk/; revision=45418
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-mpeg-pes.c20
-rw-r--r--epan/dissectors/packet-snmp.c6
-rw-r--r--epan/dissectors/packet-spnego.c2
3 files changed, 14 insertions, 14 deletions
diff --git a/epan/dissectors/packet-mpeg-pes.c b/epan/dissectors/packet-mpeg-pes.c
index 1bf27c27db..af92a0de6e 100644
--- a/epan/dissectors/packet-mpeg-pes.c
+++ b/epan/dissectors/packet-mpeg-pes.c
@@ -608,7 +608,7 @@ static guint64 decode_time_stamp(tvbuff_t *tvb, gint offset, nstime_t *nst)
(bytes >> 33 & 0x0007) << 30 |
(bytes >> 17 & 0x7fff) << 15 |
(bytes >> 1 & 0x7fff) << 0;
- unsigned rem = (unsigned)(ts % TSHZ);
+ unsigned int rem = (unsigned int)(ts % TSHZ);
nst->secs = (time_t)(ts / TSHZ);
nst->nsecs = (int)(G_GINT64_CONSTANT(1000000000) * rem / TSHZ);
return ts;
@@ -624,9 +624,9 @@ static guint64 decode_clock_reference(tvbuff_t *tvb, gint offset,
(bytes >> 43 & 0x0007) << 30 |
(bytes >> 27 & 0x7fff) << 15 |
(bytes >> 11 & 0x7fff) << 0;
- unsigned ext = (unsigned)((bytes >> 1) & 0x1ff);
+ unsigned int ext = (unsigned int)((bytes >> 1) & 0x1ff);
guint64 cr = 300 * ts + ext;
- unsigned rem = (unsigned)(cr % SCRHZ);
+ unsigned int rem = (unsigned int)(cr % SCRHZ);
nst->secs = (time_t)(cr / SCRHZ);
nst->nsecs = (int)(G_GINT64_CONSTANT(1000000000) * rem / SCRHZ);
return cr;
@@ -634,7 +634,7 @@ static guint64 decode_clock_reference(tvbuff_t *tvb, gint offset,
static int
dissect_mpeg_pes_header_data(tvbuff_t *tvb, packet_info *pinfo,
- proto_tree *root, unsigned flags)
+ proto_tree *root, unsigned int flags)
{
proto_item *item = proto_tree_add_item(root, hf_mpeg_pes_header_data, tvb,
0, -1, ENC_NA);
@@ -677,7 +677,7 @@ dissect_mpeg_pes_header_data(tvbuff_t *tvb, packet_info *pinfo,
offset += 6;
}
if (flags & ES_RATE_FLAG) {
- unsigned es_rate = (tvb_get_ntohs(tvb, offset) >> 1 & 0x3fff) * 50;
+ unsigned int es_rate = (tvb_get_ntohs(tvb, offset) >> 1 & 0x3fff) * 50;
proto_tree_add_uint(tree, hf_mpeg_pes_es_rate, tvb,
offset, 3, es_rate);
offset += 3;
@@ -771,7 +771,7 @@ dissect_mpeg_pes_header_data(tvbuff_t *tvb, packet_info *pinfo,
offset += 2;
}
if (flags2 & PSTD_BUFFER_FLAG) {
- unsigned pstd = tvb_get_ntohs(tvb, offset);
+ unsigned int pstd = tvb_get_ntohs(tvb, offset);
proto_tree_add_uint(tree, hf_mpeg_pes_pstd_buffer, tvb,
offset, 2, (pstd & 0x2000 ? 1024 : 128) * (pstd & 0x1ff));
offset += 2;
@@ -789,7 +789,7 @@ static gint
dissect_mpeg_pes_pack_header(tvbuff_t *tvb, gint offset,
packet_info *pinfo, proto_tree *root)
{
- unsigned program_mux_rate, stuffing_length;
+ unsigned int program_mux_rate, stuffing_length;
proto_item *item = proto_tree_add_item(root, hf_mpeg_pes_pack_header, tvb,
offset / 8, 10, ENC_NA);
@@ -910,7 +910,7 @@ dissect_mpeg_pes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
offset / 8, 8, ENC_NA);
}
} else if (stream == STREAM_SYSTEM || stream == STREAM_PRIVATE2) {
- unsigned data_length = tvb_get_ntohs(tvb, offset / 8);
+ unsigned int data_length = tvb_get_ntohs(tvb, offset / 8);
proto_tree_add_item(tree, hf_mpeg_pes_length, tvb,
offset / 8, 2, ENC_BIG_ENDIAN);
offset += 2 * 8;
@@ -918,7 +918,7 @@ dissect_mpeg_pes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
proto_tree_add_item(tree, hf_mpeg_pes_data, tvb,
offset / 8, data_length, ENC_NA);
} else if (stream == STREAM_PADDING) {
- unsigned padding_length = tvb_get_ntohs(tvb, offset / 8);
+ unsigned int padding_length = tvb_get_ntohs(tvb, offset / 8);
proto_tree_add_item(tree, hf_mpeg_pes_length, tvb,
offset / 8, 2, ENC_BIG_ENDIAN);
offset += 2 * 8;
@@ -973,7 +973,7 @@ dissect_mpeg_pes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
proto_tree_add_item(tree, hf_mpeg_pes_data, es,
0, -1, ENC_NA);
} else {
- unsigned data_length = tvb_get_ntohs(tvb, offset / 8);
+ unsigned int data_length = tvb_get_ntohs(tvb, offset / 8);
proto_tree_add_item(tree, hf_mpeg_pes_length, tvb,
offset / 8, 2, ENC_BIG_ENDIAN);
offset += 2 * 8;
diff --git a/epan/dissectors/packet-snmp.c b/epan/dissectors/packet-snmp.c
index a3d1f28b7c..d4a37aa87f 100644
--- a/epan/dissectors/packet-snmp.c
+++ b/epan/dissectors/packet-snmp.c
@@ -856,8 +856,8 @@ indexing_done:
case BER_CLASS_UNI|(BER_UNI_TAG_INTEGER<<4):
{
gint64 val=0;
- unsigned int_val_offset = value_offset;
- unsigned i;
+ unsigned int int_val_offset = value_offset;
+ unsigned int i;
max_len = 4; min_len = 1;
if (value_len > (guint)max_len || value_len < (guint)min_len) {
@@ -3226,7 +3226,7 @@ snmp_users_update_cb(void* p _U_, const char** err)
{
snmp_ue_assoc_t* ue = (snmp_ue_assoc_t*)p;
emem_strbuf_t* es = ep_strbuf_new("");
- unsigned i;
+ unsigned int i;
*err = NULL;
diff --git a/epan/dissectors/packet-spnego.c b/epan/dissectors/packet-spnego.c
index d321f36de2..69719b8c77 100644
--- a/epan/dissectors/packet-spnego.c
+++ b/epan/dissectors/packet-spnego.c
@@ -859,7 +859,7 @@ usage2arcfour(int usage)
static int
arcfour_mic_cksum(guint8 *key_data, int key_length,
- unsigned usage,
+ unsigned int usage,
guint8 sgn_cksum[8],
const void *v1, size_t l1,
const void *v2, size_t l2,