From 22cc95e8bec44a2b43fa8460ebeedfed28b8f73c Mon Sep 17 00:00:00 2001 From: Peter Edwards Date: Sat, 30 Sep 2023 18:19:59 +0100 Subject: [PATCH] Remove warning, and add -Wextra --- CMakeLists.txt | 2 +- reader.cc | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6fb5454..5638370 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,7 +46,7 @@ add_definitions(-DVERSION=${VERSION_TAG}) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_EXTENSIONS ON) -add_definitions("-Wall -Wextra -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE") +add_definitions("-Wall -Wmove -Wextra -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE") # Adding frame pointers makes things easy to run performance measurements with, # and doesn't cost much itself. add_definitions("-fno-omit-frame-pointer") diff --git a/reader.cc b/reader.cc index 8df655f..12b703a 100644 --- a/reader.cc +++ b/reader.cc @@ -321,7 +321,6 @@ MemReader::readULEB128(Off off) const std::pair MemReader::readSLEB128(Off off) const { - auto p = reinterpret_cast(data) + off; return readleb128(ptroff(data, off)); }