Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-57459

For type missingOverride, base class is reported instead of derived class

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • cppcheck-plugin
    • None
    • Jenkins 2.164.3
      Cppcheck Plug-in 1.24
      Ubuntu 16.04

      Reporting the base class is misleading because the error occurs in the derived class

      Jenkins reports:

      unchanged /home/users/host/gitlab/project/source/frameworks/broadcast/IMUtils/data/DataClassBase.h 99 style missingOverride false The function 'ChangeInfo' overrides a function in a base class but is not marked with a 'override' specifier.

      cppcheck-htmlreport reports:

      /home/users/host/gitlab/project/source/apps/av/QtCommon/src/system/data/AVStatusIconInfo.h
      26 missingOverride   style The function 'ChangeInfo' overrides a function in a base class but is not marked with a 'override' specifier.

       

      The xml file created by cppcheck shows

      <error id="missingOverride" severity="style" msg="The function 'ChangeInfo' overrides a function in a base class but is not marked with a 'override' specifier." verbose="The function 'ChangeInfo' overrides a function in a base class but is not marked with a 'override' specifier.">
      <location file="/home/users/host/gitlab/project/source/apps/av/QtCommon/src/system/data/AVStatusIconInfo.h" line="26" info="Function in derived class"/>
      <location file="/home/users/host/gitlab/project/source/frameworks/broadcast/IMUtils/data/DataClassBase.h" line="99" info="Virtual function in base class"/>
      </error>

      The behavior of the cppcheck plugin is incorrect, and the behavior of cppcheck-htmlreport is correct.

            marcosteffan Marco Steffan
            goku Jeremy Martinez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: