mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-15 03:08:36 +12:00
Enable -Wunused-parameter
This commit is contained in:
parent
7205a93751
commit
87af905018
102 changed files with 1571 additions and 1463 deletions
|
@ -217,7 +217,7 @@ struct cf_t<void>
|
|||
}
|
||||
|
||||
template<typename T>
|
||||
static constexpr auto extract(const T& data) -> decltype(+T())
|
||||
static constexpr auto extract(const T&) -> decltype(+T())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ struct ff_t : bf_base<T, N>
|
|||
using vtype = typename ff_t::vtype;
|
||||
|
||||
// Return constant value
|
||||
static constexpr vtype extract(const type& data)
|
||||
static constexpr vtype extract(const type&)
|
||||
{
|
||||
static_assert((V & ff_t::vmask) == V, "ff_t<> error: V out of bounds");
|
||||
return V;
|
||||
|
|
|
@ -1328,7 +1328,7 @@ fs::file::file(const void* ptr, usz size)
|
|||
{
|
||||
}
|
||||
|
||||
bool trunc(u64 length) override
|
||||
bool trunc(u64) override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -1349,7 +1349,7 @@ fs::file::file(const void* ptr, usz size)
|
|||
return 0;
|
||||
}
|
||||
|
||||
u64 write(const void* buffer, u64 count) override
|
||||
u64 write(const void*, u64) override
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -1854,7 +1854,7 @@ fs::file fs::make_gather(std::vector<fs::file> files)
|
|||
return result;
|
||||
}
|
||||
|
||||
bool trunc(u64 length) override
|
||||
bool trunc(u64) override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -1897,7 +1897,7 @@ fs::file fs::make_gather(std::vector<fs::file> files)
|
|||
return 0;
|
||||
}
|
||||
|
||||
u64 write(const void* buffer, u64 size) override
|
||||
u64 write(const void*, u64) override
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -143,7 +143,7 @@ asmjit::Error jit_runtime::_add(void** dst, asmjit::CodeHolder* code) noexcept
|
|||
return asmjit::kErrorOk;
|
||||
}
|
||||
|
||||
asmjit::Error jit_runtime::_release(void* ptr) noexcept
|
||||
asmjit::Error jit_runtime::_release(void*) noexcept
|
||||
{
|
||||
return asmjit::kErrorOk;
|
||||
}
|
||||
|
@ -249,7 +249,7 @@ asmjit::Runtime& asmjit::get_global_runtime()
|
|||
return asmjit::kErrorOk;
|
||||
}
|
||||
|
||||
asmjit::Error _release(void* ptr) noexcept override
|
||||
asmjit::Error _release(void*) noexcept override
|
||||
{
|
||||
return asmjit::kErrorOk;
|
||||
}
|
||||
|
@ -281,6 +281,7 @@ asmjit::Runtime& asmjit::get_global_runtime()
|
|||
#pragma GCC diagnostic ignored "-Wall"
|
||||
#pragma GCC diagnostic ignored "-Wextra"
|
||||
#pragma GCC diagnostic ignored "-Wold-style-cast"
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
#endif
|
||||
#include "llvm/Support/TargetSelect.h"
|
||||
#include "llvm/Support/FormattedStream.h"
|
||||
|
@ -294,12 +295,6 @@ asmjit::Runtime& asmjit::get_global_runtime()
|
|||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
#else
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
|
||||
const bool jit_initialize = []() -> bool
|
||||
{
|
||||
llvm::InitializeNativeTarget();
|
||||
|
@ -439,12 +434,12 @@ struct MemoryManager1 : llvm::RTDyldMemoryManager
|
|||
return this->ptr + olda;
|
||||
}
|
||||
|
||||
u8* allocateCodeSection(uptr size, uint align, uint sec_id, llvm::StringRef sec_name) override
|
||||
u8* allocateCodeSection(uptr size, uint align, uint /*sec_id*/, llvm::StringRef /*sec_name*/) override
|
||||
{
|
||||
return allocate(code_ptr, size, align, utils::protection::wx);
|
||||
}
|
||||
|
||||
u8* allocateDataSection(uptr size, uint align, uint sec_id, llvm::StringRef sec_name, bool is_ro) override
|
||||
u8* allocateDataSection(uptr size, uint align, uint /*sec_id*/, llvm::StringRef /*sec_name*/, bool /*is_ro*/) override
|
||||
{
|
||||
return allocate(data_ptr, size, align, utils::protection::rw);
|
||||
}
|
||||
|
@ -454,7 +449,7 @@ struct MemoryManager1 : llvm::RTDyldMemoryManager
|
|||
return false;
|
||||
}
|
||||
|
||||
void registerEHFrames(u8* addr, u64 load_addr, usz size) override
|
||||
void registerEHFrames(u8*, u64, usz) override
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -489,12 +484,12 @@ struct MemoryManager2 : llvm::RTDyldMemoryManager
|
|||
return {addr, llvm::JITSymbolFlags::Exported};
|
||||
}
|
||||
|
||||
u8* allocateCodeSection(uptr size, uint align, uint sec_id, llvm::StringRef sec_name) override
|
||||
u8* allocateCodeSection(uptr size, uint align, uint /*sec_id*/, llvm::StringRef /*sec_name*/) override
|
||||
{
|
||||
return jit_runtime::alloc(size, align, true);
|
||||
}
|
||||
|
||||
u8* allocateDataSection(uptr size, uint align, uint sec_id, llvm::StringRef sec_name, bool is_ro) override
|
||||
u8* allocateDataSection(uptr size, uint align, uint /*sec_id*/, llvm::StringRef /*sec_name*/, bool /*is_ro*/) override
|
||||
{
|
||||
return jit_runtime::alloc(size, align, false);
|
||||
}
|
||||
|
@ -504,7 +499,7 @@ struct MemoryManager2 : llvm::RTDyldMemoryManager
|
|||
return false;
|
||||
}
|
||||
|
||||
void registerEHFrames(u8* addr, u64 load_addr, usz size) override
|
||||
void registerEHFrames(u8*, u64, usz) override
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#pragma GCC diagnostic ignored "-Wall"
|
||||
#pragma GCC diagnostic ignored "-Wextra"
|
||||
#pragma GCC diagnostic ignored "-Wold-style-cast"
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
#include <asmjit/asmjit.h>
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
@ -178,6 +179,7 @@ inline FT build_function_asm(F&& builder)
|
|||
#pragma GCC diagnostic ignored "-Wextra"
|
||||
#pragma GCC diagnostic ignored "-Wold-style-cast"
|
||||
#pragma GCC diagnostic ignored "-Wsuggest-override"
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
|
||||
#endif
|
||||
|
|
|
@ -1752,7 +1752,7 @@ const bool s_exception_handler_set = []() -> bool
|
|||
|
||||
#else
|
||||
|
||||
static void signal_handler(int sig, siginfo_t* info, void* uct) noexcept
|
||||
static void signal_handler(int /*sig*/, siginfo_t* info, void* uct) noexcept
|
||||
{
|
||||
x64_context* context = static_cast<ucontext_t*>(uct);
|
||||
|
||||
|
|
|
@ -308,7 +308,7 @@ public:
|
|||
}
|
||||
|
||||
template <atomic_wait::op Flags = atomic_wait::op::eq>
|
||||
void wait(std::nullptr_t null = nullptr) noexcept
|
||||
void wait(std::nullptr_t /*null*/ = nullptr) noexcept
|
||||
{
|
||||
if (m_head == nullptr)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue