From 9272df7a86d8f127c8e929bbfc04ad0b301fd7d8 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Fri, 12 Sep 2025 07:57:50 -0400 Subject: [PATCH] Everywhere: Fix a few unreachable-return / unreachable-break warnings I was playing with clang's -Wunreachable-code-aggressive a bit. This fixes a handful uncontroversial things it flags. No behavior change. --- Libraries/LibCore/Process.cpp | 3 ++- Libraries/LibWasm/WASI/Wasi.cpp | 1 - Libraries/LibWeb/CSS/Transformation.cpp | 11 ++++------- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Libraries/LibCore/Process.cpp b/Libraries/LibCore/Process.cpp index 2e9c5e0081d..64d8758f469 100644 --- a/Libraries/LibCore/Process.cpp +++ b/Libraries/LibCore/Process.cpp @@ -292,9 +292,10 @@ ErrorOr Process::is_being_debugged() # elif defined(AK_OS_FREEBSD) return ((info.ki_flag & P_TRACED) != 0); # endif -#endif +#else // FIXME: Implement this for more platforms. return Error::from_string_literal("Platform does not support checking for debugger"); +#endif } // Forces the process to sleep until a debugger is attached, then breaks. diff --git a/Libraries/LibWasm/WASI/Wasi.cpp b/Libraries/LibWasm/WASI/Wasi.cpp index 800f2e24ad6..56c4310a808 100644 --- a/Libraries/LibWasm/WASI/Wasi.cpp +++ b/Libraries/LibWasm/WASI/Wasi.cpp @@ -685,7 +685,6 @@ ErrorOr> Implementation::impl$clock_time_get(Configuration&, C case ClockID::ProcessCPUTimeID: case ClockID::ThreadCPUTimeID: return Errno::NoSys; - break; } struct timespec ts; diff --git a/Libraries/LibWeb/CSS/Transformation.cpp b/Libraries/LibWeb/CSS/Transformation.cpp index c2077c52044..beb4177b20c 100644 --- a/Libraries/LibWeb/CSS/Transformation.cpp +++ b/Libraries/LibWeb/CSS/Transformation.cpp @@ -84,13 +84,11 @@ ErrorOr Transformation::to_matrix(Optional Transformation::to_matrix(Optional