From 1dcf5e4f85516d0701f67a0d3694e2b1f0747c66 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Wed, 6 Jan 2021 23:33:09 +0300 Subject: [PATCH] Error on no return type warning Added non-existing noreturn destructor to fmt::throw_exception (for clang). --- Utilities/StrFmt.h | 2 ++ rpcs3/cmake_modules/ConfigureCompiler.cmake | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Utilities/StrFmt.h b/Utilities/StrFmt.h index 551344aac3..f104777903 100644 --- a/Utilities/StrFmt.h +++ b/Utilities/StrFmt.h @@ -296,6 +296,8 @@ namespace fmt static constexpr fmt_type_info type_list[sizeof...(Args) + 1]{fmt_type_info::make>()...}; raw_throw_exception({line, col, file, func}, reinterpret_cast(fmt), type_list, fmt_args_t{fmt_unveil::get(args)...}); } + + [[noreturn]] ~throw_exception(); }; template diff --git a/rpcs3/cmake_modules/ConfigureCompiler.cmake b/rpcs3/cmake_modules/ConfigureCompiler.cmake index c011481e91..9f27e7f1a9 100644 --- a/rpcs3/cmake_modules/ConfigureCompiler.cmake +++ b/rpcs3/cmake_modules/ConfigureCompiler.cmake @@ -30,8 +30,7 @@ else() add_compile_options(-Werror=old-style-cast) add_compile_options(-Werror=sign-compare) add_compile_options(-Werror=reorder) - - add_compile_options(-Wno-return-type) + add_compile_options(-Werror=return-type) #TODO Clean the code so these are removed add_compile_options(-Wno-unused-variable)