The code declares variables in switch-case blocks. This seems to compile without an error on GCC 11 and newer, but older compilers don't accept this code. Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>