Qt: Build wireless_timeline.cpp with -Wshorten-64-to-32
authorStig Bjørlykke <stig@bjorlykke.org>
Mon, 5 Jun 2017 16:54:56 +0000 (18:54 +0200)
committerStig Bjørlykke <stig@bjorlykke.org>
Mon, 5 Jun 2017 17:52:44 +0000 (17:52 +0000)
[...]/wireshark/ui/qt/wireless_timeline.cpp:190:50: error: implicit
   conversion loses integer precision: 'unsigned long' to 'guint' (aka 'unsigned int')
   [-Werror,-Wshorten-64-to-32]
     guint half_window = (end_tsf - start_tsf)/2;
           ~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~^~

Change-Id: I675408f8a6c0809588ce89b2b98e05d7bfb10ed9
Reviewed-on: https://code.wireshark.org/review/21969
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
ui/qt/wireless_timeline.cpp

index 7fb583528c169e72451dd0a37d57fef2b3f130ef..97fc3255c014a2017d70aec96648864de7db58db 100644 (file)
@@ -187,7 +187,7 @@ void WirelessTimeline::packetSelectionChanged()
 
         guint left_margin = 0.9 * start_tsf + 0.1 * end_tsf;
         guint right_margin = 0.1 * start_tsf + 0.9 * end_tsf;
-        guint half_window = (end_tsf - start_tsf)/2;
+        guint64 half_window = (end_tsf - start_tsf)/2;
 
         if (wr) {
             // are we to the left of the left margin?