Skip to content

Commit

Permalink
[chore](build) Fix compilation errors reported by GCC-13 (apache#25439)
Browse files Browse the repository at this point in the history
1. Fix lots of compilation errors reported by GCC-13.
2. Fix the workflow BE UT (macOS).
  • Loading branch information
adonis0147 authored Oct 15, 2023
1 parent 7ea456e commit 08f305d
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/be-ut-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
'node'
'llvm@16'
)
brew install "${cellars[@]}"
brew install "${cellars[@]}" || true
pushd thirdparty
branch="${{ github.base_ref }}"
Expand Down
3 changes: 2 additions & 1 deletion be/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion be/src/olap/memtable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down
1 change: 1 addition & 0 deletions be/src/util/bitmap_value.h
Original file line number Diff line number Diff line change
Expand Up @@ -1335,6 +1335,7 @@ class BitmapValue {
return is_v1 ? BitmapTypeCode::type::BITMAP64 : BitmapTypeCode::type::BITMAP64_V2;
}
}
__builtin_unreachable();
}

template <typename T>
Expand Down
2 changes: 1 addition & 1 deletion be/src/util/perf_counters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
Expand Down
2 changes: 1 addition & 1 deletion be/src/vec/functions/uuid_numeric.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class UuidNumeric : public IFunction {
}

UInt64 randomSeed() const {
struct timespec times;
struct timespec times {};

/// Not cryptographically secure as time, pid and stack address can be predictable.

Expand Down
2 changes: 1 addition & 1 deletion be/src/vec/runtime/shared_hash_table_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <vector>

#include "common/status.h"
#include "vec/core/block.h"

namespace doris {

Expand All @@ -42,7 +43,6 @@ class SharedHashTableDependency;
namespace vectorized {

class Arena;
class Block;

struct SharedRuntimeFilterContext {
std::shared_ptr<MinMaxFuncBase> minmax_func;
Expand Down

0 comments on commit 08f305d

Please sign in to comment.