Skip to content

Commit

Permalink
fix-double-promotion in fsl_xcvr_trim
Browse files Browse the repository at this point in the history
Double promotion warnings are generated with the flag -Wdouble-promotion

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
  • Loading branch information
XenuIsWatching authored and jhedberg committed Oct 10, 2023
1 parent d1e61c0 commit eabd530
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit eabd530

Please sign in to comment.