Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion contrib/pax_storage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ set(CMAKE_CXX_STANDARD 17)
set(TOP_DIR ${PROJECT_SOURCE_DIR}/../..)
set(CBDB_INCLUDE_DIR ${TOP_DIR}/src/include)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror -Werror=pessimizing-move -Wno-unused-function -Wno-error=ignored-qualifiers -Wno-error=array-bounds -Wuninitialized -Winit-self -Wstrict-aliasing -Wno-missing-field-initializers -Wno-unused-parameter -Wno-clobbered -Wno-sized-deallocation -g")
# Base CXX flags
# Note: -Wpessimizing-move is enabled by default in GCC 9+ and will be caught by -Werror
# No need to explicitly add -Werror=pessimizing-move (which breaks GCC 8.x compatibility)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror -Wno-unused-function -Wno-error=ignored-qualifiers -Wno-error=array-bounds -Wuninitialized -Winit-self -Wstrict-aliasing -Wno-missing-field-initializers -Wno-unused-parameter -Wno-clobbered -Wno-sized-deallocation -g")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-Werror=pessimizing-move is turned on in higher gcc. We should remove these move code in pax.

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-unused-parameter -Wno-parameter-name")

option(USE_MANIFEST_API "Use manifest API" OFF)
Expand Down
2 changes: 1 addition & 1 deletion contrib/pax_storage/src/cpp/catalog/pax_aux_table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ pax::MicroPartitionMetadata PaxGetMicroPartitionMetadata(Relation rel,
paxc::FetchMicroPartitionAuxRow(rel, snapshot, block_id,
FetchMicroPartitionAuxRowCallbackWrapper,
&ctx);
return std::move(ctx.info);
return ctx.info;
}
CBDB_WRAP_END;
}
Expand Down
11 changes: 11 additions & 0 deletions contrib/pax_storage/src/cpp/comm/fast_io.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@

#include "fast_io.h"

#include <unistd.h> // for pread

// uring_likely may not be defined in older liburing versions
#ifndef uring_likely
#if __GNUC__ >= 3
#define uring_likely(x) __builtin_expect((x) != 0, 1)
#else
#define uring_likely(x) ((x) != 0)
#endif
#endif

namespace pax
{

Expand Down
Loading