1
1
mirror of https://github.com/rui314/mold.git synced 2024-09-19 17:07:29 +03:00

Fix -Wunused-variable

Fixes https://github.com/rui314/mold/issues/1086
This commit is contained in:
Rui Ueyama 2023-08-14 11:39:42 +09:00
parent 53759731cf
commit c1406860fa
2 changed files with 1 additions and 1 deletions

View File

@ -66,6 +66,7 @@ if(NOT "${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "MSVC")
-fno-asynchronous-unwind-tables
-Wno-sign-compare
-Wno-unused-function
-Wunused-variable
-ggnu-pubnames)
endif()

View File

@ -152,7 +152,6 @@ static inline std::string_view read_string(std::string_view &str) {
template <typename E>
static void read_riscv_attributes(Context<E> &ctx, ObjectFile<E> &file,
std::string_view data) {
const char *begin = data.data();
if (data.empty())
Fatal(ctx) << file << ": corrupted .riscv.attributes section";