[client] enable useful extra warnings

-Wno-sign-compare is used to suppress warnings related to comparing signed
values with unsigned ones. It's too pedantic.

-Wunused-parameter is also too pedantic, especially since all parameters
have to be named in C.

Otherwise, -Wextra lets us catch bugs, such as x < 0 for unsigned x.

On gcc, we pass -Wimplicit-fallthrough=2 so it will recognize our fall
through comment.
This commit is contained in:
Quantum 2021-01-14 03:31:12 -05:00 committed by Geoffrey McRae
parent 5538a31f6b
commit 0495f5de26

View File

@ -41,6 +41,10 @@ add_feature_info(ENABLE_WAYLAND ENABLE_WAYLAND "Wayland support.")
add_compile_options(
"-Wall"
"-Wextra"
"-Wno-sign-compare"
"-Wno-unused-parameter"
"$<$<C_COMPILER_ID:GNU>:-Wimplicit-fallthrough=2>"
"-Werror"
"-Wfatal-errors"
"-ffast-math"