modm-io / modm

modm: a C++23 library generator for AVR and ARM Cortex-M devices
https://modm.io
Mozilla Public License 2.0
748 stars 132 forks source link

[ext] Update submodules #1211

Open salkinium opened 2 weeks ago

salkinium commented 2 weeks ago

Updated and compiled without issues:

Updated and compiled with changes:

Tested in hardware:

chris-durand commented 1 week 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.

chris-durand commented 1 week ago

https://github.com/modm-ext/printf-partial/pull/1

salkinium commented 1 week ago

Of course! I'll get back to this PR on the weekend.