diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-09-13 13:27:03 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-09-13 20:28:11 +0000 |
commit | f50ff0149e32158b11413715acaeef77478d3fd9 (patch) | |
tree | 01ef31722ef01649e9523375a09593908910c27b /epan | |
parent | eed56ee5ec0b10a05d0655979dce6f472ced97fa (diff) |
Squelch 64-bit-to-32-bit warnings by just casting to int.
Those lengths had better fit in an int if they're added to packet offsets.
(BTW, gsize is the spawn of Satan; it should never be used except when
you're dealing with GLib. It *should* have just been another name for
size_t, but it's 32 bits on 64-bit Windows, which means it's narrower
than size_t, which causes us some pain with g_snprintf().)
Change-Id: Icd8f0632242303dbea0d80e0dad45b317097daaa
Reviewed-on: https://code.wireshark.org/review/10516
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-bootp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-bootp.c b/epan/dissectors/packet-bootp.c index bdfb4a35c3..95a3707443 100644 --- a/epan/dissectors/packet-bootp.c +++ b/epan/dissectors/packet-bootp.c @@ -2800,7 +2800,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, proto_item else { if (wmem_strbuf_get_len(avaya_param_buf) > 0) { dissect_vendor_avaya_param(o242avaya_v_tree, pinfo, vti, tvb, optoff, avaya_param_buf); - optoff += wmem_strbuf_get_len(avaya_param_buf) + 1; + optoff += (int)wmem_strbuf_get_len(avaya_param_buf) + 1; wmem_strbuf_truncate(avaya_param_buf, 0); } wmem_strbuf_append(avaya_param_buf, field); @@ -3171,10 +3171,10 @@ dissect_vendor_avaya_param(proto_tree *tree, packet_info *pinfo, proto_item *vti tvbuff_t *tvb, int optoff, wmem_strbuf_t *avaya_param_buf) { const gchar *field; - gsize len; + int len; field = wmem_strbuf_get_str(avaya_param_buf); - len = wmem_strbuf_get_len(avaya_param_buf); + len = (int)wmem_strbuf_get_len(avaya_param_buf); if((strncmp(field, "TLSSRVR=", 8) == 0) && ( len > 8 )) { proto_tree_add_string(tree, hf_bootp_option242_avaya_tlssrvr, tvb, optoff, len, field + 8); |