Uploaded image for project: 'SonarCFamily'
  1. SonarCFamily
  2. CPP-614

Rule: Jump statements should not be followed by other statements

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4
    • Component/s: C, C++, Rules
    • Labels:
      None

      Description

      Example:

      int fun() {
        return 1;
        return 2; // never executed
      }
      

      This rule supersedes "cppcheck:unreachableCode".

      Probably relates to RSPEC-901.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                massimo.paladin Massimo PALADIN
                Reporter:
                evgeny.mandrikov Evgeny Mandrikov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: