Skip to content

Commit

Permalink
Everywhere: Add "free" warnings
Browse files Browse the repository at this point in the history
The following warnings do not occur anywhere in the codebase and so
enabling them is effectivly free:
 * `-Wcast-align`
 * `-Wduplicated-cond`
 * `-Wformat=2`
 * `-Wlogical-op`
 * `-Wmisleading-indentation`
 * `-Wunused`

These are taken as a strict subset of the list in SerenityOS#5487.
  • Loading branch information
Nicholas-Baron authored and awesomekling committed Apr 15, 2021
1 parent 0f47a23 commit 7b502d1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,22 @@ endif()
add_compile_options(-Wall)
add_compile_options(-Wextra)

# The following warnings are sorted by the "base" name (the part excluding the initial Wno or W).
add_compile_options(-Wno-address-of-packed-member)
add_compile_options(-Wcast-align)
add_compile_options(-Wcast-qual)
add_compile_options(-Wno-deprecated-copy)
add_compile_options(-Wduplicated-cond)
add_compile_options(-Wno-expansion-to-defined)
add_compile_options(-Wformat=2)
add_compile_options(-Wimplicit-fallthrough)
add_compile_options(-Wlogical-op)
add_compile_options(-Wmisleading-indentation)
add_compile_options(-Wmissing-declarations)
add_compile_options(-Wno-nonnull-compare)
add_compile_options(-Wno-unknown-warning-option)
add_compile_options(-Wundef)
add_compile_options(-Wunused)
add_compile_options(-Wwrite-strings)

add_compile_options(-ffile-prefix-map=${CMAKE_SOURCE_DIR}=.)
Expand Down

0 comments on commit 7b502d1

Please sign in to comment.