Skip to content

Commit 9a9c531

Browse files
committed
Incorporating suggestions (1): compressing formulas into one
1 parent 1212108 commit 9a9c531

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

cpp/autosar/src/rules/A0-1-2/UnusedReturnValue.ql

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,8 @@ where
4343
// not necessarily able to address those results
4444
not fc.isAffectedByMacro() and
4545
// Rule allows disabling this rule where a static_cast<void> or a C-style cast to void is applied
46-
not (
47-
fc.getExplicitlyConverted().(StaticCast).getActualType() instanceof VoidType
48-
or
49-
exists(CStyleCast cast |
50-
not cast.isCompilerGenerated() and
51-
cast.getExpr() = fc and
52-
cast.getActualType() instanceof VoidType
53-
)
46+
not exists(Cast cast | cast instanceof StaticCast or cast instanceof CStyleCast |
47+
fc.getExplicitlyConverted() = cast and
48+
cast.getActualType() instanceof VoidType
5449
)
5550
select fc, "Return value from call to $@ is unused.", f, f.getName()

0 commit comments

Comments
 (0)