Error: CPPCHECK_WARNING (CWE-562): [#def1] fmt-11.0.2-build/fmt-11.0.2/include/fmt/base.h:502: error[returnTempReference]: Reference to temporary returned. # 500| using OutputIt::container; # 501| }; # 502|-> return *accessor(it).container; # 503| } # 504| } // namespace detail Error: CPPCHECK_WARNING (CWE-562): [#def2] fmt-11.0.2-build/fmt-11.0.2/include/fmt/base.h:1159: error[returnReference]: Reference to local variable returned. # 1157| # 1158| friend auto get_container(basic_appender app) -> detail::buffer<T>& { # 1159|-> return *app.buffer_; # 1160| } # 1161| Error: CPPCHECK_WARNING (CWE-398): [#def3] fmt-11.0.2-build/fmt-11.0.2/include/fmt/base.h:2247: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions. # 2245| FMT_CONSTEXPR auto parse_nonnegative_int(const Char*& begin, const Char* end, # 2246| int error_value) noexcept -> int { # 2247|-> FMT_ASSERT(begin != end && '0' <= *begin && *begin <= '9', ""); # 2248| unsigned value = 0, prev = 0; # 2249| auto p = begin; Error: CPPCHECK_WARNING (CWE-398): [#def4] fmt-11.0.2-build/fmt-11.0.2/include/fmt/format-inl.h:56: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions. # 54| ++error_code_size; # 55| } # 56|-> error_code_size += detail::to_unsigned(detail::count_digits(abs_value)); # 57| auto it = appender(out); # 58| if (message.size() <= inline_buffer_size - error_code_size) Error: CPPCHECK_WARNING (CWE-398): [#def5] fmt-11.0.2-build/fmt-11.0.2/include/fmt/format-inl.h:200: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions. # 198| // Various fast log computations. # 199| inline auto floor_log10_pow2_minus_log10_4_over_3(int e) noexcept -> int { # 200|-> FMT_ASSERT(e <= 2936 && e >= -2985, "too large exponent"); # 201| return (e * 631305 - 261663) >> 21; # 202| } Error: CPPCHECK_WARNING (CWE-398): [#def6] fmt-11.0.2-build/fmt-11.0.2/include/fmt/format-inl.h:226: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions. # 224| // The idea for item 2 originates from Schubfach. # 225| constexpr auto info = div_small_pow10_infos[N - 1]; # 226|-> FMT_ASSERT(n <= info.divisor * 10, "n is too large"); # 227| constexpr uint32_t magic_number = # 228| (1u << info.shift_amount) / info.divisor + 1; Error: CPPCHECK_WARNING (CWE-398): [#def7] fmt-11.0.2-build/fmt-11.0.2/include/fmt/format-inl.h:240: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions. # 238| template <int N> auto small_division_by_pow10(uint32_t n) noexcept -> uint32_t { # 239| constexpr auto info = div_small_pow10_infos[N - 1]; # 240|-> FMT_ASSERT(n <= info.divisor * 10, "n is too large"); # 241| constexpr uint32_t magic_number = # 242| (1u << info.shift_amount) / info.divisor + 1; Error: CPPCHECK_WARNING (CWE-398): [#def8] fmt-11.0.2-build/fmt-11.0.2/include/fmt/format-inl.h:265: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions. # 263| # 264| static auto get_cached_power(int k) noexcept -> uint64_t { # 265|-> FMT_ASSERT(k >= float_info<float>::min_k && k <= float_info<float>::max_k, # 266| "k is out of range"); # 267| static constexpr const uint64_t pow10_significands[] = { Error: CPPCHECK_WARNING (CWE-398): [#def9] fmt-11.0.2-build/fmt-11.0.2/include/fmt/format-inl.h:323: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions. # 321| int beta) noexcept # 322| -> compute_mul_parity_result { # 323|-> FMT_ASSERT(beta >= 1, ""); # 324| FMT_ASSERT(beta < 64, ""); # 325| Error: CPPCHECK_WARNING (CWE-398): [#def10] fmt-11.0.2-build/fmt-11.0.2/include/fmt/format-inl.h:359: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions. # 357| # 358| static auto get_cached_power(int k) noexcept -> uint128_fallback { # 359|-> FMT_ASSERT(k >= float_info<double>::min_k && k <= float_info<double>::max_k, # 360| "k is out of range"); # 361| Error: CPPCHECK_WARNING (CWE-398): [#def11] fmt-11.0.2-build/fmt-11.0.2/include/fmt/format-inl.h:1098: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions. # 1096| int beta) noexcept # 1097| -> compute_mul_parity_result { # 1098|-> FMT_ASSERT(beta >= 1, ""); # 1099| FMT_ASSERT(beta < 64, ""); # 1100| Error: CPPCHECK_WARNING (CWE-398): [#def12] fmt-11.0.2-build/fmt-11.0.2/include/fmt/format-inl.h:1129: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions. # 1127| # 1128| FMT_FUNC auto get_cached_power(int k) noexcept -> uint128_fallback { # 1129|-> return cache_accessor<double>::get_cached_power(k); # 1130| } # 1131| Error: CPPCHECK_WARNING (CWE-398): [#def13] fmt-11.0.2-build/fmt-11.0.2/include/fmt/format-inl.h:1143: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions. # 1141| // Remove trailing zeros from n and return the number of zeros removed (float) # 1142| FMT_INLINE int remove_trailing_zeros(uint32_t& n, int s = 0) noexcept { # 1143|-> FMT_ASSERT(n != 0, ""); # 1144| // Modular inverse of 5 (mod 2^32): (mod_inv_5 * 5) mod 2^32 = 1. # 1145| constexpr uint32_t mod_inv_5 = 0xcccccccd; Error: CPPCHECK_WARNING (CWE-398): [#def14] fmt-11.0.2-build/fmt-11.0.2/include/fmt/format-inl.h:1164: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions. # 1162| // Removes trailing zeros and returns the number of zeros removed (double) # 1163| FMT_INLINE int remove_trailing_zeros(uint64_t& n) noexcept { # 1164|-> FMT_ASSERT(n != 0, ""); # 1165| # 1166| // This magic number is ceil(2^90 / 10^8). Error: CPPCHECK_WARNING (CWE-398): [#def15] fmt-11.0.2-build/fmt-11.0.2/include/fmt/format-inl.h:1205: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions. # 1203| decimal_fp<T> ret_value; # 1204| // Compute k and beta # 1205|-> const int minus_k = floor_log10_pow2_minus_log10_4_over_3(exponent); # 1206| const int beta = exponent + floor_log2_pow10(-minus_k); # 1207| Error: CPPCHECK_WARNING (CWE-398): [#def16] fmt-11.0.2-build/fmt-11.0.2/include/fmt/format-inl.h:1282: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions. # 1280| # 1281| // Compute k and beta. # 1282|-> const int minus_k = floor_log10_pow2(exponent) - float_info<T>::kappa; # 1283| const cache_entry_type cache = cache_accessor<T>::get_cached_power(-minus_k); # 1284| const int beta = exponent + floor_log2_pow10(-minus_k); Error: CPPCHECK_WARNING (CWE-398): [#def17] fmt-11.0.2-build/fmt-11.0.2/include/fmt/format.h:913: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions. # 911| /// Moves the content of the other `basic_memory_buffer` object to this one. # 912| auto operator=(basic_memory_buffer&& other) noexcept -> basic_memory_buffer& { # 913|-> FMT_ASSERT(this != &other, ""); # 914| deallocate(); # 915| move(other); Error: CPPCHECK_WARNING (CWE-398): [#def18] fmt-11.0.2-build/fmt-11.0.2/include/fmt/format.h:1469: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions. # 1467| // https://fmt.dev/papers/Dragonbox.pdf#page=28, section 6.1. # 1468| inline auto floor_log10_pow2(int e) noexcept -> int { # 1469|-> FMT_ASSERT(e <= 2620 && e >= -2620, "too large exponent"); # 1470| static_assert((-1 >> 1) == -1, "right shift is not arithmetic"); # 1471| return (e * 315653) >> 20; Error: CPPCHECK_WARNING (CWE-398): [#def19] fmt-11.0.2-build/fmt-11.0.2/include/fmt/format.h:1475: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions. # 1473| # 1474| inline auto floor_log2_pow10(int e) noexcept -> int { # 1475|-> FMT_ASSERT(e <= 1233 && e >= -1233, "too large exponent"); # 1476| return (e * 1741647) >> 19; # 1477| } Error: COMPILER_WARNING (CWE-691): [#def20] fmt-11.0.2-build/fmt-11.0.2/test/format-impl-test.cc: scope_hint: In member function ‘virtual void format_impl_test_write_double_double_Test::TestBody()’ fmt-11.0.2-build/fmt-11.0.2/test/format-impl-test.cc:337:6: warning[-Wdangling-else]: suggest explicit braces to avoid ambiguous ‘else’ # 337 | if (!FMT_MSC_VERSION) EXPECT_EQ(s, "42"); # | ^ # 335| fmt::detail::write<char>(std::back_inserter(s), double_double(42), {}); # 336| // Specializing is_floating_point is broken in MSVC. # 337|-> if (!FMT_MSC_VERSION) EXPECT_EQ(s, "42"); # 338| } # 339| Error: COMPILER_WARNING (CWE-691): [#def21] fmt-11.0.2-build/fmt-11.0.2/test/format-impl-test.cc: scope_hint: In member function ‘virtual void format_impl_test_write_dragon_even_Test::TestBody()’ fmt-11.0.2-build/fmt-11.0.2/test/format-impl-test.cc:344:6: warning[-Wdangling-else]: suggest explicit braces to avoid ambiguous ‘else’ # 344 | if (!FMT_MSC_VERSION) EXPECT_EQ(s, "33554450"); # | ^ # 342| fmt::detail::write<char>(std::back_inserter(s), slow_float(33554450.0f), {}); # 343| // Specializing is_floating_point is broken in MSVC. # 344|-> if (!FMT_MSC_VERSION) EXPECT_EQ(s, "33554450"); # 345| } # 346| Error: COMPILER_WARNING (CWE-691): [#def22] fmt-11.0.2-build/fmt-11.0.2/test/gtest-extra-test.cc: scope_hint: In member function ‘virtual void gtest_extra_test_expect_throw_behaves_like_single_statement_Test::TestBody()’ fmt-11.0.2-build/fmt-11.0.2/test/gtest-extra-test.cc:227:6: warning[-Wdangling-else]: suggest explicit braces to avoid ambiguous ‘else’ # 227 | if (::testing::internal::AlwaysFalse()) # | ^ # 225| # 226| TEST(gtest_extra_test, expect_throw_behaves_like_single_statement) { # 227|-> if (::testing::internal::AlwaysFalse()) # 228| EXPECT_THROW_MSG(do_nothing(), std::exception, ""); # 229| Error: COMPILER_WARNING (CWE-691): [#def23] fmt-11.0.2-build/fmt-11.0.2/test/gtest-extra-test.cc: scope_hint: In member function ‘virtual void gtest_extra_test_expect_system_error_behaves_like_single_statement_Test::TestBody()’ fmt-11.0.2-build/fmt-11.0.2/test/gtest-extra-test.cc:237:6: warning[-Wdangling-else]: suggest explicit braces to avoid ambiguous ‘else’ # 237 | if (::testing::internal::AlwaysFalse()) # | ^ # 235| # 236| TEST(gtest_extra_test, expect_system_error_behaves_like_single_statement) { # 237|-> if (::testing::internal::AlwaysFalse()) # 238| EXPECT_SYSTEM_ERROR(do_nothing(), EDOM, ""); # 239| Error: COMPILER_WARNING (CWE-691): [#def24] fmt-11.0.2-build/fmt-11.0.2/test/gtest-extra-test.cc: scope_hint: In member function ‘virtual void gtest_extra_test_expect_write_behaves_like_single_statement_Test::TestBody()’ fmt-11.0.2-build/fmt-11.0.2/test/gtest-extra-test.cc:247:6: warning[-Wdangling-else]: suggest explicit braces to avoid ambiguous ‘else’ # 247 | if (::testing::internal::AlwaysFalse()) # | ^ # 245| # 246| TEST(gtest_extra_test, expect_write_behaves_like_single_statement) { # 247|-> if (::testing::internal::AlwaysFalse()) # 248| EXPECT_WRITE(stdout, std::printf("x"), "x"); # 249| Error: CPPCHECK_WARNING (CWE-562): [#def25] fmt-11.0.2-build/fmt-11.0.2/test/gtest/gmock/gmock.h:9180: error[returnTempReference]: Reference to temporary returned. # 9178| } # 9179| TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2) { # 9180|-> return InSequence(s1).InSequence(s2); # 9181| } # 9182| TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2, Error: CPPCHECK_WARNING (CWE-562): [#def26] fmt-11.0.2-build/fmt-11.0.2/test/gtest/gmock/gmock.h:9184: error[returnTempReference]: Reference to temporary returned. # 9182| TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2, # 9183| const Sequence& s3) { # 9184|-> return InSequence(s1, s2).InSequence(s3); # 9185| } # 9186| TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2, Error: CPPCHECK_WARNING (CWE-562): [#def27] fmt-11.0.2-build/fmt-11.0.2/test/gtest/gmock/gmock.h:9188: error[returnTempReference]: Reference to temporary returned. # 9186| TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2, # 9187| const Sequence& s3, const Sequence& s4) { # 9188|-> return InSequence(s1, s2, s3).InSequence(s4); # 9189| } # 9190| TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2, Error: CPPCHECK_WARNING (CWE-562): [#def28] fmt-11.0.2-build/fmt-11.0.2/test/gtest/gmock/gmock.h:9193: error[returnTempReference]: Reference to temporary returned. # 9191| const Sequence& s3, const Sequence& s4, # 9192| const Sequence& s5) { # 9193|-> return InSequence(s1, s2, s3, s4).InSequence(s5); # 9194| } # 9195| Error: CPPCHECK_WARNING (CWE-476): [#def29] fmt-11.0.2-build/fmt-11.0.2/test/gtest/gmock/gmock.h:11323: error[ctunullpointer]: Null pointer dereference: gmock_os #11321| // Defines a matcher that matches an empty container. The container must #11322| // support both size() and empty(), which all STL-like containers provide. #11323|-> MATCHER(IsEmpty, negation ? "isn't empty" : "is empty") { #11324| if (arg.empty()) { #11325| return true; Error: CPPCHECK_WARNING (CWE-476): [#def30] fmt-11.0.2-build/fmt-11.0.2/test/gtest/gmock/gmock.h:11335: error[ctunullpointer]: Null pointer dereference: gmock_os #11333| // bool" operators and so can't be compared for equality with true #11334| // and false. #11335|-> MATCHER(IsTrue, negation ? "is false" : "is true") { #11336| return static_cast<bool>(arg); #11337| } Error: CPPCHECK_WARNING (CWE-476): [#def31] fmt-11.0.2-build/fmt-11.0.2/test/gtest/gmock/gmock.h:11343: error[ctunullpointer]: Null pointer dereference: gmock_os #11341| // bool" operators and so can't be compared for equality with true #11342| // and false. #11343|-> MATCHER(IsFalse, negation ? "is true" : "is false") { #11344| return !static_cast<bool>(arg); #11345| } Error: COMPILER_WARNING (CWE-457): [#def32] fmt-11.0.2-build/fmt-11.0.2/test/gtest/gmock/gmock.h:11480:61: warning[-Wmaybe-uninitialized]: ‘<anonymous>’ may be used uninitialized #11480 | StrictMockImpl() { ::testing::Mock::FailUninterestingCalls(this); } # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ fmt-11.0.2-build/fmt-11.0.2/test/gtest/gmock/gmock.h: scope_hint: In member function ‘arg_test_custom_arg_Test::TestBody()’ fmt-11.0.2-build/fmt-11.0.2/test/gtest/gmock/gmock.h:8659:15: note: by argument 1 of type ‘const void *’ to ‘testing::Mock::FailUninterestingCalls(void const*)’ declared here # 8659 | static void FailUninterestingCalls(const void* mock_obj) # | ^~~~~~~~~~~~~~~~~~~~~~ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc:467:43: note: ‘<anonymous>’ declared here # 467 | auto&& v = testing::StrictMock<visitor>(); # | ^ #11478| class StrictMockImpl { #11479| public: #11480|-> StrictMockImpl() { ::testing::Mock::FailUninterestingCalls(this); } #11481| #11482| ~StrictMockImpl() { ::testing::Mock::UnregisterCallReaction(this); } Error: COMPILER_WARNING (CWE-457): [#def33] fmt-11.0.2-build/fmt-11.0.2/test/gtest/gmock/gmock.h:11480:61: warning[-Wmaybe-uninitialized]: ‘alloc’ may be used uninitialized #11480 | StrictMockImpl() { ::testing::Mock::FailUninterestingCalls(this); } # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ fmt-11.0.2-build/fmt-11.0.2/test/gtest/gmock/gmock.h: scope_hint: In member function ‘util_test_allocator_ref_Test::TestBody()’ fmt-11.0.2-build/fmt-11.0.2/test/gtest/gmock/gmock.h:8659:15: note: by argument 1 of type ‘const void *’ to ‘testing::Mock::FailUninterestingCalls(void const*)’ declared here # 8659 | static void FailUninterestingCalls(const void* mock_obj) # | ^~~~~~~~~~~~~~~~~~~~~~ fmt-11.0.2-build/fmt-11.0.2/test/format-test.cc:237:35: note: ‘alloc’ declared here # 237 | StrictMock<mock_allocator<int>> alloc; # | ^~~~~ #11478| class StrictMockImpl { #11479| public: #11480|-> StrictMockImpl() { ::testing::Mock::FailUninterestingCalls(this); } #11481| #11482| ~StrictMockImpl() { ::testing::Mock::UnregisterCallReaction(this); } Error: COMPILER_WARNING (CWE-457): [#def34] fmt-11.0.2-build/fmt-11.0.2/test/gtest/gmock/gmock.h:11480:61: warning[-Wmaybe-uninitialized]: ‘visitor’ may be used uninitialized #11480 | StrictMockImpl() { ::testing::Mock::FailUninterestingCalls(this); } # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ fmt-11.0.2-build/fmt-11.0.2/test/gtest/gmock/gmock.h: scope_hint: In member function ‘arg_test_volatile_pointer_arg_Test::TestBody()’ fmt-11.0.2-build/fmt-11.0.2/test/gtest/gmock/gmock.h:8659:15: note: by argument 1 of type ‘const void *’ to ‘testing::Mock::FailUninterestingCalls(void const*)’ declared here # 8659 | static void FailUninterestingCalls(const void* mock_obj) # | ^~~~~~~~~~~~~~~~~~~~~~ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc:379:59: note: ‘visitor’ declared here # 379 | testing::StrictMock<mock_visitor<decltype(expected)>> visitor; \ # | ^~~~~~~ #11478| class StrictMockImpl { #11479| public: #11480|-> StrictMockImpl() { ::testing::Mock::FailUninterestingCalls(this); } #11481| #11482| ~StrictMockImpl() { ::testing::Mock::UnregisterCallReaction(this); } Error: COMPILER_WARNING (CWE-457): [#def35] fmt-11.0.2-build/fmt-11.0.2/test/gtest/gtest/gtest.h:6408:33: warning[-Wuninitialized]: ‘MEM[(const struct MatcherBase &)&D.218751].buffer_’ is used uninitialized # 6408 | : vtable_(other.vtable_), buffer_(other.buffer_) { # | ^~~~~~~~~~~~~~~~~~~~~~ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc: scope_hint: In member function ‘arg_test_custom_arg_Test::TestBody()’ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc:468:23: note: ‘<anonymous>’ declared here # 468 | EXPECT_CALL(v, visit(_)).WillOnce(Invoke(check_custom())); # | ^ # 6406| # 6407| MatcherBase(const MatcherBase& other) # 6408|-> : vtable_(other.vtable_), buffer_(other.buffer_) { # 6409| if (IsShared()) buffer_.shared->Ref(); # 6410| } Error: COMPILER_WARNING (CWE-457): [#def36] fmt-11.0.2-build/fmt-11.0.2/test/gtest/gtest/gtest.h:6408:33: warning[-Wuninitialized]: ‘MEM[(const struct MatcherBase &)&D.222218].buffer_’ is used uninitialized # 6408 | : vtable_(other.vtable_), buffer_(other.buffer_) { # | ^~~~~~~~~~~~~~~~~~~~~~ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc: scope_hint: In member function ‘arg_test_visit_invalid_arg_Test::TestBody()’ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc:474:29: note: ‘<anonymous>’ declared here # 474 | EXPECT_CALL(visitor, visit(_)); # | ^ # 6406| # 6407| MatcherBase(const MatcherBase& other) # 6408|-> : vtable_(other.vtable_), buffer_(other.buffer_) { # 6409| if (IsShared()) buffer_.shared->Ref(); # 6410| } Error: COMPILER_WARNING (CWE-457): [#def37] fmt-11.0.2-build/fmt-11.0.2/test/gtest/gtest/gtest.h:6408:33: warning[-Wuninitialized]: ‘MEM[(const struct MatcherBase &)&D.242970].buffer_’ is used uninitialized # 6408 | : vtable_(other.vtable_), buffer_(other.buffer_) { # | ^~~~~~~~~~~~~~~~~~~~~~ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc: scope_hint: In member function ‘mock_buffer<int>::mock_buffer(int*, unsigned long)’ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc:154:27: note: ‘<anonymous>’ declared here # 154 | ON_CALL(*this, do_grow(_)).WillByDefault(Invoke([](size_t capacity) { # | ^ # 6406| # 6407| MatcherBase(const MatcherBase& other) # 6408|-> : vtable_(other.vtable_), buffer_(other.buffer_) { # 6409| if (IsShared()) buffer_.shared->Ref(); # 6410| } Error: COMPILER_WARNING (CWE-457): [#def38] fmt-11.0.2-build/fmt-11.0.2/test/gtest/gtest/gtest.h:6408:33: warning[-Wuninitialized]: ‘MEM[(const struct MatcherBase &)&D.243363].buffer_’ is used uninitialized # 6408 | : vtable_(other.vtable_), buffer_(other.buffer_) { # | ^~~~~~~~~~~~~~~~~~~~~~ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc: scope_hint: In member function ‘mock_buffer<char>::mock_buffer(char*, unsigned long)’ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc:154:27: note: ‘<anonymous>’ declared here # 154 | ON_CALL(*this, do_grow(_)).WillByDefault(Invoke([](size_t capacity) { # | ^ # 6406| # 6407| MatcherBase(const MatcherBase& other) # 6408|-> : vtable_(other.vtable_), buffer_(other.buffer_) { # 6409| if (IsShared()) buffer_.shared->Ref(); # 6410| } Error: COMPILER_WARNING (CWE-457): [#def39] fmt-11.0.2-build/fmt-11.0.2/test/gtest/gtest/gtest.h:6408:33: warning[-Wuninitialized]: ‘MEM[(const struct MatcherBase &)&D.270612].buffer_’ is used uninitialized # 6408 | : vtable_(other.vtable_), buffer_(other.buffer_) { # | ^~~~~~~~~~~~~~~~~~~~~~ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc: scope_hint: In member function ‘mock_visitor<char>::mock_visitor()’ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc:341:25: note: ‘<anonymous>’ declared here # 341 | ON_CALL(*this, visit(_)).WillByDefault(Return(test_result())); # | ^ # 6406| # 6407| MatcherBase(const MatcherBase& other) # 6408|-> : vtable_(other.vtable_), buffer_(other.buffer_) { # 6409| if (IsShared()) buffer_.shared->Ref(); # 6410| } Error: COMPILER_WARNING (CWE-457): [#def40] fmt-11.0.2-build/fmt-11.0.2/test/gtest/gtest/gtest.h:6408:33: warning[-Wuninitialized]: ‘MEM[(const struct MatcherBase &)&D.272334].buffer_’ is used uninitialized # 6408 | : vtable_(other.vtable_), buffer_(other.buffer_) { # | ^~~~~~~~~~~~~~~~~~~~~~ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc: scope_hint: In member function ‘mock_visitor<char const*>::mock_visitor()’ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc:341:25: note: ‘<anonymous>’ declared here # 341 | ON_CALL(*this, visit(_)).WillByDefault(Return(test_result())); # | ^ # 6406| # 6407| MatcherBase(const MatcherBase& other) # 6408|-> : vtable_(other.vtable_), buffer_(other.buffer_) { # 6409| if (IsShared()) buffer_.shared->Ref(); # 6410| } Error: COMPILER_WARNING (CWE-457): [#def41] fmt-11.0.2-build/fmt-11.0.2/test/gtest/gtest/gtest.h:6408:33: warning[-Wuninitialized]: ‘MEM[(const struct MatcherBase &)&D.273480].buffer_’ is used uninitialized # 6408 | : vtable_(other.vtable_), buffer_(other.buffer_) { # | ^~~~~~~~~~~~~~~~~~~~~~ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc: scope_hint: In member function ‘mock_visitor<fmt::v11::basic_string_view<char> >::mock_visitor()’ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc:341:25: note: ‘<anonymous>’ declared here # 341 | ON_CALL(*this, visit(_)).WillByDefault(Return(test_result())); # | ^ # 6406| # 6407| MatcherBase(const MatcherBase& other) # 6408|-> : vtable_(other.vtable_), buffer_(other.buffer_) { # 6409| if (IsShared()) buffer_.shared->Ref(); # 6410| } Error: COMPILER_WARNING (CWE-457): [#def42] fmt-11.0.2-build/fmt-11.0.2/test/gtest/gtest/gtest.h:6408:33: warning[-Wuninitialized]: ‘MEM[(const struct MatcherBase &)&D.274627].buffer_’ is used uninitialized # 6408 | : vtable_(other.vtable_), buffer_(other.buffer_) { # | ^~~~~~~~~~~~~~~~~~~~~~ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc: scope_hint: In member function ‘mock_visitor<void const*>::mock_visitor()’ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc:341:25: note: ‘<anonymous>’ declared here # 341 | ON_CALL(*this, visit(_)).WillByDefault(Return(test_result())); # | ^ # 6406| # 6407| MatcherBase(const MatcherBase& other) # 6408|-> : vtable_(other.vtable_), buffer_(other.buffer_) { # 6409| if (IsShared()) buffer_.shared->Ref(); # 6410| } Error: COMPILER_WARNING (CWE-457): [#def43] fmt-11.0.2-build/fmt-11.0.2/test/gtest/gtest/gtest.h:6408:33: warning[-Wuninitialized]: ‘MEM[(const struct MatcherBase &)&D.275193].buffer_’ is used uninitialized # 6408 | : vtable_(other.vtable_), buffer_(other.buffer_) { # | ^~~~~~~~~~~~~~~~~~~~~~ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc: scope_hint: In member function ‘mock_visitor<fmt::v11::basic_format_arg<fmt::v11::context>::handle>::mock_visitor()’ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc:341:25: note: ‘<anonymous>’ declared here # 341 | ON_CALL(*this, visit(_)).WillByDefault(Return(test_result())); # | ^ # 6406| # 6407| MatcherBase(const MatcherBase& other) # 6408|-> : vtable_(other.vtable_), buffer_(other.buffer_) { # 6409| if (IsShared()) buffer_.shared->Ref(); # 6410| } Error: COMPILER_WARNING (CWE-457): [#def44] fmt-11.0.2-build/fmt-11.0.2/test/gtest/gtest/gtest.h:6408:33: warning[-Wuninitialized]: ‘MEM[(const struct MatcherBase &)&D.276207].buffer_’ is used uninitialized # 6408 | : vtable_(other.vtable_), buffer_(other.buffer_) { # | ^~~~~~~~~~~~~~~~~~~~~~ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc:22: included_from: Included from here. fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc: scope_hint: In member function ‘mock_visitor<fmt::v11::monostate>::mock_visitor()’ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc:341:25: note: ‘<anonymous>’ declared here # 341 | ON_CALL(*this, visit(_)).WillByDefault(Return(test_result())); # | ^ # 6406| # 6407| MatcherBase(const MatcherBase& other) # 6408|-> : vtable_(other.vtable_), buffer_(other.buffer_) { # 6409| if (IsShared()) buffer_.shared->Ref(); # 6410| } Error: COMPILER_WARNING (CWE-457): [#def45] fmt-11.0.2-build/fmt-11.0.2/test/gtest/gtest/gtest.h:6408:33: warning[-Wuninitialized]: ‘MEM[(const struct MatcherBase &)&D.436684].buffer_’ is used uninitialized # 6408 | : vtable_(other.vtable_), buffer_(other.buffer_) { # | ^~~~~~~~~~~~~~~~~~~~~~ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc: scope_hint: In member function ‘mock_visitor<float>::mock_visitor()’ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc:341:25: note: ‘<anonymous>’ declared here # 341 | ON_CALL(*this, visit(_)).WillByDefault(Return(test_result())); # | ^ # 6406| # 6407| MatcherBase(const MatcherBase& other) # 6408|-> : vtable_(other.vtable_), buffer_(other.buffer_) { # 6409| if (IsShared()) buffer_.shared->Ref(); # 6410| } Error: COMPILER_WARNING (CWE-457): [#def46] fmt-11.0.2-build/fmt-11.0.2/test/gtest/gtest/gtest.h:6408:33: warning[-Wuninitialized]: ‘MEM[(const struct MatcherBase &)&D.437830].buffer_’ is used uninitialized # 6408 | : vtable_(other.vtable_), buffer_(other.buffer_) { # | ^~~~~~~~~~~~~~~~~~~~~~ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc: scope_hint: In member function ‘mock_visitor<long long>::mock_visitor()’ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc:341:25: note: ‘<anonymous>’ declared here # 341 | ON_CALL(*this, visit(_)).WillByDefault(Return(test_result())); # | ^ # 6406| # 6407| MatcherBase(const MatcherBase& other) # 6408|-> : vtable_(other.vtable_), buffer_(other.buffer_) { # 6409| if (IsShared()) buffer_.shared->Ref(); # 6410| } Error: COMPILER_WARNING (CWE-457): [#def47] fmt-11.0.2-build/fmt-11.0.2/test/gtest/gtest/gtest.h:6408:33: warning[-Wuninitialized]: ‘MEM[(const struct MatcherBase &)&D.438976].buffer_’ is used uninitialized # 6408 | : vtable_(other.vtable_), buffer_(other.buffer_) { # | ^~~~~~~~~~~~~~~~~~~~~~ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc: scope_hint: In member function ‘mock_visitor<bool>::mock_visitor()’ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc:341:25: note: ‘<anonymous>’ declared here # 341 | ON_CALL(*this, visit(_)).WillByDefault(Return(test_result())); # | ^ # 6406| # 6407| MatcherBase(const MatcherBase& other) # 6408|-> : vtable_(other.vtable_), buffer_(other.buffer_) { # 6409| if (IsShared()) buffer_.shared->Ref(); # 6410| } Error: COMPILER_WARNING (CWE-457): [#def48] fmt-11.0.2-build/fmt-11.0.2/test/gtest/gtest/gtest.h:6408:33: warning[-Wuninitialized]: ‘MEM[(const struct MatcherBase &)&D.440122].buffer_’ is used uninitialized # 6408 | : vtable_(other.vtable_), buffer_(other.buffer_) { # | ^~~~~~~~~~~~~~~~~~~~~~ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc: scope_hint: In member function ‘mock_visitor<unsigned long long>::mock_visitor()’ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc:341:25: note: ‘<anonymous>’ declared here # 341 | ON_CALL(*this, visit(_)).WillByDefault(Return(test_result())); # | ^ # 6406| # 6407| MatcherBase(const MatcherBase& other) # 6408|-> : vtable_(other.vtable_), buffer_(other.buffer_) { # 6409| if (IsShared()) buffer_.shared->Ref(); # 6410| } Error: COMPILER_WARNING (CWE-457): [#def49] fmt-11.0.2-build/fmt-11.0.2/test/gtest/gtest/gtest.h:6408:33: warning[-Wuninitialized]: ‘MEM[(const struct MatcherBase &)&D.442414].buffer_’ is used uninitialized # 6408 | : vtable_(other.vtable_), buffer_(other.buffer_) { # | ^~~~~~~~~~~~~~~~~~~~~~ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc: scope_hint: In member function ‘mock_visitor<double>::mock_visitor()’ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc:341:25: note: ‘<anonymous>’ declared here # 341 | ON_CALL(*this, visit(_)).WillByDefault(Return(test_result())); # | ^ # 6406| # 6407| MatcherBase(const MatcherBase& other) # 6408|-> : vtable_(other.vtable_), buffer_(other.buffer_) { # 6409| if (IsShared()) buffer_.shared->Ref(); # 6410| } Error: COMPILER_WARNING (CWE-457): [#def50] fmt-11.0.2-build/fmt-11.0.2/test/gtest/gtest/gtest.h:6408:33: warning[-Wuninitialized]: ‘MEM[(const struct MatcherBase &)&D.443560].buffer_’ is used uninitialized # 6408 | : vtable_(other.vtable_), buffer_(other.buffer_) { # | ^~~~~~~~~~~~~~~~~~~~~~ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc: scope_hint: In member function ‘mock_visitor<long double>::mock_visitor()’ fmt-11.0.2-build/fmt-11.0.2/test/base-test.cc:341:25: note: ‘<anonymous>’ declared here # 341 | ON_CALL(*this, visit(_)).WillByDefault(Return(test_result())); # | ^ # 6406| # 6407| MatcherBase(const MatcherBase& other) # 6408|-> : vtable_(other.vtable_), buffer_(other.buffer_) { # 6409| if (IsShared()) buffer_.shared->Ref(); # 6410| } Error: CPPCHECK_WARNING (CWE-562): [#def51] fmt-11.0.2-build/fmt-11.0.2/test/gtest/gtest/gtest.h:6840: error[returnReference]: Reference to local variable returned. # 6838| template <typename T> # 6839| static const T& Unwrap(std::reference_wrapper<T> v) { # 6840|-> return v; # 6841| } # 6842| Error: CPPCHECK_WARNING (CWE-664): [#def52] fmt-11.0.2-build/fmt-11.0.2/test/gtest/gtest/gtest.h:8106: error[mismatchingContainers]: Iterators of different containers 'impl_' and 'other.impl_' are used together. # 8104| } # 8105| bool operator==(const ParamIterator& other) const { # 8106|-> return impl_.get() == other.impl_.get() || impl_->Equals(*other.impl_); # 8107| } # 8108| bool operator!=(const ParamIterator& other) const { Error: CPPCHECK_WARNING (CWE-562): [#def53] fmt-11.0.2-build/fmt-11.0.2/test/scan.h:91: error[returnReference]: Reference to local variable returned. # 89| } # 90| # 91|-> friend scan_buffer& get_buffer(iterator it) { return *it.buf_; } # 92| # 93| public:
analyzer-version-clippy | 1.82.0 |
analyzer-version-cppcheck | 2.16.0 |
analyzer-version-gcc | 14.2.1 |
analyzer-version-gcc-analyzer | 15.0.0 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-150.us-west-2.compute.internal |
mock-config | fedora-rawhide-gcc-latest-x86_64 |
project-name | fmt-11.0.2-2.fc42 |
store-results-to | /tmp/tmpp7j9_jkh/fmt-11.0.2-2.fc42.tar.xz |
time-created | 2024-11-12 23:50:41 |
time-finished | 2024-11-12 23:54:09 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpp7j9_jkh/fmt-11.0.2-2.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpp7j9_jkh/fmt-11.0.2-2.fc42.src.rpm' |
tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |