[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).
This commit is contained in:
Adonis Ling
2023-10-15 07:57:36 -05:00
committed by GitHub
parent 7ea456ef91
commit 08f305dd79
8 changed files with 11 additions and 7 deletions

View File

@ -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 }}"

View File

@ -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)

View File

@ -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++) {

View File

@ -1335,6 +1335,7 @@ public:
return is_v1 ? BitmapTypeCode::type::BITMAP64 : BitmapTypeCode::type::BITMAP64_V2;
}
}
__builtin_unreachable();
}
template <typename T>

View File

@ -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;

View File

@ -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) {}

View File

@ -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.

View File

@ -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;