diff --git a/CMakeLists.txt b/CMakeLists.txt index b3beaa17..14dbb4e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ option(DYNARMIC_USE_SYSTEM_BOOST "Use the system boost libraries" ON) # Compiler flags if (NOT MSVC) - add_compile_options(--std=c++14 -Wall -Werror -Wextra -pedantic -Wfatal-errors -Wno-unused-parameter) + add_compile_options(--std=c++14 -Wall -Werror -Wextra -pedantic -Wfatal-errors -Wno-unused-parameter -Wno-missing-braces) if (ARCHITECTURE_x86_64) add_compile_options(-msse4.1) endif() diff --git a/src/backend_x64/interface_x64.cpp b/src/backend_x64/interface_x64.cpp index 3e053357..307fb4a5 100644 --- a/src/backend_x64/interface_x64.cpp +++ b/src/backend_x64/interface_x64.cpp @@ -57,7 +57,7 @@ private: } }; -Jit::Jit(UserCallbacks callbacks) : callbacks(callbacks), impl(std::make_unique(this, callbacks)) {} +Jit::Jit(UserCallbacks callbacks) : impl(std::make_unique(this, callbacks)) {} Jit::~Jit() {} diff --git a/src/backend_x64/routines.cpp b/src/backend_x64/routines.cpp index c8abc75d..55c82b63 100644 --- a/src/backend_x64/routines.cpp +++ b/src/backend_x64/routines.cpp @@ -35,7 +35,7 @@ CodePtr Routines::RunCodeReturnAddress() const { } void Routines::GenRunCode() { - run_code = reinterpret_cast(this->GetCodePtr()); + run_code = reinterpret_cast(const_cast(this->GetCodePtr())); // This serves two purposes: // 1. It saves all the registers we as a callee need to save. diff --git a/src/common/logging/log.h b/src/common/logging/log.h index f9426054..bf24d4f6 100644 --- a/src/common/logging/log.h +++ b/src/common/logging/log.h @@ -46,7 +46,7 @@ void LogMessage(Class log_class, Level log_level, _Printf_format_string_ #endif const char* format, ...) -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__clang__) __attribute__((format(gnu_printf, 6, 7))) #endif ; diff --git a/src/common/string_util.h b/src/common/string_util.h index 8e21ef8e..b7595d75 100644 --- a/src/common/string_util.h +++ b/src/common/string_util.h @@ -16,7 +16,7 @@ std::string StringFromFormat( _Printf_format_string_ #endif const char* format, ...) -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__clang__) __attribute__((format(gnu_printf, 1, 2))) #endif ; diff --git a/src/interface/interface.h b/src/interface/interface.h index 7319c334..74733b16 100644 --- a/src/interface/interface.h +++ b/src/interface/interface.h @@ -78,7 +78,6 @@ public: private: bool halt_requested = false; bool is_executing = false; - Dynarmic::UserCallbacks callbacks; struct Impl; std::unique_ptr impl;