diff --git a/src/system/kernel/team.cpp b/src/system/kernel/team.cpp index 55c4a3980e..ca8860563a 100644 --- a/src/system/kernel/team.cpp +++ b/src/system/kernel/team.cpp @@ -4363,8 +4363,14 @@ _user_exit_team(status_t returnValue) // Stop the thread, if the team is being debugged and that has been // requested. + // Note: GCC 13 marks the following call as potentially overflowing, since it thinks team may + // be `nullptr`. This cannot be the case in reality, therefore ignore this specific + // error. + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstringop-overflow" if ((atomic_get(&team->debug_info.flags) & B_TEAM_DEBUG_PREVENT_EXIT) != 0) user_debug_stop_thread(); + #pragma GCC diagnostic pop // Send this thread a SIGKILL. This makes sure the thread will not return to // userland. The signal handling code forwards the signal to the main diff --git a/src/system/kernel/thread.cpp b/src/system/kernel/thread.cpp index 3329dcb3f1..be7a60a09c 100644 --- a/src/system/kernel/thread.cpp +++ b/src/system/kernel/thread.cpp @@ -3796,7 +3796,13 @@ _user_block_thread(uint32 flags, bigtime_t timeout) return waitStatus; // nope, so wait + // Note: GCC 13 marks the following call as potentially overflowing, since it thinks `thread` + // may be `nullptr`. This cannot be the case in reality, therefore ignore this specific + // error. + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstringop-overflow" thread_prepare_to_block(thread, flags, THREAD_BLOCK_TYPE_USER, NULL); + #pragma GCC diagnostic pop threadLocker.Unlock();