diff --git a/cmake/mode.common.cmake b/cmake/mode.common.cmake index faf4c437ce..a23e0ba777 100644 --- a/cmake/mode.common.cmake +++ b/cmake/mode.common.cmake @@ -2,7 +2,6 @@ set(disabled_warnings c++11-narrowing mismatched-tags overloaded-virtual - parentheses-equality unsupported-friend) include(CheckCXXCompilerFlag) foreach(warning ${disabled_warnings}) diff --git a/compaction/table_state.hh b/compaction/table_state.hh index 7f0a52a4fe..adf1e35113 100644 --- a/compaction/table_state.hh +++ b/compaction/table_state.hh @@ -62,7 +62,7 @@ struct formatter : formatter { template auto format(const compaction::table_state& t, FormatContext& ctx) const { auto s = t.schema(); - return format_to(ctx.out(), "{}.{} compaction_group={}", s->ks_name(), s->cf_name(), t.get_group_id()); + return fmt::format_to(ctx.out(), "{}.{} compaction_group={}", s->ks_name(), s->cf_name(), t.get_group_id()); } }; diff --git a/configure.py b/configure.py index c934fd56bd..d27d2d36d6 100755 --- a/configure.py +++ b/configure.py @@ -1351,7 +1351,6 @@ warnings = [ '-Werror', '-Wno-mismatched-tags', # clang-only '-Wno-tautological-compare', - '-Wno-parentheses-equality', '-Wno-c++11-narrowing', '-Wno-ignored-attributes', '-Wno-overloaded-virtual', @@ -2031,13 +2030,14 @@ with open(buildfile, 'w') as f: for cc in grammar.sources('$builddir/{}/gen'.format(mode)): obj = cc.replace('.cpp', '.o') f.write('build {}: cxx.{} {} || {}\n'.format(obj, mode, cc, ' '.join(serializers))) + flags = '-Wno-parentheses-equality' if cc.endswith('Parser.cpp'): # Unoptimized parsers end up using huge amounts of stack space and overflowing their stack - flags = '-O1' if modes[mode]['optimization-level'] in ['0', 'g', 's'] else '' + flags += ' -O1' if modes[mode]['optimization-level'] in ['0', 'g', 's'] else '' if has_sanitize_address_use_after_scope: flags += ' -fno-sanitize-address-use-after-scope' - f.write(' obj_cxxflags = %s\n' % flags) + f.write(f' obj_cxxflags = {flags}\n') f.write(f'build $builddir/{mode}/gen/empty.cc: gen\n') for hh in headers: f.write('build $builddir/{mode}/{hh}.o: checkhh.{mode} {hh} | $builddir/{mode}/gen/empty.cc || {gen_headers_dep}\n'.format( diff --git a/cql3/CMakeLists.txt b/cql3/CMakeLists.txt index 4c4527ae51..261efc1f5c 100644 --- a/cql3/CMakeLists.txt +++ b/cql3/CMakeLists.txt @@ -7,7 +7,7 @@ generate_cql_grammar( SOURCES cql_grammar_srcs) set_source_files_properties(${cql_grammar_srcs} PROPERTIES - COMPILE_FLAGS "-Wno-uninitialized") + COMPILE_FLAGS "-Wno-uninitialized -Wno-parentheses-equality") add_library(cql3 STATIC) target_sources(cql3