-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Labels
Difficulty-LowA false positive or false negative report which is expected to take <1 day effort to addressA false positive or false negative report which is expected to take <1 day effort to addressImpact-LowStandard-MISRA-Cfalse positive/false negativeAn issue related to observed false positives or false negatives.An issue related to observed false positives or false negatives.false-negativeAn issue representing a false negative report.An issue representing a false negative report.
Description
Affected rules
RULE-10-4
Description
The text states that the rule applies to usual arithmetic conversions, and the c spec states that for a ? b : c
the usual arithmetic conversions are performed on operands b
and c
. However, OperationWithUsualArithmeticConversions
from MisraExpressions.qll
holds for this instanceof BinaryOperation and ... or this instanceof AssignArithmeticOperation
, it should also hold for this instanceof ConditionalExpr
and getLeftOperand()
/ getRightOperand()
should return operands 2 & 3.
Example
void example_function() {
int x;
float y;
bool b;
b ? x : y; // FALSE NEGATIVE
}
Metadata
Metadata
Assignees
Labels
Difficulty-LowA false positive or false negative report which is expected to take <1 day effort to addressA false positive or false negative report which is expected to take <1 day effort to addressImpact-LowStandard-MISRA-Cfalse positive/false negativeAn issue related to observed false positives or false negatives.An issue related to observed false positives or false negatives.false-negativeAn issue representing a false negative report.An issue representing a false negative report.