sensors: lsm6dsv16x: fix double-promotion warning

use roundf instead of round in Q31_SHIFT_VAL macro to avoid
double-promotion warning

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit is contained in:
Benjamin Cabé 2025-03-21 14:25:02 +01:00 committed by Benjamin Cabé
commit 1e75b82244

View file

@ -66,7 +66,7 @@ static const uint32_t sflp_period_ns[] = {
* Expand val to q31_t according to its range; this is achieved multiplying by 2^31/2^range.
*/
#define Q31_SHIFT_VAL(val, range) \
(q31_t) (round((val) * ((int64_t)1 << (31 - (range)))))
(q31_t) (roundf((val) * ((int64_t)1 << (31 - (range)))))
/*
* Expand micro_val (a generic micro unit) to q31_t according to its range; this is achieved