From 2e3488154c5db200ed6ddfbd4c00a966eccc6554 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Tue, 9 Feb 2021 15:57:48 +0100 Subject: [PATCH] tests/driver_hih6130: fix 'absolute-value' error --- tests/driver_hih6130/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/driver_hih6130/main.c b/tests/driver_hih6130/main.c index 99a2ba7978..27ee8b2602 100644 --- a/tests/driver_hih6130/main.c +++ b/tests/driver_hih6130/main.c @@ -65,10 +65,10 @@ int main(void) /* Split value into two integer parts for printing. */ fractional = modff(hum, &integral); printf("humidity: %4d.%04u %%", - (int)integral, (unsigned int)abs(fractional * 10000.f)); + (int)integral, (unsigned int)abs((int)(fractional * 10000.f))); fractional = modff(temp, &integral); printf(" temperature: %4d.%04u C\n", - (int)integral, (unsigned int)abs(fractional * 10000.f)); + (int)integral, (unsigned int)abs((int)(fractional * 10000.f))); } return 0;