activate &is_used

This commit is contained in:
Vern Paxson 2021-02-23 08:32:14 -08:00
parent f82d443225
commit 86709c5992
3 changed files with 1 additions and 3 deletions

View file

@ -174,7 +174,7 @@ bool UseDefs::CheckIfUnused(const Stmt* s, const ID* id, bool report)
{
if ( report && analysis_options.usage_issues > 0 &&
! rc->IsTemporary(id) && ! rc->IsConstantVar(id) &&
! rc->IsNewLocal(id) /* && ! id->GetAttr(ATTR_IS_USED) */ )
! rc->IsNewLocal(id) && ! id->GetAttr(ATTR_IS_USED) )
reporter->Warning("%s assignment unused: %s",
id->Name(), obj_desc(s).c_str());

View file

@ -20,7 +20,6 @@ warning in ./no-warnings.zeek, line 71: deprecated (dont_use_me)
warning in ./no-warnings.zeek, line 76: deprecated (dont_use_me_either)
warning: mr assignment unused: mr = (coerce <internal>::#1 to record { a:count; b:string; }); ./no-warnings.zeek, line 42
warning: mr assignment unused: mr = (coerce <internal>::#0 to record { a:count; b:string; }); ./no-warnings.zeek, line 41
warning: ls assignment unused: ls = test; ./no-warnings.zeek, line 35
warning: l assignment unused: l = testing; ./no-warnings.zeek, line 33
ZERO
ONE

View file

@ -20,7 +20,6 @@ warning in ./warnings.zeek, line 71: deprecated (dont_use_me): global function w
warning in ./warnings.zeek, line 76: deprecated (dont_use_me_either): function warning
warning: mr assignment unused: mr = (coerce <internal>::#1 to record { a:count; b:string; }); ./warnings.zeek, line 42
warning: mr assignment unused: mr = (coerce <internal>::#0 to record { a:count; b:string; }); ./warnings.zeek, line 41
warning: ls assignment unused: ls = test; ./warnings.zeek, line 35
warning: l assignment unused: l = testing; ./warnings.zeek, line 33
ZERO
ONE