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

S5421: False positive for global function pointers

    XMLWordPrintable

    Details

    • Type: False-Positive
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.4
    • Fix Version/s: 6.24
    • Component/s: C, C++, Rules
    • Labels:
      None

      Description

      The rule reports constant function pointers (presumably because they are not "constant pointers to a constant function").

      int f(int arg);
      const auto g = f; // FP
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              loic.joly Loïc Joly
              Reporter:
              arseniy.zaostrovnykh Arseniy Zaostrovnykh
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: