Skip to content

Commit

Permalink
Shell: Don't do null check on NonnullRefPtr<T>
Browse files Browse the repository at this point in the history
This will cause a problem when `NonnullRefPtr<T>::operator T*` will be
declared as RETURNS_NONNULL. Clang emits a warning for this pointless
null check, which breaks CI.
  • Loading branch information
BertalanD authored and alimpfard committed Jun 29, 2021
1 parent 754ddda commit 65b2d3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Userland/Shell/AST.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1775,7 +1775,7 @@ RefPtr<Value> IfCond::run(RefPtr<Shell> 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<const JobValue*>(cond.ptr());
auto cond_job = cond_job_value->job();

Expand Down

0 comments on commit 65b2d3a

Please sign in to comment.