From 65b2d3add37a21dda8472bb6ee0c08f591b7914a Mon Sep 17 00:00:00 2001 From: Daniel Bertalan Date: Mon, 28 Jun 2021 16:29:06 +0200 Subject: [PATCH] Shell: Don't do null check on `NonnullRefPtr` This will cause a problem when `NonnullRefPtr::operator T*` will be declared as RETURNS_NONNULL. Clang emits a warning for this pointless null check, which breaks CI. --- Userland/Shell/AST.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Shell/AST.cpp b/Userland/Shell/AST.cpp index 78a40cc31cee7b..e8fc60246b23cd 100644 --- a/Userland/Shell/AST.cpp +++ b/Userland/Shell/AST.cpp @@ -1775,7 +1775,7 @@ RefPtr IfCond::run(RefPtr shell) { auto cond = m_condition->run(shell)->resolve_without_cast(shell); // The condition could be a builtin, in which case it has already run and exited. - if (cond && cond->is_job()) { + if (cond->is_job()) { auto cond_job_value = static_cast(cond.ptr()); auto cond_job = cond_job_value->job();