Add -Wshadow + reformat switch cases

Adding -Wshadow will prevent unintentional variable overrides.

Also, wrapping switch cases with declarations with braces will make our
logic more robust by limiting lifetimes of variables.
This commit is contained in:
tokyo4j 2025-05-23 13:09:15 +09:00 committed by Johan Malm
parent e19f0fc267
commit 68bf55d724
4 changed files with 91 additions and 94 deletions

View file

@ -34,6 +34,7 @@ add_project_arguments(cc.get_supported_arguments([
'-Wmissing-prototypes',
'-Walloca',
'-Wunused-macros',
'-Wshadow',
'-Wno-unused-parameter',
'-Wno-expansion-to-defined',