mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 10:38:20 +00:00
avoid evaluating calls to determine whether an expression value is ignored
This commit is contained in:
parent
4d051620e8
commit
72b937bfdf
1 changed files with 1 additions and 1 deletions
|
@ -396,7 +396,7 @@ void do_print_stmt(const std::vector<ValPtr>& vals)
|
|||
|
||||
ExprStmt::ExprStmt(ExprPtr arg_e) : Stmt(STMT_EXPR), e(std::move(arg_e))
|
||||
{
|
||||
if ( e && e->IsPure() && e->GetType()->Tag() != TYPE_ERROR )
|
||||
if ( e && e->Tag() != EXPR_CALL && e->IsPure() && e->GetType()->Tag() != TYPE_ERROR )
|
||||
Warn("expression value ignored");
|
||||
|
||||
SetLocationInfo(e->GetLocationInfo());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue