Skip to content

Commit d97f03c

Browse files
committed
C++: Exclude error types from NonPortablePrintf.
1 parent ac1e069 commit d97f03c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cpp/ql/src/Likely Bugs/Memory Management/Padding/NonPortablePrintf.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ where
8888
not arg.isAffectedByMacro() and
8989
size32 = ilp32.paddedSize(actual) and
9090
size64 = lp64.paddedSize(actual) and
91-
size64 != size32
91+
size64 != size32 and
92+
not actual instanceof ErroneousType
9293
select arg,
9394
"This argument should be of type '" + expected.getName() + "' but is of type '" + actual.getName()
9495
+ "' (which changes size from " + size32 + " to " + size64 + " on 64-bit systems)."

0 commit comments

Comments
 (0)