kern: build with -Wextra

This commit is contained in:
Michael Scire 2020-08-17 14:20:24 -07:00
parent d3014f6ed9
commit 73798cb812
32 changed files with 100 additions and 30 deletions

View file

@ -353,7 +353,7 @@ namespace ams::svc::codegen::impl {
};
template<auto Allocator, typename FirstOperation, typename...OtherOperations>
static constexpr auto GetModifiedOperations(std::tuple<FirstOperation, OtherOperations...> ops) {
static constexpr auto GetModifiedOperations(std::tuple<FirstOperation, OtherOperations...>) {
constexpr size_t ModifyRegister = [] {
auto allocator = Allocator;
return allocator.AllocateFirstFree();
@ -535,7 +535,11 @@ namespace ams::svc::codegen::impl {
GenerateCodeForMetaCode<CodeGenerator, BeforeMetaCode>();
ON_SCOPE_EXIT { GenerateCodeForMetaCode<CodeGenerator, AfterMetaCode>(); };
/* Cast the generated function to the generic funciton pointer type. */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-function-type"
return reinterpret_cast<ReturnType (*)()>(Function)();
#pragma GCC diagnostic pop
}
#pragma GCC pop_options

View file

@ -139,7 +139,7 @@ namespace ams::svc::codegen::impl {
template<typename Operation>
static constexpr void GenerateCodeForPrepareForKernelProcedureToSvcInvocation(MetaCodeGenerator &mcg) {
static_assert(Operation::Kind == OperationKind::PackAndUnpack);
/* ... */
AMS_UNUSED(mcg);
}
template<typename Operation>