Skip to content

Commit

Permalink
Properly avoid clang warning
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Nov 28, 2022
1 parent 5a0e2e2 commit 26f5683
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/core/actions/qgsaction.cpp
Expand Up @@ -40,10 +40,7 @@

bool QgsAction::runable() const
{
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wbugprone-branch-clone"
#endif
#ifndef __clang_analyzer__
switch ( mType )
{
case Qgis::AttributeActionType::Generic:
Expand Down Expand Up @@ -74,8 +71,6 @@ bool QgsAction::runable() const
#endif
}
return false;
#ifdef __clang__
#pragma clang diagnostic pop
#endif
}

Expand Down Expand Up @@ -314,7 +309,9 @@ void QgsAction::run( const QgsExpressionContext &expressionContext ) const
{
// The QgsRunProcess instance created by this static function
// deletes itself when no longer needed.
#ifndef __clang_analyzer__
QgsRunProcess::create( expandedAction, mCaptureOutput );
#endif
}
}

Expand Down

0 comments on commit 26f5683

Please sign in to comment.