serial: stm32: Fix warnings when compiling with W=1