This is an automated email from the ASF dual-hosted git repository.
adonisling pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 08f305dd798 [chore](build) Fix compilation errors reported by GCC-13
(#25439)
08f305dd798 is described below
commit 08f305dd798d5f81aaa23874e937e16eab02ea7f
Author: Adonis Ling <[email protected]>
AuthorDate: Sun Oct 15 07:57:36 2023 -0500
[chore](build) Fix compilation errors reported by GCC-13 (#25439)
1. Fix lots of compilation errors reported by GCC-13.
2. Fix the workflow BE UT (macOS).
---
.github/workflows/be-ut-mac.yml | 4 ++--
be/CMakeLists.txt | 3 ++-
be/src/olap/memtable.cpp | 2 +-
be/src/util/bitmap_value.h | 1 +
be/src/util/perf_counters.cpp | 2 +-
be/src/vec/aggregate_functions/aggregate_function_state_merge.h | 2 ++
be/src/vec/functions/uuid_numeric.cpp | 2 +-
be/src/vec/runtime/shared_hash_table_controller.h | 2 +-
8 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/be-ut-mac.yml b/.github/workflows/be-ut-mac.yml
index 19e99d27b48..0df342bc697 100644
--- a/.github/workflows/be-ut-mac.yml
+++ b/.github/workflows/be-ut-mac.yml
@@ -29,7 +29,7 @@ concurrency:
jobs:
run-ut:
name: BE UT (macOS)
- runs-on: macos-12
+ runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v3
@@ -81,7 +81,7 @@ jobs:
'node'
'llvm@16'
)
- brew install "${cellars[@]}"
+ brew install "${cellars[@]}" || true
pushd thirdparty
branch="${{ github.base_ref }}"
diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt
index 0a4c5d9bee3..798fb18164f 100644
--- a/be/CMakeLists.txt
+++ b/be/CMakeLists.txt
@@ -260,7 +260,8 @@ if (COMPILER_GCC)
add_compile_options(-fdiagnostics-color=always
-Wno-nonnull
-Wno-stringop-overread
- -Wno-stringop-overflow)
+ -Wno-stringop-overflow
+ -Wno-array-bounds)
endif ()
if (COMPILER_CLANG)
diff --git a/be/src/olap/memtable.cpp b/be/src/olap/memtable.cpp
index 28092d31ece..47c16424478 100644
--- a/be/src/olap/memtable.cpp
+++ b/be/src/olap/memtable.cpp
@@ -351,7 +351,7 @@ void MemTable::_aggregate() {
auto& block_data = in_block.get_columns_with_type_and_name();
std::vector<RowInBlock*> temp_row_in_blocks;
temp_row_in_blocks.reserve(_last_sorted_pos);
- RowInBlock* prev_row;
+ RowInBlock* prev_row = nullptr;
int row_pos = -1;
//only init agg if needed
for (int i = 0; i < _row_in_blocks.size(); i++) {
diff --git a/be/src/util/bitmap_value.h b/be/src/util/bitmap_value.h
index f91ac507707..0db3997ce17 100644
--- a/be/src/util/bitmap_value.h
+++ b/be/src/util/bitmap_value.h
@@ -1335,6 +1335,7 @@ public:
return is_v1 ? BitmapTypeCode::type::BITMAP64 :
BitmapTypeCode::type::BITMAP64_V2;
}
}
+ __builtin_unreachable();
}
template <typename T>
diff --git a/be/src/util/perf_counters.cpp b/be/src/util/perf_counters.cpp
index e1b4bb7de9b..74cae81783b 100644
--- a/be/src/util/perf_counters.cpp
+++ b/be/src/util/perf_counters.cpp
@@ -262,7 +262,7 @@ bool PerfCounters::init_proc_self_io_counter(Counter
counter) {
}
bool PerfCounters::init_proc_self_status_counter(Counter counter) {
- CounterData data;
+ CounterData data {};
data.counter = counter;
data.source = PerfCounters::PROC_SELF_STATUS;
data.type = TUnit::BYTES;
diff --git a/be/src/vec/aggregate_functions/aggregate_function_state_merge.h
b/be/src/vec/aggregate_functions/aggregate_function_state_merge.h
index 052f4e6e851..136eca0837a 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_state_merge.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_state_merge.h
@@ -24,6 +24,8 @@ const static std::string AGG_MERGE_SUFFIX = "_merge";
class AggregateStateMerge : public AggregateStateUnion {
public:
+ using AggregateStateUnion::create;
+
AggregateStateMerge(AggregateFunctionPtr function, const DataTypes&
argument_types,
const DataTypePtr& return_type)
: AggregateStateUnion(function, argument_types, return_type) {}
diff --git a/be/src/vec/functions/uuid_numeric.cpp
b/be/src/vec/functions/uuid_numeric.cpp
index c4d8e37712f..012d0d488a1 100644
--- a/be/src/vec/functions/uuid_numeric.cpp
+++ b/be/src/vec/functions/uuid_numeric.cpp
@@ -138,7 +138,7 @@ private:
}
UInt64 randomSeed() const {
- struct timespec times;
+ struct timespec times {};
/// Not cryptographically secure as time, pid and stack address can be
predictable.
diff --git a/be/src/vec/runtime/shared_hash_table_controller.h
b/be/src/vec/runtime/shared_hash_table_controller.h
index 05c0bc609eb..6b31cf07ec9 100644
--- a/be/src/vec/runtime/shared_hash_table_controller.h
+++ b/be/src/vec/runtime/shared_hash_table_controller.h
@@ -26,6 +26,7 @@
#include <vector>
#include "common/status.h"
+#include "vec/core/block.h"
namespace doris {
@@ -42,7 +43,6 @@ class SharedHashTableDependency;
namespace vectorized {
class Arena;
-class Block;
struct SharedRuntimeFilterContext {
std::shared_ptr<MinMaxFuncBase> minmax_func;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]