Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

RULE-10-4: False negatives as rule does not currently consider ternaries #821

Open
Labels
Difficulty-LowA 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.false-negativeAn issue representing a false negative report.
@MichaelRFairhurst

Description

@MichaelRFairhurst

Affected rules

  • RULE-10-4

Description

The text states that the rule applies tousual arithmetic conversions, and the c spec states that fora ? b : c theusual 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

voidexample_function() {intx;floaty;boolb;b ?x :y;// FALSE NEGATIVE}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty-LowA 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.false-negativeAn issue representing a false negative report.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp