fix-double-promotion in fsl_xcvr_trim

Double promotion warnings are generated with the flag -Wdouble-promotion

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
This commit is contained in:
Ryan McClelland 2023-07-19 11:38:46 -07:00 committed by Johan Hedberg
parent d1e61c0c65
commit eabd530a64
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@
#define trunc(x) (uint32_t)(x)
/* This works correctly only for positive numbers... */
#define round(x) (uint32_t)((x) + 0.5)
#define roundf(x) (float)(uint32_t)((x) + 0.5)
#define roundf(x) (float)(uint32_t)((x) + 0.5f)
#endif