From 5f9c05db78926dfb063fdd0493ecc6b8e12c2e02 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 4 May 2018 19:02:23 +0200 Subject: Avoid implicitly promotion of float to double Reported-By: gcc -Wdouble-promotion Gbp-Dch: Ignore --- apt-pkg/contrib/progress.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/contrib') diff --git a/apt-pkg/contrib/progress.cc b/apt-pkg/contrib/progress.cc index 5499f0946..6743889b8 100644 --- a/apt-pkg/contrib/progress.cc +++ b/apt-pkg/contrib/progress.cc @@ -118,7 +118,7 @@ bool OpProgress::CheckChange(float Interval) // Check time delta struct timeval Now; gettimeofday(&Now,0); - double Diff = Now.tv_sec - LastTime.tv_sec + (Now.tv_usec - LastTime.tv_usec)/1000000.0; + decltype(Interval) const Diff = Now.tv_sec - LastTime.tv_sec + (Now.tv_usec - LastTime.tv_usec)/1000000.0; if (Diff < Interval) return false; LastTime = Now; -- cgit v1.2.3