mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-21 16:58:58 +00:00
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.
This commit is contained in:
parent
a139ad1c44
commit
9272df7a86
Notes:
github-actions[bot]
2025-09-12 13:34:20 +00:00
Author: https://github.com/nico
Commit: 9272df7a86
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6171
Reviewed-by: https://github.com/AtkinsSJ ✅
3 changed files with 6 additions and 9 deletions
|
@ -292,9 +292,10 @@ ErrorOr<bool> 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.
|
||||
|
|
|
@ -685,7 +685,6 @@ ErrorOr<Result<Timestamp>> Implementation::impl$clock_time_get(Configuration&, C
|
|||
case ClockID::ProcessCPUTimeID:
|
||||
case ClockID::ThreadCPUTimeID:
|
||||
return Errno::NoSys;
|
||||
break;
|
||||
}
|
||||
|
||||
struct timespec ts;
|
||||
|
|
|
@ -84,13 +84,11 @@ ErrorOr<Gfx::FloatMatrix4x4> Transformation::to_matrix(Optional<Painting::Painta
|
|||
0, 1, 0, 0,
|
||||
0, 0, 1, 0,
|
||||
0, 0, -1 / (distance <= 0 ? 1 : distance), 1);
|
||||
} else {
|
||||
}
|
||||
return Gfx::FloatMatrix4x4(1, 0, 0, 0,
|
||||
0, 1, 0, 0,
|
||||
0, 0, 1, 0,
|
||||
0, 0, 0, 1);
|
||||
}
|
||||
break;
|
||||
case CSS::TransformFunction::Matrix:
|
||||
if (count == 6)
|
||||
return Gfx::FloatMatrix4x4(TRY(value(0)), TRY(value(2)), 0, TRY(value(4)),
|
||||
|
@ -122,7 +120,6 @@ ErrorOr<Gfx::FloatMatrix4x4> Transformation::to_matrix(Optional<Painting::Painta
|
|||
0, 1, 0, TRY(value(1, height)),
|
||||
0, 0, 1, TRY(value(2)),
|
||||
0, 0, 0, 1);
|
||||
break;
|
||||
case CSS::TransformFunction::TranslateX:
|
||||
if (count == 1)
|
||||
return Gfx::FloatMatrix4x4(1, 0, 0, TRY(value(0, width)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue