RULE-11-3
: Permit cast to pointer-to-void
#317
Labels
Difficulty-Low
A false positive or false negative report which is expected to take <1 day effort to address
false positive/false negative
An issue related to observed false positives or false negatives.
Impact-High
user-report
Issue reported by an end user of CodeQL Coding Standards
Affected rules
RULE-11-3
RULE-11-4
RULE-11-5
RULE-11-7
Description
The rule states that "a cast shall not be performed between a pointer to object type and a pointer to a different object type". However, void isn't a different object type. Rule 11.5 handles pointer-to-void, prohibiting casting from pointer-to-void, but permitting casting to pointer-to-void.
Update: this has been determined to be a problem specifically with
const void *
and other specified void pointers.Example
The text was updated successfully, but these errors were encountered: