From 26e62dfad07a02efc03e4c08c3c6b08e5c5d2076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig=20Bj=C3=B8rlykke?= Date: Tue, 28 Feb 2017 10:19:28 +0100 Subject: Qt: Fix -Wshorten-64-to-32 warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix some warnings when building with -Wshorten-64-to-32 flag for C++ code. Fixes for warnings from QList, QTimer and QVector has been pushed upstream, so some time we may be able to enable this flag for C++. Change-Id: Iae7457f9afc469c63f3edbe23dbf272b5c6c9e5e Reviewed-on: https://code.wireshark.org/review/20310 Petri-Dish: Stig Bjørlykke Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke --- ui/qt/qcustomplot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui/qt/qcustomplot.cpp') diff --git a/ui/qt/qcustomplot.cpp b/ui/qt/qcustomplot.cpp index 006be1ad36..72fb58747d 100644 --- a/ui/qt/qcustomplot.cpp +++ b/ui/qt/qcustomplot.cpp @@ -5624,7 +5624,7 @@ void QCPAxis::generateAutoTicks() // Generate tick positions according to mTickStep: qint64 firstStep = floor(mRange.lower/mTickStep); // do not use qFloor here, or we'll lose 64 bit precision qint64 lastStep = ceil(mRange.upper/mTickStep); // do not use qCeil here, or we'll lose 64 bit precision - int tickcount = lastStep-firstStep+1; + int tickcount = int(lastStep-firstStep+1); if (tickcount < 0) tickcount = 0; mTickVector.resize(tickcount); for (int i=0; i