From 35569d89f33d9480292e9c96c2558d02ce36e234 Mon Sep 17 00:00:00 2001 From: Dario Lombardo Date: Sun, 23 Dec 2018 21:34:35 +0100 Subject: [PATCH] geonw: use glib uint64 modifier. Fix compilation on OSX: ../epan/dissectors/packet-geonw.c:1248:164: error: format specifies type 'unsigned long' but the argument has type 'guint64' (aka 'unsigned long long') [-Werror,-Wformat] proto_tree_add_uint64_bits_format_value(subtree, hf, tvb, (start << 3) + (*offset) - start, (((*offset) - start) << 3) - ((*offset) - start),tmp_val,"%lu",tmp_val); ~~~ ^~~~~~~ %llu While here, minor indentation issues have been fixed. Change-Id: I5fc37d337fc302a16210c784e75cf39085ef622e Reviewed-on: https://code.wireshark.org/review/31186 Petri-Dish: Dario Lombardo Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu --- epan/dissectors/packet-geonw.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/epan/dissectors/packet-geonw.c b/epan/dissectors/packet-geonw.c index 440460332a..21bc18702f 100644 --- a/epan/dissectors/packet-geonw.c +++ b/epan/dissectors/packet-geonw.c @@ -1245,10 +1245,12 @@ dissect_sec_intx(tvbuff_t *tvb, gint *offset, packet_info *pinfo, proto_tree *tr subtree = proto_item_add_subtree(ti, ett_sgeonw_intx); proto_tree_add_bits_item(subtree, hf_sgeonw_var_len_det, tvb, start << 3, (*offset) - start, ENC_NA); if (((*offset) - start) > 4) { - proto_tree_add_uint64_bits_format_value(subtree, hf, tvb, (start << 3) + (*offset) - start, (((*offset) - start) << 3) - ((*offset) - start),tmp_val,"%lu",tmp_val); + proto_tree_add_uint64_bits_format_value(subtree, hf, tvb, (start << 3) + (*offset) - start, + (((*offset) - start) << 3) - ((*offset) - start), tmp_val, "%" G_GUINT64_FORMAT, tmp_val); } else { - proto_tree_add_uint_bits_format_value(subtree, hf, tvb, (start << 3) + (*offset) - start, (((*offset) - start) << 3) - ((*offset) - start),(guint32)tmp_val,"%u",(guint32)tmp_val); + proto_tree_add_uint_bits_format_value(subtree, hf, tvb, (start << 3) + (*offset) - start, + (((*offset) - start) << 3) - ((*offset) - start), (guint32)tmp_val, "%u", (guint32)tmp_val); } // The encoding of the length shall use at most 7 bits set to 1. if (!mask)