Open salkinium opened 2 weeks ago
Can we add another change before merging this? printf doesn't compile on hosted from gcc 13. There is a warning about a potentially uninitialized variable that is treated as an error:
In function ‘apply_scaling’,
inlined from ‘get_normalized_components’ at modm/ext/printf/printf.c:706:29,
inlined from ‘print_exponential_number’ at modm/ext/printf/printf.c:964:5:
modm/ext/printf/printf.c:658:66: error: ‘normalization.raw_factor’ may be used uninitialized [-Werror=maybe-uninitialized]
658 | return normalization.multiply ? num * normalization.raw_factor : num / normalization.raw_factor;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
modm/ext/printf/printf.c: In function ‘print_exponential_number’:
modm/ext/printf/printf.c:904:25: note: ‘normalization.raw_factor’ was declared here
904 | struct scaling_factor normalization;
| ^~~~~~~~~~~~~
Another function unapply_scaling
has a workaround for it which disables the warning for one line of code. Looks like we have to duplicate that.
Of course! I'll get back to this PR on the weekend.
Updated and compiled without issues:
Updated and compiled with changes:
Tested in hardware: