gfphoenix78 commented on code in PR #1513: URL: https://github.com/apache/cloudberry/pull/1513#discussion_r2659263107
########## contrib/pax_storage/src/cpp/comm/fast_io.cc: ########## @@ -27,6 +27,13 @@ #include "fast_io.h" +#include <unistd.h> // for pread + +// uring_likely may not be defined in older liburing versions +#ifndef uring_likely +#define uring_likely(x) __builtin_expect(!!(x), 1) Review Comment: `__builtin_expect` is defined in GCC. It should be either guarded by GCC macro or generic implementation. Please refers to https://github.com/apache/cloudberry/blob/main/src/include/c.h#L306 ########## contrib/pax_storage/CMakeLists.txt: ########## @@ -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") Review Comment: `-Werror=pessimizing-move` is turned on in higher gcc. We should remove these `move` code in pax. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
