diff --git a/cpp/cmake_modules/SetupCxxFlags.cmake b/cpp/cmake_modules/SetupCxxFlags.cmake index a11f37dd4d9..d3a2a1a2d25 100644 --- a/cpp/cmake_modules/SetupCxxFlags.cmake +++ b/cpp/cmake_modules/SetupCxxFlags.cmake @@ -286,6 +286,7 @@ if("${BUILD_WARNING_LEVEL}" STREQUAL "CHECKIN") set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-missing-braces") set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-unused-parameter") set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-constant-logical-operand") + set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-return-stack-address") elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wall") set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-conversion") diff --git a/cpp/src/arrow/flight/flight_benchmark.cc b/cpp/src/arrow/flight/flight_benchmark.cc index fa0cc9a3d53..f53b1c6dcea 100644 --- a/cpp/src/arrow/flight/flight_benchmark.cc +++ b/cpp/src/arrow/flight/flight_benchmark.cc @@ -230,7 +230,7 @@ arrow::Result> GetPutData(const perf::Token& token) { int64_t records_sent = 0; while (records_sent < total_records) { if (records_sent + length > total_records) { - const int last_length = total_records - records_sent; + const int64_t last_length = total_records - records_sent; // Hard-coded batches.push_back(SizedBatch{batch->Slice(0, last_length), /*bytes=*/last_length * bytes_per_record}); diff --git a/cpp/src/parquet/column_io_benchmark.cc b/cpp/src/parquet/column_io_benchmark.cc index e3e98edfd57..6ee579bec9a 100644 --- a/cpp/src/parquet/column_io_benchmark.cc +++ b/cpp/src/parquet/column_io_benchmark.cc @@ -61,7 +61,7 @@ void SetBytesProcessed(::benchmark::State& state, Repetition::type repetition) { if (repetition == Repetition::REPEATED) { bytes_processed += state.iterations() * state.range(0) * sizeof(int16_t); } - state.SetBytesProcessed(state.iterations() * state.range(0) * sizeof(int16_t)); + state.SetBytesProcessed(bytes_processed); } template