diff options
author | Jörg Mayer <jmayer@loplof.de> | 2013-09-12 20:07:48 +0000 |
---|---|---|
committer | Jörg Mayer <jmayer@loplof.de> | 2013-09-12 20:07:48 +0000 |
commit | 934cc4526dfe2d2f313d166342d39868384d2d27 (patch) | |
tree | 9e6f50f8764dda440285dcbc2b5c677aa306fb94 /epan/proto.c | |
parent | 753afe5fa4a31008a519e1c209efdf4056071d15 (diff) |
Make proto.c compile on my system (linux, 32 bit)
[-Werror,-Wshorten-64-to-32]
time_stamp.secs = (todsecs / 1000000) - TOD_BASETIME;
~ ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/home/jmayer/work/wireshark/svn/trunk/epan/proto.c:1613:44: error: implicit conversion
loses integer precision: 'unsigned long long' to 'time_t' (aka 'long')
[-Werror,-Wshorten-64-to-32]
time_stamp.secs = (todsecs / 1000000) - TOD_BASETIME;
~ ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
svn path=/trunk/; revision=51978
Diffstat (limited to 'epan/proto.c')
-rw-r--r-- | epan/proto.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/proto.c b/epan/proto.c index aa95d36fd7..df055f15f2 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -1601,7 +1601,7 @@ proto_tree_new_item(field_info *new_fi, proto_tree *tree, #define TOD_BASETIME 2208988800ul todsecs = tvb_get_ntoh64(tvb, start) >> 12; - time_stamp.secs = (todsecs / 1000000) - TOD_BASETIME; + time_stamp.secs = (long)((todsecs / 1000000) - TOD_BASETIME); time_stamp.nsecs = (int)((todsecs % 1000000) * 1000); break; @@ -1610,7 +1610,7 @@ proto_tree_new_item(field_info *new_fi, proto_tree *tree, * TOD time stamp, big-endian. */ todsecs = tvb_get_letoh64(tvb, start) >> 12 ; - time_stamp.secs = (todsecs / 1000000) - TOD_BASETIME; + time_stamp.secs = (long)((todsecs / 1000000) - TOD_BASETIME); time_stamp.nsecs = (int)((todsecs % 1000000) * 1000); break; |