Skip to content

Commit 714e04c

Browse files
committed
revise A0-1-2 to also match VoidType
1 parent c59d66e commit 714e04c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ where
7373
or
7474
exists(CStyleCast cast |
7575
not cast.isCompilerGenerated() and
76-
cast.getExpr() = fc
76+
cast.getExpr() = fc and
77+
cast.getActualType() instanceof VoidType
7778
)
7879
) and
7980
not returnValueIsAssignedToStdIgnore(fc)

0 commit comments

Comments
 (0)