mirror of https://github.com/gabime/spdlog.git
fix(warning): avoid constexpr warning with GCC 15.2.1
The PR adds a couple of extra parentheses to avoid any complaints from the compiler about unreachable code.
Below is the warning produced by the compiler:
```
spdlog/include/spdlog/fmt/bundled/base.h(473): warning #128-D: loop is not reachable
for (; n != 0; ++s1, ++s2, --n) {
^
detected during:
instantiation of "auto fmt::v11::detail::compare(const Char *, const Char *, std::size_t)->int [with Char=char]" at line 591
instantiation of "auto fmt::v11::basic_string_view<Char>::compare(fmt::v11::basic_string_view<Char>) const->int [with Char=char]" at line 598
instantiation of class "fmt::v11::basic_string_view<Char> [with Char=char]" at line 2642
instantiation of "auto fmt::v11::basic_format_args<Context>::get_id(fmt::v11::basic_string_view<Char>) const->int [with Context=fmt::v11::context, Char=char]" at line 2685
Remark: The warnings can be suppressed with "-diag-suppress <warning-number>"
```
pull/3469/head
parent
f1d748e5e3
commit
0be53ea9bd
Loading…
Reference in New Issue