Skip to content

Commit 6702c64

Browse files
committed
Update 11.6 to reflect standard
Rule text specifies that the exclusion is on integer constants with value 0 instead of null pointer constants
1 parent 8936221 commit 6702c64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

c/misra/src/rules/RULE-11-6/CastBetweenPointerToVoidAndArithmeticType.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ where
2222
typeTo = cast.getUnderlyingType() and
2323
[typeFrom, typeTo] instanceof ArithmeticType and
2424
[typeFrom, typeTo] instanceof VoidPointerType and
25-
not isNullPointerConstant(cast.getExpr())
25+
not cast.getExpr() instanceof Zero
2626
select cast, "Cast performed between a pointer to void type and an arithmetic type."

0 commit comments

Comments
 (0)