commit 45046441969d8fee0249492c1364d0e92c1861c7
parent fd3431ec59676032cc6a642672460af4e18ad267
Author: Morel BĂ©renger <berengermorel76@gmail.com>
Date: Sun, 6 Oct 2024 18:53:55 +0200
avoid float to int implicit conversion
Diffstat:
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/build.ninja b/build.ninja
@@ -24,6 +24,7 @@ CCFLAGS = $$CCFLAGS $
-Werror=incompatible-function-pointer-types $
-Werror=cast-qual $
-Werror=c2x-extensions $
+ -Werror=float-conversion $
subninja src/librunit.ninja
subninja src/runsv.ninja
diff --git a/src/iopause.c b/src/iopause.c
@@ -20,7 +20,7 @@ void iopause(struct pollfd *x,unsigned int len,struct taia *deadline,struct taia
taia_sub(&t,deadline,&t);
d = taia_approx(&t);
if (d > 1000.0) d = 1000.0;
- millisecs = d * 1000.0 + 20.0;
+ millisecs = (int)( d * 1000.0 + 20.0 );
}
for (i = 0;i < len;++i)