build: enable more warnings

when comparing the disabled warnings specified by `configured.py`
and the ones specified by `cmake/mode.common.cmake`, it turns out
we are now able to enable more warning options. so let's enable them.
the change was tested using Clang-17 and GCC-13.

there are many errors from GCC-13, like:

```
/home/kefu/dev/scylladb/db/view/view.hh:114:17: error: declaration of ‘column_kind db::view::clustering_or_static_row::column_kind() const’ changes meaning of ‘column_kind’ [-fpermissive]
  114 |     column_kind column_kind() const {
      |                 ^~~~~~~~~~~
```
so the build with GCC failed.

and with this change, Clang-17 is able to build build the tree without
warnings.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
This commit is contained in:
Kefu Chai
2023-03-07 14:29:57 +08:00
parent f0659cb1bb
commit 577b1c679c

View File

@@ -1337,19 +1337,13 @@ warnings = [
'-Wall',
'-Werror',
'-Wno-mismatched-tags', # clang-only
'-Wno-maybe-uninitialized', # false positives on gcc 5
'-Wno-tautological-compare',
'-Wno-parentheses-equality',
'-Wno-c++11-narrowing',
'-Wno-missing-braces',
'-Wno-noexcept-type',
'-Wno-nonnull-compare',
'-Wno-error=cpp',
'-Wno-ignored-attributes',
'-Wno-overloaded-virtual',
'-Wno-stringop-overflow',
'-Wno-unused-command-line-argument',
'-Wno-redeclared-class-member',
'-Wno-unsupported-friend',
'-Wno-delete-non-abstract-non-virtual-dtor',
'-Wno-braced-scalar-init',
@@ -1359,10 +1353,8 @@ warnings = [
'-Wno-psabi',
'-Wno-narrowing',
'-Wno-nonnull',
'-Wno-catch-value',
'-Wno-stringop-overread', # false positives with gcc 12
'-Wno-uninitialized', # false positives with gcc 12,
'-Wno-missing-attributes', # something in seastar's memory.cc, TBD,
'-Wno-dangling-pointer', # false positives with gcc 12
]