From 85348a76644e57109912ded8727db65b44efe445 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Mon, 18 Jan 2021 17:35:05 -0800 Subject: [PATCH] boot2: update for new sf semantics --- libstratosphere/source/ams/ams_environment.cpp | 1 - libstratosphere/source/ams/ams_environment_weak.cpp | 9 +++++++++ .../source/i2c/driver/impl/i2c_i2c_session_impl.cpp | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/libstratosphere/source/ams/ams_environment.cpp b/libstratosphere/source/ams/ams_environment.cpp index 0c92a643..674dcf0d 100644 --- a/libstratosphere/source/ams/ams_environment.cpp +++ b/libstratosphere/source/ams/ams_environment.cpp @@ -176,7 +176,6 @@ extern "C" { /* Redefine C++ exception handlers. Requires wrap linker flag. */ #define WRAP_ABORT_FUNC(func) void NORETURN __wrap_##func(void) { abort(); __builtin_unreachable(); } - WRAP_ABORT_FUNC(__cxa_pure_virtual) WRAP_ABORT_FUNC(__cxa_throw) WRAP_ABORT_FUNC(__cxa_rethrow) WRAP_ABORT_FUNC(__cxa_allocate_exception) diff --git a/libstratosphere/source/ams/ams_environment_weak.cpp b/libstratosphere/source/ams/ams_environment_weak.cpp index b3965e7d..a4c36a6a 100644 --- a/libstratosphere/source/ams/ams_environment_weak.cpp +++ b/libstratosphere/source/ams/ams_environment_weak.cpp @@ -26,3 +26,12 @@ namespace ams { } } + +extern "C" { + + /* Redefine C++ exception handlers. Requires wrap linker flag. */ + #define WRAP_ABORT_FUNC(func) void NORETURN __wrap_##func(void) { abort(); __builtin_unreachable(); } + WRAP_ABORT_FUNC(__cxa_pure_virtual) + #undef WRAP_ABORT_FUNC + +} diff --git a/libstratosphere/source/i2c/driver/impl/i2c_i2c_session_impl.cpp b/libstratosphere/source/i2c/driver/impl/i2c_i2c_session_impl.cpp index 413cc4ad..63b95488 100644 --- a/libstratosphere/source/i2c/driver/impl/i2c_i2c_session_impl.cpp +++ b/libstratosphere/source/i2c/driver/impl/i2c_i2c_session_impl.cpp @@ -127,7 +127,7 @@ namespace ams::i2c::driver::impl { auto &device = GetDevice().SafeCastTo(); /* Repeatedly try to execute the transaction. */ - int retry_count; + int retry_count = 0; while (true) { /* Execute the transaction. */ Result result;