From ade465fa2408e0287133b9b60e08412b8db18ec5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Edelbo?= Date: Wed, 26 Jun 2024 16:49:44 +0200 Subject: [PATCH] Fix building with gcc and clang --- src/external/bson/bson-decimal128.c | 4 ++-- src/external/bson/bson-iter.c | 2 +- test/benchmark-common-tasks/main.cpp | 16 ++++++++-------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/external/bson/bson-decimal128.c b/src/external/bson/bson-decimal128.c index 827d1165ed7..5642e045ecf 100644 --- a/src/external/bson/bson-decimal128.c +++ b/src/external/bson/bson-decimal128.c @@ -374,7 +374,7 @@ _mul_64x64 (uint64_t left, /* IN */ * Returns: * The lowercased character. */ -char +static char _dec128_tolower (char c) { if (isupper (c)) { @@ -395,7 +395,7 @@ _dec128_tolower (char c) * Returns: * true if the strings are equal, false otherwise. */ -bool +static bool _dec128_istreq (const char *a, /* IN */ const char *b /* IN */) { diff --git a/src/external/bson/bson-iter.c b/src/external/bson/bson-iter.c index a71b2b59ee5..535dedefef2 100644 --- a/src/external/bson/bson-iter.c +++ b/src/external/bson/bson-iter.c @@ -631,7 +631,7 @@ _bson_iter_next_internal (bson_iter_t *iter, /* INOUT */ subtype = *(iter->raw + iter->d2); if (subtype == BSON_SUBTYPE_BINARY_DEPRECATED) { - int32_t binary_len; + uint32_t binary_len; if (l < 4) { iter->err_off = o; diff --git a/test/benchmark-common-tasks/main.cpp b/test/benchmark-common-tasks/main.cpp index 53e82d56276..1218d509e89 100644 --- a/test/benchmark-common-tasks/main.cpp +++ b/test/benchmark-common-tasks/main.cpp @@ -581,7 +581,7 @@ template struct BenchmarkMixedCaseInsensitiveEqual : public BenchmarkWithType { using Base = BenchmarkWithType; using underlying_type = typename Type::underlying_type; - BenchmarkMixedCaseInsensitiveEqual() + BenchmarkMixedCaseInsensitiveEqual() : BenchmarkWithType() { BenchmarkWithType::set_name_with_prefix("QueryInsensitiveEqual"); @@ -610,7 +610,7 @@ template struct BenchmarkRangeForType : public BenchmarkWithType { using Base = BenchmarkWithType; using underlying_type = typename Type::underlying_type; - BenchmarkRangeForType() + BenchmarkRangeForType() : BenchmarkWithType() { BenchmarkWithType::set_name_with_prefix("QueryRange"); @@ -647,7 +647,7 @@ template struct BenchmarkCreateIndexForType : public BenchmarkWithType { using Base = BenchmarkWithType; using underlying_type = typename Type::underlying_type; - BenchmarkCreateIndexForType() + BenchmarkCreateIndexForType() : BenchmarkWithType() { BenchmarkWithType::set_name_with_prefix("CreateIndexFor"); @@ -669,7 +669,7 @@ template struct BenchmarkInsertToIndexForType : public BenchmarkWithType { using Base = BenchmarkWithType; using underlying_type = typename Type::underlying_type; - BenchmarkInsertToIndexForType() + BenchmarkInsertToIndexForType() : BenchmarkWithType() { BenchmarkWithType::set_name_with_prefix("InsertWithIndex"); @@ -706,7 +706,7 @@ template struct BenchmarkInsertPKToIndexForType : public BenchmarkWithType { using Base = BenchmarkWithType; using underlying_type = typename Type::underlying_type; - BenchmarkInsertPKToIndexForType() + BenchmarkInsertPKToIndexForType() : BenchmarkWithType() { BenchmarkWithType::set_name_with_prefix("InsertPK"); @@ -739,7 +739,7 @@ template struct BenchmarkEraseObjectForType : public BenchmarkWithType { using Base = BenchmarkWithType; using underlying_type = typename Type::underlying_type; - BenchmarkEraseObjectForType() + BenchmarkEraseObjectForType() : BenchmarkWithType() { BenchmarkWithType::set_name_with_prefix("EraseObject"); @@ -760,7 +760,7 @@ template struct BenchmarkParsedChainedOrEquality : public BenchmarkWithType { using Base = BenchmarkWithType; using underlying_type = typename Type::underlying_type; - BenchmarkParsedChainedOrEquality() + BenchmarkParsedChainedOrEquality() : BenchmarkWithType() { BenchmarkWithType::set_name_with_prefix(util::format("QueryChainedOrEquality_%1", NUM_CONDITIONS)); @@ -803,7 +803,7 @@ template struct BenchmarkParsedIn : public BenchmarkWithType { using Base = BenchmarkWithType; using underlying_type = typename Type::underlying_type; - BenchmarkParsedIn() + BenchmarkParsedIn() : BenchmarkWithType() { BenchmarkWithType::set_name_with_prefix(util::format("QueryParsedIN_%1", NUM_CONDITIONS));