strat: build sysmodules with -Wextra/-Werror

This commit is contained in:
Michael Scire
2021-10-06 23:22:54 -07:00
parent e8f1efd01b
commit 6a53726833
61 changed files with 433 additions and 217 deletions

View File

@@ -111,6 +111,8 @@ namespace ams {
}
void SetClockRate(const ClkRstDefinition &def, u32 hz) {
AMS_UNUSED(hz);
/* Enable clock. */
reg::ReadWrite(g_clkrst_registers + def.clk_en_ofs, 1u << def.clk_en_index, 1u << def.clk_en_index);
@@ -166,6 +168,7 @@ namespace ams {
}
void SetClockDisabled(ClkRstSession *session) {
AMS_UNUSED(session);
AMS_ABORT("SetClockDisabled not implemented for boot system module");
}

View File

@@ -34,7 +34,8 @@ namespace ams::boot {
bool present;
R_TRY(powctl::IsBatteryPresent(std::addressof(present), this->battery_session));
return present == false;
*out = !present;
return ResultSuccess();
}
Result GetSocRep(float *out) {

View File

@@ -143,25 +143,25 @@ void __appExit(void) {
namespace ams {
void *Malloc(size_t size) {
void *Malloc(size_t) {
AMS_ABORT("ams::Malloc was called");
}
void Free(void *ptr) {
void Free(void *) {
AMS_ABORT("ams::Free was called");
}
}
void *__libnx_alloc(size_t size) {
void *__libnx_alloc(size_t) {
AMS_ABORT("__libnx_alloc was called");
}
void *__libnx_aligned_alloc(size_t alignment, size_t size) {
void *__libnx_aligned_alloc(size_t, size_t) {
AMS_ABORT("__libnx_aligned_alloc was called");
}
void __libnx_free(void *mem) {
void __libnx_free(void *) {
AMS_ABORT("__libnx_free was called");
}
@@ -177,6 +177,10 @@ void operator delete(void *p) {
return Deallocate(p, 0);
}
void operator delete(void *p, size_t size) {
return Deallocate(p, size);
}
void *operator new[](size_t size) {
return Allocate(size);
}
@@ -189,8 +193,14 @@ void operator delete[](void *p) {
return Deallocate(p, 0);
}
void operator delete[](void *p, size_t size) {
return Deallocate(p, size);
}
int main(int argc, char **argv)
{
AMS_UNUSED(argc, argv);
/* Set thread name. */
os::SetThreadNamePointer(os::GetCurrentThread(), AMS_GET_SYSTEM_THREAD_NAME(boot, Main));
AMS_ASSERT(os::GetThreadPriority(os::GetCurrentThread()) == AMS_GET_SYSTEM_THREAD_PRIORITY(boot, Main));