Resolve "fix(build): FTBFS with gcc12"
Description
Build fixes for GCC12. The only annoying part is the bugs with some wrong warnings reported when optimizations are enabled. This is fixed in gcc-trunk, but the buggy version 12.2 will be in use in the next stable Debian release. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105329
Closes #919 (closed)
How to test it?
Build with gcc12