Skip to content

Commit

Permalink
Suppress false positive warnings on GCC 12 (tikv#306)
Browse files Browse the repository at this point in the history
Signed-off-by: Yilin Chen <[email protected]>
  • Loading branch information
sticnarf authored Jul 15, 2022
1 parent 2d03d53 commit 9c86bf5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,9 @@ endif()

if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-builtin-memcmp")
# GCC 12 outputs too many false positive array-bounds warnings. Suppress it
# until fixed by the compiler.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-array-bounds")
endif()

option(ROCKSDB_LITE "Build RocksDBLite version" OFF)
Expand Down
2 changes: 1 addition & 1 deletion trace_replay/trace_replay.cc
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ Status TracerHelper::DecodeTraceRecord(Trace* trace, int trace_file_version,
cf_ids.reserve(multiget_size);
multiget_keys.reserve(multiget_size);
for (uint32_t i = 0; i < multiget_size; i++) {
uint32_t tmp_cfid;
uint32_t tmp_cfid = 0;
Slice tmp_key;
GetFixed32(&cfids_payload, &tmp_cfid);
GetLengthPrefixedSlice(&keys_payload, &tmp_key);
Expand Down

0 comments on commit 9c86bf5

Please sign in to comment.