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

S851: fix FP in case of cast to void

    XMLWordPrintable

    Details

    • Type: False-Positive
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.0
    • Fix Version/s: 6.29, Level: Easy
    • Component/s: C, Objective-C
    • Labels:
      None

      Description

      Here is a false positive;

      // Some comments here
      int f();
      int g();
      
      void test() {
        // raises a FP
        (void)( f() || g() );
      }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              frederic.tingaud Frédéric Tingaud
              Reporter:
              geoffray.adde Geoffray Adde
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: