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
This commit is contained in:
Jörg Mayer 2013-09-12 20:07:48 +00:00
parent 753afe5fa4
commit 934cc4526d
1 changed files with 2 additions and 2 deletions

View File

@ -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;