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:
parent
273d60164d
commit
1e75b82244
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue