RULE-10-4
: False negatives as rule does not currently consider ternaries
#821
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.
false-negative
An issue representing a false negative report.
Impact-Low
Standard-MISRA-C
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 operandsb
andc
. However,OperationWithUsualArithmeticConversions
fromMisraExpressions.qll
holds forthis instanceof BinaryOperation and ... or this instanceof AssignArithmeticOperation
, it should also hold forthis instanceof ConditionalExpr
andgetLeftOperand()
/getRightOperand()
should return operands 2 & 3.Example
The text was updated successfully, but these errors were encountered: