Skip to content

Commit 3a3a6a5

Browse files
author
Nikita Kraiouchkine
committed
EXP36-C: Output cast instead of sink node
1 parent 2dd045c commit 3a3a6a5

File tree

3 files changed

+54
-55
lines changed

3 files changed

+54
-55
lines changed

c/cert/src/rules/EXP36-C/DoNotCastPointerToMoreStrictlyAlignedPointerType.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ where
181181
alignmentFrom = expr.getAlignment() and
182182
// flag cases where the cast's target type has stricter alignment requirements than the source
183183
alignmentFrom < alignmentTo
184-
select sink, source, sink,
184+
select cast, source, sink,
185185
"Cast from pointer with " + alignmentFrom +
186186
"-byte alignment (defined by $@) to pointer with base type " + toBaseType.getUnderlyingType() +
187187
" with " + alignmentTo + "-byte alignment.", expr.getUnconverted(), expr.getKind()

0 commit comments

Comments
 (0)