diff --git a/include/fmt/prepare.h b/include/fmt/prepare.h index 5b0434d8..140d2855 100644 --- a/include/fmt/prepare.h +++ b/include/fmt/prepare.h @@ -383,7 +383,6 @@ template class compiletime_prepared_parts_type_provider { private: FMT_CONSTEXPR const char_type* find_matching_brace(const char_type* begin, const char_type* end) { - FMT_CONSTEXPR_DECL const basic_string_view text = Format{}; unsigned braces_counter{0u}; for (; begin != end; ++begin) { if (*begin == '{') { diff --git a/test/ostream-test.cc b/test/ostream-test.cc index 05fe290c..7f4479d9 100644 --- a/test/ostream-test.cc +++ b/test/ostream-test.cc @@ -154,7 +154,7 @@ TEST(OStreamTest, WriteToOStreamMaxSize) { EXPECT_CALL(streambuf, xsputn(data, static_cast(n))) .WillOnce(testing::Return(max_streamsize)); data += n; - size -= static_cast(n); + size -= n; } while (size != 0); fmt::internal::write(os, buffer); } diff --git a/test/prepare-test.cc b/test/prepare-test.cc index cd8c7405..647db5db 100644 --- a/test/prepare-test.cc +++ b/test/prepare-test.cc @@ -169,7 +169,6 @@ TEST(PrepareTest, FormatPart_ComparisonOperators) { auto rhs = format_part(specs); EXPECT_EQ(lhs, rhs); - const auto specs_text = fmt::string_view("<10"); specs.parsed_specs = prepared_specs(); lhs = format_part(specs); rhs = format_part(specs); @@ -191,8 +190,6 @@ TEST(PrepareTest, FormatPart_ComparisonOperators) { rhs = format_part(rhs_spec); EXPECT_NE(lhs, rhs); - const auto lhs_specs_text = fmt::string_view("<10"); - const auto rhs_specs_text = fmt::string_view("<42"); lhs_spec = format_part::specification(specs_argument_id); rhs_spec = format_part::specification(specs_argument_id); lhs_spec.parsed_specs.precision = 1; @@ -202,7 +199,6 @@ TEST(PrepareTest, FormatPart_ComparisonOperators) { EXPECT_NE(lhs, rhs); } { - const auto specs_text = fmt::string_view{"<10"}; const auto specs_argument_id = 0u; const auto specs_named_argument_id = fmt::internal::string_view_metadata(0, 42); @@ -623,7 +619,7 @@ template struct user_allocator { template user_allocator(const user_allocator&) {} pointer allocate(size_type cnt, - typename std::allocator::const_pointer = 0) { + typename std::allocator::const_pointer = FMT_NULL) { return new value_type[cnt]; } @@ -633,8 +629,8 @@ template struct user_allocator { void destroy(pointer p) { (*p).~value_type(); } - bool operator==(const user_allocator& other) const { return true; } - bool operator!=(const user_allocator& other) const { return false; } + bool operator==(const user_allocator&) const { return true; } + bool operator!=(const user_allocator&) const { return false; } }; TEST(PrepareTest, PassUserTypeFormat) {