This is an automated email from the ASF dual-hosted git repository. kxiao pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/doris.git
commit 6be4994e80e6647187c0dd03d9c4c8adfde31c08 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 | 4 ++-- be/src/vec/runtime/shared_hash_table_controller.h | 2 +- 8 files changed, 12 insertions(+), 8 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 d78d7bbc97b..030118b3268 100644 --- a/be/CMakeLists.txt +++ b/be/CMakeLists.txt @@ -259,7 +259,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 e88be6b3ed8..2457c026224 100644 --- a/be/src/olap/memtable.cpp +++ b/be/src/olap/memtable.cpp @@ -374,7 +374,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 d41912b20e8..2e71eee9c02 100644 --- a/be/src/vec/functions/uuid_numeric.cpp +++ b/be/src/vec/functions/uuid_numeric.cpp @@ -137,8 +137,8 @@ private: /// It is guaranteed (by PaddedPODArray) that we can overwrite up to 15 bytes after end. } - UInt64 randomSeed() { - struct timespec times; + UInt64 randomSeed() const { + 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 0f2517c46ca..33521898543 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 { @@ -38,7 +39,6 @@ class BitmapFilterFuncBase; 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]
