change the alert message of unused-local-variable

This commit is contained in:
erik-krogh
2022-08-23 11:15:11 +02:00
parent de8384d904
commit d96d6721ba
2 changed files with 2 additions and 2 deletions

View File

@@ -58,4 +58,4 @@ where
not exists(AsmStmt s | f = s.getEnclosingFunction()) and
not v.getAnAttribute().getName() = "unused" and
not any(ErrorExpr e).getEnclosingFunction() = f // unextracted expr may use `v`
select v, "The value assigned to local variable '" + v.getName() + "' is never used."
select v, "Variable " + v.getName() + " is not used"

View File

@@ -43,4 +43,4 @@ where
unused_local(unused, v) and
// If unused is part of a tuple, count it as unused if all elements of that tuple are unused.
forall(Name el | el = unused.getParentNode().(Tuple).getAnElt() | unused_local(el, _))
select unused, "The value assigned to local variable '" + v.getId() + "' is never used."
select v, "Variable " + v.getId() + " is not used"