prusa3d / Prusa-Firmware-MMU

Other
32 stars 15 forks source link

Fix compiler error on GCC 12 #273

Closed gudnimg closed 1 year ago

gudnimg commented 1 year ago

static_assert(sizeof(ChopConfU::S) == 4) would return 5 == 4 static_assert(sizeof(ChopConfU) == 4); would return 8 == 4

image

@vintagepc helped me resolve this: using uint32_t on all types instead of uint8_t fixes the issue

I stumpled on this issue when trying to run the unit tests locally on Windows using GCC 12.2.0

No change in memory