From 064082e68a3aa3a5c4fcc58bb2d3e1f7989939d1 Mon Sep 17 00:00:00 2001 From: Jakub Zawadzki Date: Fri, 20 Dec 2013 22:39:32 +0000 Subject: [PATCH] Change G_GINT64_CONSTANT(xxxxU) to G_GUINT64_CONSTANT(xxxx) svn path=/trunk/; revision=54314 --- asn1/goose/goose.cnf | 2 +- asn1/mms/mms.cnf | 2 +- asn1/sv/sv.cnf | 2 +- doc/README.developer | 4 ++-- dumpcap.c | 2 +- epan/dissectors/packet-afp.c | 2 +- epan/dissectors/packet-artnet.c | 2 +- epan/dissectors/packet-clique-rm.c | 2 +- epan/dissectors/packet-eigrp.c | 4 ++-- epan/dissectors/packet-goose.c | 2 +- epan/dissectors/packet-homeplug.c | 2 +- epan/dissectors/packet-iwarp-mpa.c | 6 +++--- epan/dissectors/packet-lpp.c | 2 +- epan/dissectors/packet-lte-rrc.c | 2 +- epan/dissectors/packet-m3ap.c | 2 +- epan/dissectors/packet-mms.c | 2 +- epan/dissectors/packet-nfs.c | 4 ++-- epan/dissectors/packet-pcap.c | 8 ++++---- epan/dissectors/packet-rmt-lct.c | 4 ++-- epan/dissectors/packet-rrlp.c | 2 +- epan/dissectors/packet-s1ap.c | 2 +- epan/dissectors/packet-sv.c | 2 +- epan/dissectors/packet-tds.c | 6 +++--- epan/dissectors/packet-windows-common.c | 2 +- epan/dissectors/packet-wol.c | 2 +- epan/dissectors/packet-x2ap.c | 2 +- pcapio.c | 2 +- tools/asn2wrs.py | 2 +- ui/gtk/packet_win.c | 2 +- wiretap/ngsniffer.c | 8 ++++---- wiretap/vwr.c | 8 ++++---- 31 files changed, 48 insertions(+), 48 deletions(-) diff --git a/asn1/goose/goose.cnf b/asn1/goose/goose.cnf index 4125451d1f..767bcfb835 100644 --- a/asn1/goose/goose.cnf +++ b/asn1/goose/goose.cnf @@ -37,7 +37,7 @@ seconds = tvb_get_ntohl(tvb, offset); fraction = tvb_get_ntoh24(tvb, offset+4) * 0x100; /* Only 3 bytes are recommended */ - nanoseconds = (guint32)( ((guint64)fraction * G_GINT64_CONSTANT(1000000000U)) / G_GINT64_CONSTANT(0x100000000U) ) ; + nanoseconds = (guint32)( ((guint64)fraction * G_GUINT64_CONSTANT(1000000000)) / G_GUINT64_CONSTANT(0x100000000) ) ; ts.secs = seconds; ts.nsecs = nanoseconds; diff --git a/asn1/mms/mms.cnf b/asn1/mms/mms.cnf index 39eda78414..862020af19 100644 --- a/asn1/mms/mms.cnf +++ b/asn1/mms/mms.cnf @@ -121,7 +121,7 @@ UtcTime TYPE = FT_STRING DISPLAY = BASE_NONE seconds = tvb_get_ntohl(tvb, offset); fraction = tvb_get_ntoh24(tvb, offset+4) * 0x100; /* Only 3 bytes are recommended */ - nanoseconds = (guint32)( ((guint64)fraction * G_GINT64_CONSTANT(1000000000U)) / G_GINT64_CONSTANT(0x100000000U) ) ; + nanoseconds = (guint32)( ((guint64)fraction * G_GUINT64_CONSTANT(1000000000)) / G_GUINT64_CONSTANT(0x100000000) ) ; ts.secs = seconds; ts.nsecs = nanoseconds; diff --git a/asn1/sv/sv.cnf b/asn1/sv/sv.cnf index 15acfafdfa..a5c9f50872 100644 --- a/asn1/sv/sv.cnf +++ b/asn1/sv/sv.cnf @@ -44,7 +44,7 @@ seconds = tvb_get_ntohl(tvb, offset); fraction = tvb_get_ntoh24(tvb, offset+4) * 0x100; /* Only 3 bytes are recommended */ - nanoseconds = (guint32)( ((guint64)fraction * G_GINT64_CONSTANT(1000000000U)) / G_GINT64_CONSTANT(0x100000000U) ) ; + nanoseconds = (guint32)( ((guint64)fraction * G_GUINT64_CONSTANT(1000000000)) / G_GUINT64_CONSTANT(0x100000000) ) ; ts.secs = seconds; ts.nsecs = nanoseconds; diff --git a/doc/README.developer b/doc/README.developer index 0401f5d9b9..9f2a059f4e 100644 --- a/doc/README.developer +++ b/doc/README.developer @@ -182,11 +182,11 @@ use "LL" at the end of the constant - not all compilers use "LL" for that. Instead, put the constant in a call to the "G_GINT64_CONSTANT()" macro, e.g. - G_GINT64_CONSTANT(11644473600U) + G_GINT64_CONSTANT(-11644473600), G_GUINT64_CONSTANT(11644473600) rather than - 11644473600ULL + -11644473600LL, 11644473600ULL Don't assume that you can scan through a va_list initialized by va_start more than once without closing it with va_end and re-initializing it with diff --git a/dumpcap.c b/dumpcap.c index 8841e7b755..d53013f22a 100644 --- a/dumpcap.c +++ b/dumpcap.c @@ -452,7 +452,7 @@ create_timestamp(void) { * Subtract difference, in microseconds, between January 1, 1601 * 00:00:00 UTC and January 1, 1970, 00:00:00 UTC. */ - timestamp -= G_GINT64_CONSTANT(11644473600000000U); + timestamp -= G_GUINT64_CONSTANT(11644473600000000); #else /* * Current time, represented as seconds and microseconds since diff --git a/epan/dissectors/packet-afp.c b/epan/dissectors/packet-afp.c index c25978e4f1..535a4f2965 100644 --- a/epan/dissectors/packet-afp.c +++ b/epan/dissectors/packet-afp.c @@ -182,7 +182,7 @@ void proto_reg_handoff_afp(void); #define SPOTLIGHT_CMD_GET_THREE 3 /* Spotlight epoch is UNIX epoch minus SPOTLIGHT_TIME_DELTA */ -#define SPOTLIGHT_TIME_DELTA G_GINT64_CONSTANT(280878921600U) +#define SPOTLIGHT_TIME_DELTA G_GUINT64_CONSTANT(280878921600) /* ----------------------------- */ static int proto_afp = -1; diff --git a/epan/dissectors/packet-artnet.c b/epan/dissectors/packet-artnet.c index 71ea5d053b..6bab2b4b20 100644 --- a/epan/dissectors/packet-artnet.c +++ b/epan/dissectors/packet-artnet.c @@ -3141,7 +3141,7 @@ dissect_artnet_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d /* Check the 8 byte header "Art-Net\0" = 0x4172742d4e7400*/ qword = tvb_get_ntoh64(tvb,0); - if(qword != G_GINT64_CONSTANT (0x4172742d4e7400U)) + if(qword != G_GUINT64_CONSTANT (0x4172742d4e7400)) return FALSE; /* if the header matches, dissect it */ diff --git a/epan/dissectors/packet-clique-rm.c b/epan/dissectors/packet-clique-rm.c index cba3d0cc82..c343b34443 100644 --- a/epan/dissectors/packet-clique-rm.c +++ b/epan/dissectors/packet-clique-rm.c @@ -283,7 +283,7 @@ dissect_clique_rm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat qword = tvb_get_ntoh48(tvb,0); /* ASCII str for 'Clique' = 0x436c69717565 */ - if(qword != G_GINT64_CONSTANT (0x436c69717565U)) + if(qword != G_GUINT64_CONSTANT (0x436c69717565)) return FALSE; offset += 6; diff --git a/epan/dissectors/packet-eigrp.c b/epan/dissectors/packet-eigrp.c index 21565383e6..942c7bfcd2 100644 --- a/epan/dissectors/packet-eigrp.c +++ b/epan/dissectors/packet-eigrp.c @@ -2255,7 +2255,7 @@ dissect_eigrp_wide_metric (proto_tree *tree, tvbuff_t *tvb, int offset) * indicates an unreachable route. */ big_num = tvb_get_ntoh64(sub_tvb, 8); big_num >>= 16; - if (big_num == G_GINT64_CONSTANT(0x0000ffffffffffffU)) { + if (big_num == G_GUINT64_CONSTANT(0x0000ffffffffffff)) { proto_tree_add_text(sub_tree, sub_tvb, 8, 6, "Delay: Infinity"); } else { proto_tree_add_text(sub_tree, sub_tvb, 8, 6, "Delay: %" G_GINT64_MODIFIER "u", big_num); @@ -2268,7 +2268,7 @@ dissect_eigrp_wide_metric (proto_tree *tree, tvbuff_t *tvb, int offset) */ big_num = tvb_get_ntoh64(sub_tvb, 14); big_num >>= 16; - if (big_num == G_GINT64_CONSTANT(0x0000ffffffffffffU)) { + if (big_num == G_GUINT64_CONSTANT(0x0000ffffffffffff)) { proto_tree_add_text(sub_tree, sub_tvb, 14, 6, "Bandwidth: Infinity"); } else { proto_tree_add_text(sub_tree, sub_tvb, 14, 6, "Bandwidth: %" G_GINT64_MODIFIER "u", big_num); diff --git a/epan/dissectors/packet-goose.c b/epan/dissectors/packet-goose.c index eea9d0bc84..d556ba9c66 100644 --- a/epan/dissectors/packet-goose.c +++ b/epan/dissectors/packet-goose.c @@ -499,7 +499,7 @@ dissect_goose_UtcTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _ seconds = tvb_get_ntohl(tvb, offset); fraction = tvb_get_ntoh24(tvb, offset+4) * 0x100; /* Only 3 bytes are recommended */ - nanoseconds = (guint32)( ((guint64)fraction * G_GINT64_CONSTANT(1000000000U)) / G_GINT64_CONSTANT(0x100000000U) ) ; + nanoseconds = (guint32)( ((guint64)fraction * G_GUINT64_CONSTANT(1000000000)) / G_GUINT64_CONSTANT(0x100000000) ) ; ts.secs = seconds; ts.nsecs = nanoseconds; diff --git a/epan/dissectors/packet-homeplug.c b/epan/dissectors/packet-homeplug.c index 2952ff5c8c..ec1091c67f 100644 --- a/epan/dissectors/packet-homeplug.c +++ b/epan/dissectors/packet-homeplug.c @@ -452,7 +452,7 @@ static const value_string homeplug_cer_mod_vals[] = { /* Constants used by various MMEs */ -#define HOMEPLUG_ADDR_INEXISTANT G_GINT64_CONSTANT(010000000000U) +#define HOMEPLUG_ADDR_INEXISTANT G_GUINT64_CONSTANT(010000000000) /* string values in function of TXPRIO */ static const value_string homeplug_txprio_vals[] = { diff --git a/epan/dissectors/packet-iwarp-mpa.c b/epan/dissectors/packet-iwarp-mpa.c index 0588f280b9..af89856bb2 100644 --- a/epan/dissectors/packet-iwarp-mpa.c +++ b/epan/dissectors/packet-iwarp-mpa.c @@ -56,9 +56,9 @@ void proto_reg_handoff_mpa(void); #define MPA_CRC_LEN 4 /* protocol constants */ -#define MPA_REQ_REP_FRAME G_GINT64_CONSTANT(0x4d50412049442052U) -#define MPA_ID_REQ_FRAME G_GINT64_CONSTANT(0x6571204672616d65U) -#define MPA_ID_REP_FRAME G_GINT64_CONSTANT(0x6570204672616d65U) +#define MPA_REQ_REP_FRAME G_GUINT64_CONSTANT(0x4d50412049442052) +#define MPA_ID_REQ_FRAME G_GUINT64_CONSTANT(0x6571204672616d65) +#define MPA_ID_REP_FRAME G_GUINT64_CONSTANT(0x6570204672616d65) #define MPA_MARKER_INTERVAL 512 #define MPA_MAX_PD_LENGTH 512 #define MPA_ALIGNMENT 4 diff --git a/epan/dissectors/packet-lpp.c b/epan/dissectors/packet-lpp.c index 9c21de4dd3..9a7c1b800b 100644 --- a/epan/dissectors/packet-lpp.c +++ b/epan/dissectors/packet-lpp.c @@ -6328,7 +6328,7 @@ dissect_lpp_T_cnavE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pro guint64 cnavE; int curr_offset = offset; offset = dissect_per_constrained_integer_64b(tvb, offset, actx, tree, hf_index, - 0U, G_GINT64_CONSTANT(8589934591U), &cnavE, FALSE); + 0U, G_GUINT64_CONSTANT(8589934591), &cnavE, FALSE); diff --git a/epan/dissectors/packet-lte-rrc.c b/epan/dissectors/packet-lte-rrc.c index c1150cb8f4..821b6bd73a 100644 --- a/epan/dissectors/packet-lte-rrc.c +++ b/epan/dissectors/packet-lte-rrc.c @@ -10178,7 +10178,7 @@ dissect_lte_rrc_T_timeInfoUTC_r11(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t nstime_t ts; guint32 old_offset = offset; offset = dissect_per_constrained_integer_64b(tvb, offset, actx, tree, hf_index, - 0U, G_GINT64_CONSTANT(549755813887U), &timeInfo, FALSE); + 0U, G_GUINT64_CONSTANT(549755813887), &timeInfo, FALSE); diff --git a/epan/dissectors/packet-m3ap.c b/epan/dissectors/packet-m3ap.c index 10dcc721ed..a27b33bff2 100644 --- a/epan/dissectors/packet-m3ap.c +++ b/epan/dissectors/packet-m3ap.c @@ -694,7 +694,7 @@ dissect_m3ap_AllocationAndRetentionPriority(tvbuff_t *tvb _U_, int offset _U_, a static int dissect_m3ap_BitRate(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer_64b(tvb, offset, actx, tree, hf_index, - 0U, G_GINT64_CONSTANT(10000000000U), NULL, FALSE); + 0U, G_GUINT64_CONSTANT(10000000000), NULL, FALSE); return offset; } diff --git a/epan/dissectors/packet-mms.c b/epan/dissectors/packet-mms.c index 3052e3720c..b693378f78 100644 --- a/epan/dissectors/packet-mms.c +++ b/epan/dissectors/packet-mms.c @@ -1938,7 +1938,7 @@ dissect_mms_UtcTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_ seconds = tvb_get_ntohl(tvb, offset); fraction = tvb_get_ntoh24(tvb, offset+4) * 0x100; /* Only 3 bytes are recommended */ - nanoseconds = (guint32)( ((guint64)fraction * G_GINT64_CONSTANT(1000000000U)) / G_GINT64_CONSTANT(0x100000000U) ) ; + nanoseconds = (guint32)( ((guint64)fraction * G_GUINT64_CONSTANT(1000000000)) / G_GUINT64_CONSTANT(0x100000000) ) ; ts.secs = seconds; ts.nsecs = nanoseconds; diff --git a/epan/dissectors/packet-nfs.c b/epan/dissectors/packet-nfs.c index eed43105f4..ebe0d364a0 100644 --- a/epan/dissectors/packet-nfs.c +++ b/epan/dissectors/packet-nfs.c @@ -9073,7 +9073,7 @@ dissect_nfs4_request_op(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tre lock_length = tvb_get_ntoh64(tvb, offset); offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_length, offset); offset = dissect_nfs4_locker(tvb, offset, newftree); - if (lock_length == G_GINT64_CONSTANT(0xffffffffffffffffU)) + if (lock_length == G_GUINT64_CONSTANT(0xffffffffffffffff)) g_string_append_printf (op_summary[ops_counter].optext, " FH: 0x%08x Offset: %"G_GINT64_MODIFIER"u Length: ", last_fh_hash, file_offset); @@ -9098,7 +9098,7 @@ dissect_nfs4_request_op(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tre offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_offset, offset); lock_length = tvb_get_ntoh64(tvb, offset); offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_length, offset); - if (lock_length == G_GINT64_CONSTANT(0xffffffffffffffffU)) + if (lock_length == G_GUINT64_CONSTANT(0xffffffffffffffff)) g_string_append_printf (op_summary[ops_counter].optext, " FH: 0x%08x Offset: %"G_GINT64_MODIFIER"u Length: ", last_fh_hash, file_offset); diff --git a/epan/dissectors/packet-pcap.c b/epan/dissectors/packet-pcap.c index c644cc209c..25b9e4cead 100644 --- a/epan/dissectors/packet-pcap.c +++ b/epan/dissectors/packet-pcap.c @@ -3911,7 +3911,7 @@ dissect_pcap_IMSI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto static int dissect_pcap_T_ue_GPSTimingOfCell(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer_64b(tvb, offset, actx, tree, hf_index, - 0U, G_GINT64_CONSTANT(37158911999999U), NULL, TRUE); + 0U, G_GUINT64_CONSTANT(37158911999999), NULL, TRUE); return offset; } @@ -6639,7 +6639,7 @@ dissect_pcap_GanssIntegerCodePhaseExt(tvbuff_t *tvb _U_, int offset _U_, asn1_ct static int dissect_pcap_T_ue_GANSSTimingOfCellFrames(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer_64b(tvb, offset, actx, tree, hf_index, - 0U, G_GINT64_CONSTANT(345599999999U), NULL, FALSE); + 0U, G_GUINT64_CONSTANT(345599999999), NULL, FALSE); return offset; } @@ -11843,7 +11843,7 @@ dissect_pcap_VelocityEstimate(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act static int dissect_pcap_T_utran_GPSTimingOfCell(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer_64b(tvb, offset, actx, tree, hf_index, - 0U, G_GINT64_CONSTANT(2322431999999U), NULL, TRUE); + 0U, G_GUINT64_CONSTANT(2322431999999), NULL, TRUE); return offset; } @@ -11870,7 +11870,7 @@ dissect_pcap_UTRAN_GPSReferenceTime(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_ static int dissect_pcap_T_ue_GANSSTimingOfCell(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer_64b(tvb, offset, actx, tree, hf_index, - 0U, G_GINT64_CONSTANT(345599999999U), NULL, TRUE); + 0U, G_GUINT64_CONSTANT(345599999999), NULL, TRUE); return offset; } diff --git a/epan/dissectors/packet-rmt-lct.c b/epan/dissectors/packet-rmt-lct.c index b4086dbe19..26294d3541 100644 --- a/epan/dissectors/packet-rmt-lct.c +++ b/epan/dissectors/packet-rmt-lct.c @@ -398,7 +398,7 @@ dissect_lct(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) case 6: proto_tree_add_item(lct_tree, hf_tsi48, tvb, offset, tsi_size, ENC_BIG_ENDIAN); - tsi = tvb_get_ntoh64(tvb, offset) & G_GINT64_CONSTANT(0x0000FFFFFFFFFFFFU); + tsi = tvb_get_ntoh64(tvb, offset) & G_GUINT64_CONSTANT(0x0000FFFFFFFFFFFF); break; default: tsi = 0; @@ -431,7 +431,7 @@ dissect_lct(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) case 6: proto_tree_add_item(lct_tree, hf_toi48, tvb, offset, toi_size, ENC_BIG_ENDIAN); - toi = tvb_get_ntoh64(tvb, offset) & G_GINT64_CONSTANT(0x0000FFFFFFFFFFFFU); + toi = tvb_get_ntoh64(tvb, offset) & G_GUINT64_CONSTANT(0x0000FFFFFFFFFFFF); break; case 8: diff --git a/epan/dissectors/packet-rrlp.c b/epan/dissectors/packet-rrlp.c index 9928d46d6b..cee2281e81 100644 --- a/epan/dissectors/packet-rrlp.c +++ b/epan/dissectors/packet-rrlp.c @@ -3584,7 +3584,7 @@ dissect_rrlp_T_cnavMo(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, p static int dissect_rrlp_T_cnavE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer_64b(tvb, offset, actx, tree, hf_index, - 0U, G_GINT64_CONSTANT(8589934591U), NULL, FALSE); + 0U, G_GUINT64_CONSTANT(8589934591), NULL, FALSE); return offset; } diff --git a/epan/dissectors/packet-s1ap.c b/epan/dissectors/packet-s1ap.c index 201c0bddd8..0cd195db3a 100644 --- a/epan/dissectors/packet-s1ap.c +++ b/epan/dissectors/packet-s1ap.c @@ -1909,7 +1909,7 @@ dissect_s1ap_Bearers_SubjectToStatusTransfer_Item(tvbuff_t *tvb _U_, int offset static int dissect_s1ap_BitRate(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer_64b(tvb, offset, actx, tree, hf_index, - 0U, G_GINT64_CONSTANT(10000000000U), NULL, FALSE); + 0U, G_GUINT64_CONSTANT(10000000000), NULL, FALSE); return offset; } diff --git a/epan/dissectors/packet-sv.c b/epan/dissectors/packet-sv.c index 3743950ed3..c9ac80e7d2 100644 --- a/epan/dissectors/packet-sv.c +++ b/epan/dissectors/packet-sv.c @@ -301,7 +301,7 @@ dissect_sv_UtcTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, seconds = tvb_get_ntohl(tvb, offset); fraction = tvb_get_ntoh24(tvb, offset+4) * 0x100; /* Only 3 bytes are recommended */ - nanoseconds = (guint32)( ((guint64)fraction * G_GINT64_CONSTANT(1000000000U)) / G_GINT64_CONSTANT(0x100000000U) ) ; + nanoseconds = (guint32)( ((guint64)fraction * G_GUINT64_CONSTANT(1000000000)) / G_GUINT64_CONSTANT(0x100000000) ) ; ts.secs = seconds; ts.nsecs = nanoseconds; diff --git a/epan/dissectors/packet-tds.c b/epan/dissectors/packet-tds.c index 29bec6c1e7..e53158213a 100644 --- a/epan/dissectors/packet-tds.c +++ b/epan/dissectors/packet-tds.c @@ -1881,9 +1881,9 @@ dissect_tds_type_varbyte(tvbuff_t *tvb, guint *offset, packet_info *pinfo, proto sub_tree = proto_item_add_subtree(item, ett_tds_type_varbyte); if(plp) { -#define PLP_TERMINATOR G_GINT64_CONSTANT(0x0000000000000000U) -#define UNKNOWN_PLP_LEN G_GINT64_CONSTANT(0xFFFFFFFFFFFFFFFEU) -#define PLP_NULL G_GINT64_CONSTANT(0xFFFFFFFFFFFFFFFFU) +#define PLP_TERMINATOR G_GUINT64_CONSTANT(0x0000000000000000) +#define UNKNOWN_PLP_LEN G_GUINT64_CONSTANT(0xFFFFFFFFFFFFFFFE) +#define PLP_NULL G_GUINT64_CONSTANT(0xFFFFFFFFFFFFFFFF) guint64 plp_length = tvb_get_letoh64(tvb, *offset); length_item = proto_tree_add_item(sub_tree, hf_tds_type_varbyte_plp_len, tvb, *offset, 8, ENC_LITTLE_ENDIAN); *offset += 8; diff --git a/epan/dissectors/packet-windows-common.c b/epan/dissectors/packet-windows-common.c index 4a605d7916..835d6bb91c 100644 --- a/epan/dissectors/packet-windows-common.c +++ b/epan/dissectors/packet-windows-common.c @@ -1108,7 +1108,7 @@ value_string_ext ms_country_codes_ext = VALUE_STRING_EXT_INIT(ms_country_codes); * Number of seconds between the UN*X epoch (January 1, 1970, 00:00:00 GMT) * and the Windows NT epoch (January 1, 1601, 00:00:00 "GMT"). */ -#define TIME_FIXUP_CONSTANT G_GINT64_CONSTANT(11644473600U) +#define TIME_FIXUP_CONSTANT G_GUINT64_CONSTANT(11644473600) /* * Translate an 8-byte FILETIME value, given as the upper and lower 32 bits, diff --git a/epan/dissectors/packet-wol.c b/epan/dissectors/packet-wol.c index 569887beb0..178a308664 100644 --- a/epan/dissectors/packet-wol.c +++ b/epan/dissectors/packet-wol.c @@ -111,7 +111,7 @@ dissect_wol_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data * quite expensive and seriously hinder Wireshark performance. For now, * unless we need to change it later, just compare the 1st 6 bytes. */ qword = tvb_get_ntoh48(tvb,0); - if(qword != G_GINT64_CONSTANT(0xffffffffffffU)) + if(qword != G_GUINT64_CONSTANT(0xffffffffffff)) return (0); /* So far so good. Now get the next 6 bytes, which we'll assume is the diff --git a/epan/dissectors/packet-x2ap.c b/epan/dissectors/packet-x2ap.c index 9f584fb744..9fc2add4a6 100644 --- a/epan/dissectors/packet-x2ap.c +++ b/epan/dissectors/packet-x2ap.c @@ -1470,7 +1470,7 @@ dissect_x2ap_AreaScopeOfMDT(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx static int dissect_x2ap_BitRate(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer_64b(tvb, offset, actx, tree, hf_index, - 0U, G_GINT64_CONSTANT(10000000000U), NULL, FALSE); + 0U, G_GUINT64_CONSTANT(10000000000), NULL, FALSE); return offset; } diff --git a/pcapio.c b/pcapio.c index 70bbf98ebf..01e069cabe 100644 --- a/pcapio.c +++ b/pcapio.c @@ -618,7 +618,7 @@ pcapng_write_interface_statistics_block(FILE* pfile, * Subtract difference, in microseconds, between January 1, 1601 * 00:00:00 UTC and January 1, 1970, 00:00:00 UTC. */ - timestamp -= G_GINT64_CONSTANT(11644473600000000U); + timestamp -= G_GUINT64_CONSTANT(11644473600000000); #else /* * Current time, represented as seconds and microseconds since diff --git a/tools/asn2wrs.py b/tools/asn2wrs.py index 1e596364fc..0b61245f6c 100755 --- a/tools/asn2wrs.py +++ b/tools/asn2wrs.py @@ -3311,7 +3311,7 @@ class Type (Node): minv = "G_GINT64_CONSTANT(%s)" % (str(minv)) if str(maxv).isdigit(): if (int(maxv) >= 2**32): - maxv = "G_GINT64_CONSTANT(%sU)" % (str(maxv)) + maxv = "G_GUINT64_CONSTANT(%s)" % (str(maxv)) else: maxv += 'U' if (ext): ext = 'TRUE' diff --git a/ui/gtk/packet_win.c b/ui/gtk/packet_win.c index 8b7de8906e..9d66fbe1b5 100644 --- a/ui/gtk/packet_win.c +++ b/ui/gtk/packet_win.c @@ -588,7 +588,7 @@ new_finfo_window(GtkWidget *w, struct FieldinfoWinData *DataPtr) if (finfo_type == FT_INT8 || finfo_type == FT_INT16 || finfo_type == FT_INT24 || finfo_type == FT_INT32 /* || finfo_type == FT_INT64 */) adj = gtk_adjustment_new((double) fvalue_get_sinteger(&finfo->value), (double) -(G_GINT64_CONSTANT(1) << (bitcount-1)), (double) ((G_GINT64_CONSTANT(1) << (bitcount-1))-1), 1.0, 10.0, 0); else if (finfo_type == FT_UINT8 || finfo_type == FT_UINT16 || finfo_type == FT_UINT24 || finfo_type == FT_UINT32 /* || finfo_type == FT_UINT64 */ ) - adj = gtk_adjustment_new((double) fvalue_get_uinteger(&finfo->value), 0.0, (double) ((G_GINT64_CONSTANT(1U) << bitcount)-1), 1.0, 10.0, 0); + adj = gtk_adjustment_new((double) fvalue_get_uinteger(&finfo->value), 0.0, (double) ((G_GUINT64_CONSTANT(1) << bitcount)-1), 1.0, 10.0, 0); else { g_assert_not_reached(); goto not_supported; diff --git a/wiretap/ngsniffer.c b/wiretap/ngsniffer.c index af055a3cdb..9c18623504 100644 --- a/wiretap/ngsniffer.c +++ b/wiretap/ngsniffer.c @@ -1246,8 +1246,8 @@ found: /* * Convert to seconds and picoseconds. */ - tsecs = t/G_GINT64_CONSTANT(1000000000000U); - tpsecs = t - tsecs*G_GINT64_CONSTANT(1000000000000U); + tsecs = t/G_GUINT64_CONSTANT(1000000000000); + tpsecs = t - tsecs*G_GUINT64_CONSTANT(1000000000000); /* * Add in the time_day value (86400 seconds/day). @@ -2183,8 +2183,8 @@ ngsniffer_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr, rec_hdr.time_day = (guint8)(tsecs / 86400); /* # days of capture - 86400 secs/day */ tsecs -= rec_hdr.time_day * 86400; /* time within day */ /* Convert to picoseconds */ - t = tsecs*G_GINT64_CONSTANT(1000000000000U) + - phdr->ts.nsecs*G_GINT64_CONSTANT(1000U); + t = tsecs*G_GUINT64_CONSTANT(1000000000000) + + phdr->ts.nsecs*G_GUINT64_CONSTANT(1000); /* Convert to units of timeunit = 1 */ t /= Psec[1]; t_low = (guint16)((t >> 0) & 0xFFFF); diff --git a/wiretap/vwr.c b/wiretap/vwr.c index dcb99b9b65..149455c1c3 100644 --- a/wiretap/vwr.c +++ b/wiretap/vwr.c @@ -35,10 +35,10 @@ /* platform-specific definitions for portability */ /* unsigned long long constants */ -# define NS_IN_US G_GINT64_CONSTANT(1000U) /* nanoseconds-to-microseconds */ -# define NS_IN_SEC G_GINT64_CONSTANT(1000000000U) /* nanoseconds-to-seconds */ -# define US_IN_SEC G_GINT64_CONSTANT(1000000U) /* microseconds-to-seconds */ -# define LL_ZERO G_GINT64_CONSTANT(0U) /* zero in unsigned long long */ +# define NS_IN_US G_GUINT64_CONSTANT(1000) /* nanoseconds-to-microseconds */ +# define NS_IN_SEC G_GUINT64_CONSTANT(1000000000) /* nanoseconds-to-seconds */ +# define US_IN_SEC G_GUINT64_CONSTANT(1000000) /* microseconds-to-seconds */ +# define LL_ZERO G_GUINT64_CONSTANT(0) /* zero in unsigned long long */ /* * Fetch a 64-bit value in "Corey-endian" form.