-Wcast-align
-Wdouble-promotion
-Wextra
+ -Wextra-semi
-Wnon-virtual-dtor
-Wnull-dereference
-Woverloaded-virtual
)
endif()
+ add_compile_flag_if_supported(CCACHE_COMPILER_WARNINGS "-Wextra-semi-stmt")
+
# If compiler supports -Wshadow-field-in-constructor, disable only that.
# Otherwise disable shadow.
add_compile_flag_if_supported_ex(
auto p = compopt_prefix_takes_path(args[i]);
if (p) {
path = *p;
- };
+ }
}
if (path) {
hash.hash_delimiter("path exists");
-// Copyright (C) 2019-2024 Joel Rosdahl and other contributors
+// Copyright (C) 2019-2025 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
if (_result != 0) { \
throw core::Fatal(FMT(#function " failed: {}", strerror(_result))); \
} \
- }
+ } \
+ static_assert(true) /* allow semicolon after macro */
} // namespace core
-// Copyright (C) 2020-2024 Joel Rosdahl and other contributors
+// Copyright (C) 2020-2025 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
get()
{
return m_distribution(m_random_engine);
- };
+ }
private:
std::random_device m_random_device;
-// Copyright (C) 2020-2024 Joel Rosdahl and other contributors
+// Copyright (C) 2020-2025 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
// least one placeholder without flushing and with a reused timestamp. `format`
// is checked at compile time.
#define BULK_LOG(logger_, format_, ...) \
- logger_.log(fmt::format(FMT_STRING(format_), __VA_ARGS__));
+ logger_.log(fmt::format(FMT_STRING(format_), __VA_ARGS__))
namespace util::logging {
auto value = parse_unsigned(duration.substr(0, duration.length() - 1));
if (!value) {
return value;
- };
+ }
return factor * *value;
}