The following issues were found

src/third_party/abseil-cpp-master/abseil-cpp/absl/numeric/int128_stream_test.cc
1 issues
syntax error
Error

Line: 99

              constexpr std::ios::fmtflags kBase = std::ios::showbase;
constexpr std::ios::fmtflags kPos = std::ios::showpos;

TEST(Uint128, OStreamValueTest) {
  CheckUint128Case({1, kDec, /*width = */ 0, "1"});
  CheckUint128Case({1, kOct, /*width = */ 0, "1"});
  CheckUint128Case({1, kHex, /*width = */ 0, "1"});
  CheckUint128Case({9, kDec, /*width = */ 0, "9"});
  CheckUint128Case({9, kOct, /*width = */ 0, "11"});

            

Reported by Cppcheck.

src/third_party/abseil-cpp-master/abseil-cpp/absl/random/bernoulli_distribution_test.cc
1 issues
syntax error
Error

Line: 33

              class BernoulliTest : public testing::TestWithParam<std::pair<double, size_t>> {
};

TEST_P(BernoulliTest, Serialize) {
  const double d = GetParam().first;
  absl::bernoulli_distribution before(d);

  {
    absl::bernoulli_distribution via_param{

            

Reported by Cppcheck.

src/third_party/abseil-cpp-master/abseil-cpp/absl/random/bit_gen_ref_test.cc
1 issues
syntax error
Error

Line: 55

                                   std::mt19937_64, std::minstd_rand>;
TYPED_TEST_SUITE(BitGenRefTest, BitGenTypes);

TYPED_TEST(BitGenRefTest, BasicTest) {
  TypeParam gen;
  auto x = FnTest(gen);
  EXPECT_NEAR(x, 4, 3);
}


            

Reported by Cppcheck.

src/third_party/abseil-cpp-master/abseil-cpp/absl/random/discrete_distribution_test.cc
1 issues
syntax error
Error

Line: 47

                                                uint32_t, int64_t, uint64_t>;
TYPED_TEST_SUITE(DiscreteDistributionTypeTest, IntTypes);

TYPED_TEST(DiscreteDistributionTypeTest, ParamSerializeTest) {
  using param_type =
      typename absl::discrete_distribution<TypeParam>::param_type;

  absl::discrete_distribution<TypeParam> empty;
  EXPECT_THAT(empty.probabilities(), testing::ElementsAre(1.0));

            

Reported by Cppcheck.

src/third_party/abseil-cpp-master/abseil-cpp/absl/random/distributions_test.cc
1 issues
syntax error
Error

Line: 137

                    "");
}

TEST_F(RandomDistributionsTest, UniformTypeInference) {
  // Infers common types.
  CheckArgsInferType<uint16_t, uint16_t, uint16_t>();
  CheckArgsInferType<uint32_t, uint32_t, uint32_t>();
  CheckArgsInferType<uint64_t, uint64_t, uint64_t>();
  CheckArgsInferType<int16_t, int16_t, int16_t>();

            

Reported by Cppcheck.

src/third_party/abseil-cpp-master/abseil-cpp/absl/random/generators_test.cc
1 issues
syntax error
Error

Line: 164

                TestLogNormal(&gen);
}

TEST(std_mt19937_64, Compatibility) {
  // Validate with std::mt19937_64
  CompatibilityTest<std::mt19937_64>();
}

TEST(BitGen, Compatibility) {

            

Reported by Cppcheck.

src/third_party/abseil-cpp-master/abseil-cpp/absl/random/internal/chi_square_test.cc
1 issues
syntax error
Error

Line: 113

                EXPECT_NEAR(416.126, ChiSquareValue(300, 0.99999), 0.2);
}

TEST(ChiSquareTest, PValue) {
  struct {
    int line;
    double pval;
    double chi_square;
    int df;

            

Reported by Cppcheck.

src/third_party/abseil-cpp-master/abseil-cpp/absl/random/internal/distribution_test_util.cc
1 issues
StrCat - Does not check for buffer overflows when concatenating to destination [MS-banned]
Security

Line: 93 Column: 33 CWE codes: 120

                  return true;
  }

  std::string formatted = absl::StrCat(
      msg, " actual=", actual, " expected=", expected, " err=", delta / bound);
  ABSL_RAW_LOG(INFO, "%s", formatted.c_str());
  return false;
}


            

Reported by FlawFinder.

src/third_party/abseil-cpp-master/abseil-cpp/absl/random/internal/distribution_test_util_test.cc
1 issues
syntax error
Error

Line: 119

                  {1e5, 1e-5, (1.0 - 1e-6), 1.8229186993306369e-5},
};

TEST(BetaTest, BetaIncomplete) {
  for (const auto& data : kBetaTable) {
    auto value = absl::random_internal::BetaIncomplete(data.x, data.p, data.q);

    // Log using the Wolfram-alpha function name & parameters.
    EXPECT_NEAR(value, data.alpha, 1e-12)

            

Reported by Cppcheck.

src/third_party/abseil-cpp-master/abseil-cpp/absl/random/internal/fast_uniform_bits_test.cc
1 issues
syntax error
Error

Line: 33

              
TYPED_TEST_SUITE(FastUniformBitsTypedTest, IntTypes);

TYPED_TEST(FastUniformBitsTypedTest, BasicTest) {
  using Limits = std::numeric_limits<TypeParam>;
  using FastBits = FastUniformBits<TypeParam>;

  EXPECT_EQ(0, (FastBits::min)());
  EXPECT_EQ((Limits::max)(), (FastBits::max)());

            

Reported by Cppcheck.