summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-tds.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2015-10-20 15:58:20 +0200
committerPascal Quantin <pascal.quantin@gmail.com>2015-10-20 15:18:43 +0000
commit71f0dd7841c0ef574bb7f92c9341111c589d290b (patch)
tree5e84d14f82d5d9d402a2cf69d18baa73d3f9abbc /epan/dissectors/packet-tds.c
parentea8e6955fcff21333c203bc00f69d5025761459b (diff)
downloadwireshark-71f0dd7841c0ef574bb7f92c9341111c589d290b.tar.gz
TDS: add more casts to please OSX 10.5 x86 buildbot
Change-Id: I92f3c2b869132da38f15c20355abd24d4e11639c Reviewed-on: https://code.wireshark.org/review/11181 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-tds.c')
-rw-r--r--epan/dissectors/packet-tds.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-tds.c b/epan/dissectors/packet-tds.c
index 22f8ffd020..3313c6ba85 100644
--- a/epan/dissectors/packet-tds.c
+++ b/epan/dissectors/packet-tds.c
@@ -1926,7 +1926,7 @@ dissect_tds_type_varbyte(tvbuff_t *tvb, guint *offset, packet_info *pinfo, proto
days += tvb_get_guint8(tvb, *offset + 1) << 8;
days += tvb_get_guint8(tvb, *offset);
- tv.secs = (days * G_GUINT64_CONSTANT(86400)) - G_GUINT64_CONSTANT(62135596800); /* 62135596800 - seconds between Jan 1, 1 and Jan 1, 1970 */
+ tv.secs = (time_t)((days * G_GUINT64_CONSTANT(86400)) - G_GUINT64_CONSTANT(62135596800)); /* 62135596800 - seconds between Jan 1, 1 and Jan 1, 1970 */
tv.nsecs = 0;
proto_tree_add_time(sub_tree, hf_tds_type_varbyte_data_absdatetime, tvb, *offset, length, &tv);
}
@@ -1957,7 +1957,7 @@ dissect_tds_type_varbyte(tvbuff_t *tvb, guint *offset, packet_info *pinfo, proto
dblvalue = dblvalue / 10;
}
- tv.secs = (guint64)dblvalue;
+ tv.secs = (time_t)dblvalue;
tv.nsecs = (guint)(dblvalue - tv.secs) * 1000000000;
proto_tree_add_time(sub_tree, hf_tds_type_varbyte_data_reltime, tvb, *offset, length, &tv);
@@ -1978,7 +1978,7 @@ dissect_tds_type_varbyte(tvbuff_t *tvb, guint *offset, packet_info *pinfo, proto
guint days = tvb_get_guint16(tvb, *offset, encoding);
guint minutes = tvb_get_guint16(tvb, *offset + 2, encoding);
- tv.secs = (days * G_GUINT64_CONSTANT(86400)) + (minutes * 60) - G_GUINT64_CONSTANT(2208988800); /* 2208988800 - seconds between Jan 1, 1900 and Jan 1, 1970 */
+ tv.secs = (time_t)((days * G_GUINT64_CONSTANT(86400)) + (minutes * 60) - G_GUINT64_CONSTANT(2208988800)); /* 2208988800 - seconds between Jan 1, 1900 and Jan 1, 1970 */
tv.nsecs = 0;
proto_tree_add_time(sub_tree, hf_tds_type_varbyte_data_absdatetime, tvb, *offset, length, &tv);
}
@@ -1989,7 +1989,7 @@ dissect_tds_type_varbyte(tvbuff_t *tvb, guint *offset, packet_info *pinfo, proto
guint days = tvb_get_guint32(tvb, *offset, encoding);
guint threehndths = tvb_get_guint32(tvb, *offset + 4, encoding);
- tv.secs = (days * G_GUINT64_CONSTANT(86400)) + (threehndths/300) - G_GUINT64_CONSTANT(2208988800); /* 2208988800 - seconds between Jan 1, 1900 and Jan 1, 1970 */
+ tv.secs = (time_t)((days * G_GUINT64_CONSTANT(86400)) + (threehndths/300) - G_GUINT64_CONSTANT(2208988800)); /* 2208988800 - seconds between Jan 1, 1900 and Jan 1, 1970 */
tv.nsecs = (threehndths%300) * 10000000 / 3;
proto_tree_add_time(sub_tree, hf_tds_type_varbyte_data_absdatetime, tvb, *offset, length, &tv);
}
@@ -2034,7 +2034,7 @@ dissect_tds_type_varbyte(tvbuff_t *tvb, guint *offset, packet_info *pinfo, proto
secs = (days * G_GUINT64_CONSTANT(86400)) - G_GUINT64_CONSTANT(62135596800); /* 62135596800 - seconds between Jan 1, 1 and Jan 1, 1970 */
value = (guint64)dblvalue;
- tv.secs = secs + value;
+ tv.secs = (time_t)(secs + value);
dblvalue = dblvalue - value;
tv.nsecs = (guint)dblvalue * 1000000000;
proto_tree_add_time(sub_tree, hf_tds_type_varbyte_data_absdatetime, tvb, *offset, length, &tv);
@@ -2082,7 +2082,7 @@ dissect_tds_type_varbyte(tvbuff_t *tvb, guint *offset, packet_info *pinfo, proto
secs = (days * G_GUINT64_CONSTANT(86400)) - G_GUINT64_CONSTANT(62135596800); /* 62135596800 - seconds between Jan 1, 1 and Jan 1, 1970 */
value = (guint64)dblvalue;
- tv.secs = secs + value;
+ tv.secs = (time_t)(secs + value);
dblvalue = dblvalue - value;
tv.nsecs = (guint)dblvalue * 1000000000;
timeitem = proto_tree_add_time(sub_tree, hf_tds_type_varbyte_data_absdatetime, tvb, *offset, length, &tv);