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

S3584,S2095: improve location of an issue

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.0
    • Component/s: None
    • Labels:
      None

      Description

      As a consequence of CPP-1787 now issue is reported twice in a such case:

      void fun(int i) {
        char* name = (char *) ::malloc (1);
        switch (i) {
          case 1:  // Noncompliant
          case 2:
            return; // Noncompliant
        }
        ::free(name);
      }
      

      Was initially reported in https://groups.google.com/a/sonarsource.com/d/msg/dogfood-rules/htjG1KdrKpU/oQxxHUa-DQAJ

        Attachments

          Activity

            People

            Assignee:
            loic.joly Loïc Joly
            Reporter:
            evgeny.mandrikov Evgeny Mandrikov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: