codeql-coding-standards
codeql-coding-standards copied to clipboard
`RULE-8-4`: Improve detection of compatible types
Affected rules
-
DCL40-C -
RULE-8-3 -
RULE-8-4
Description
There are some cases of compatible types which are not currently detected by these queries:
- Enumerations - these are compatible with a specified integer type.
- Array types - are compatible if the element types are compatible (and the sizes match, where appropriate)
- Pointer types - are compatible in the pointer target types are compatible.
- Function types - if the return/argument types are compatible (with some exceptions for functions that don't declare arguments).
Example