Message ID | 20230303093856.2169227-4-luca.fancellu@arm.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | xen/misra: create exclusion file list | expand |
On Fri, 3 Mar 2023, Luca Fancellu wrote: > unusedStructMember warnings from cppcheck are not reliable and > are causing a lot of false positives, suppress the checker > globally for now. > > Signed-off-by: Luca Fancellu <luca.fancellu@arm.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> This is great! Results are much cleaner. With this series accepted, I think we can start looking into how to "diff" cppcheck results to spot regressions in new patches. > --- > Changes from v2: > - New patch > --- > xen/scripts/xen_analysis/cppcheck_analysis.py | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/xen/scripts/xen_analysis/cppcheck_analysis.py b/xen/scripts/xen_analysis/cppcheck_analysis.py > index e385e2c8f54a..ab52ce38d502 100644 > --- a/xen/scripts/xen_analysis/cppcheck_analysis.py > +++ b/xen/scripts/xen_analysis/cppcheck_analysis.py > @@ -133,6 +133,8 @@ def generate_cppcheck_deps(): > # - Explicitly suppress warnings on compiler-def.h because cppcheck throws > # an unmatchedSuppression due to the rule we put in suppression-list.txt > # to skip every finding in the file. > + # - Explicitly suppress findings for unusedStructMember that is not very > + # reliable and causes lots of false positives. > # > # Compiler defines are in compiler-def.h which is included in config.h > # > @@ -145,6 +147,7 @@ def generate_cppcheck_deps(): > --inline-suppr > --suppressions-list={}/suppression-list.txt > --suppress='unmatchedSuppression:*' > + --suppress='unusedStructMember:*' > --include={}/include/xen/config.h > -DCPPCHECK > """.format(settings.outdir, CPPCHECK_BUILD_DIR, settings.xen_dir, > -- > 2.34.1 >
> On 3 Mar 2023, at 20:55, Stefano Stabellini <sstabellini@kernel.org> wrote: > > On Fri, 3 Mar 2023, Luca Fancellu wrote: >> unusedStructMember warnings from cppcheck are not reliable and >> are causing a lot of false positives, suppress the checker >> globally for now. >> >> Signed-off-by: Luca Fancellu <luca.fancellu@arm.com> > > Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> > > This is great! Results are much cleaner. With this series accepted, I > think we can start looking into how to "diff" cppcheck results to spot > regressions in new patches. Yes indeed! I have some ideas about the diff, I’ll present something at the FuSa meeting > > >> --- >> Changes from v2: >> - New patch >> --- >> xen/scripts/xen_analysis/cppcheck_analysis.py | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/xen/scripts/xen_analysis/cppcheck_analysis.py b/xen/scripts/xen_analysis/cppcheck_analysis.py >> index e385e2c8f54a..ab52ce38d502 100644 >> --- a/xen/scripts/xen_analysis/cppcheck_analysis.py >> +++ b/xen/scripts/xen_analysis/cppcheck_analysis.py >> @@ -133,6 +133,8 @@ def generate_cppcheck_deps(): >> # - Explicitly suppress warnings on compiler-def.h because cppcheck throws >> # an unmatchedSuppression due to the rule we put in suppression-list.txt >> # to skip every finding in the file. >> + # - Explicitly suppress findings for unusedStructMember that is not very >> + # reliable and causes lots of false positives. >> # >> # Compiler defines are in compiler-def.h which is included in config.h >> # >> @@ -145,6 +147,7 @@ def generate_cppcheck_deps(): >> --inline-suppr >> --suppressions-list={}/suppression-list.txt >> --suppress='unmatchedSuppression:*' >> + --suppress='unusedStructMember:*' >> --include={}/include/xen/config.h >> -DCPPCHECK >> """.format(settings.outdir, CPPCHECK_BUILD_DIR, settings.xen_dir, >> -- >> 2.34.1 >> >
diff --git a/xen/scripts/xen_analysis/cppcheck_analysis.py b/xen/scripts/xen_analysis/cppcheck_analysis.py index e385e2c8f54a..ab52ce38d502 100644 --- a/xen/scripts/xen_analysis/cppcheck_analysis.py +++ b/xen/scripts/xen_analysis/cppcheck_analysis.py @@ -133,6 +133,8 @@ def generate_cppcheck_deps(): # - Explicitly suppress warnings on compiler-def.h because cppcheck throws # an unmatchedSuppression due to the rule we put in suppression-list.txt # to skip every finding in the file. + # - Explicitly suppress findings for unusedStructMember that is not very + # reliable and causes lots of false positives. # # Compiler defines are in compiler-def.h which is included in config.h # @@ -145,6 +147,7 @@ def generate_cppcheck_deps(): --inline-suppr --suppressions-list={}/suppression-list.txt --suppress='unmatchedSuppression:*' + --suppress='unusedStructMember:*' --include={}/include/xen/config.h -DCPPCHECK """.format(settings.outdir, CPPCHECK_BUILD_DIR, settings.xen_dir,
unusedStructMember warnings from cppcheck are not reliable and are causing a lot of false positives, suppress the checker globally for now. Signed-off-by: Luca Fancellu <luca.fancellu@arm.com> --- Changes from v2: - New patch --- xen/scripts/xen_analysis/cppcheck_analysis.py | 3 +++ 1 file changed, 3 insertions(+)