From ebdcc7fd5478a9bf7074611952bd1d1d3183e5c6 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Wed, 18 Nov 2015 23:46:55 +0200 Subject: gpslocation.cpp: fix signed vs unsinged int comparison warning QDateTime::toTime_t() is misleading as it does not return a C time_t type, but a 'unsigned int' or rather the Qt 'uint' typedef. To prevent the warning we cast it to 'time_t' and to comply with the 'lastTime' variable. Signed-off-by: Lubomir I. Ivanov Signed-off-by: Dirk Hohndel --- subsurface-core/gpslocation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsurface-core/gpslocation.cpp b/subsurface-core/gpslocation.cpp index 412bf95ad..06af74c0c 100644 --- a/subsurface-core/gpslocation.cpp +++ b/subsurface-core/gpslocation.cpp @@ -67,7 +67,7 @@ void GpsLocation::newPosition(QGeoPositionInfo pos) // if we have no record stored or if at least the configured minimum // time has passed or we moved at least the configured minimum distance if (!nr || - pos.timestamp().toTime_t() > lastTime + prefs.time_threshold || + (time_t)pos.timestamp().toTime_t() > lastTime + prefs.time_threshold || lastCoord.distanceTo(pos.coordinate()) > prefs.distance_threshold) { geoSettings->setValue("count", nr + 1); geoSettings->setValue(QString("gpsFix%1_time").arg(nr), pos.timestamp().toTime_t()); -- cgit v1.2.3-70-g09d2