-
Notifications
You must be signed in to change notification settings - Fork 68
Closed
Labels
Difficulty-MediumA false positive or false negative report which is expected to take 1-5 days effort to addressA false positive or false negative report which is expected to take 1-5 days effort to addressImpact-Mediumfalse positive/false negativeAn issue related to observed false positives or false negatives.An issue related to observed false positives or false negatives.
Description
Affected rules
RULE-8-13
Description
In cases where a piece of code is compiled multiple times in different contexts, a variable declaration may be written to in some contexts, but not others. In CodeQL, we store different copies of the Variable for the different contexts (so that they can be distinguished in our analysis). However, flagging one copy of a variable as missing const, when other copies cannot be marked as const, seems unreasonable.
Example
int test(int* x) { // COMPLIANT - written to in at least one context
#ifdef FOO
x = 1;
#endif
return x;
}
Metadata
Metadata
Assignees
Labels
Difficulty-MediumA false positive or false negative report which is expected to take 1-5 days effort to addressA false positive or false negative report which is expected to take 1-5 days effort to addressImpact-Mediumfalse positive/false negativeAn issue related to observed false positives or false negatives.An issue related to observed false positives or false negatives.
Type
Projects
Status
Done