Message ID | 20221220085100.22848-1-luca.fancellu@arm.com (mailing list archive) |
---|---|
Headers | show |
Series | cppcheck rule 20.7 fixes | expand |
On 20.12.2022 09:50, Luca Fancellu wrote: > In this serie there are some fixes for the rule 20.7, mainly violation found by > cppcheck, most of them are false positive but some of them can be fixed. > > The analysed build is arm64, to reproduce the reports here the command: > > ./xen/scripts/xen-analysis.py --cppcheck-misra --run-cppcheck -- CROSS_COMPILE="aarch64-linux-gnu-" XEN_TARGET_ARCH="arm64" O=/path/to/artifacts_folder > > Luca Fancellu (18): > arm: cppcheck: misra rule 20.7 deviations for alternative.h > arm: cppcheck: misra rule 20.7 deviation on processor.h > arm: cppcheck: misra rule 20.7 deviation on asm_defns.h > arm: cppcheck: misra rule 20.7 deviation on config.h > arm: cppcheck: fix misra rule 20.7 on arm/include/asm/string.h > public: cppcheck: misra rule 20.7 on public/arch-arm.h > xen: cppcheck: misra rule 20.7 deviation on compiler.h > xen: cppcheck: misra rule 20.7 deviation on init.h > xen: cppcheck: misra rule 20.7 deviation on kconfig.h > xen: cppcheck: misra rule 20.7 deviation on types.h > xen: cppcheck: misra rule 20.7 deviation on xmalloc.h > arm: cppcheck: misra rule 20.7 deviation on asm/arm64/sysregs.h > public/x86: cppcheck: misra rule 20.7 deviation on hvm/save.h > public/x86: cppcheck: misra rule 20.7 deviation on xen-x86_32.h > public/x86: cppcheck: misra rule 20.7 deviation on xen-x86_64.h > public/x86: cppcheck: misra rule 20.7 deviation on arch-x86/xen.h > public: misra rule 20.7 deviation on errno.h > public: misra rule 20.7 deviation on memory.h Like Julien I object to the massive addition of false positive markers just because of very basic shortcomings in cppcheck. I find this particularly bad in public headers - imo no such annotations should appear there at all. I would suggest that you split off the actual code changes, which are likely going to be less controversial. Jan
> On 20 Dec 2022, at 09:55, Jan Beulich <jbeulich@suse.com> wrote: > > On 20.12.2022 09:50, Luca Fancellu wrote: >> In this serie there are some fixes for the rule 20.7, mainly violation found by >> cppcheck, most of them are false positive but some of them can be fixed. >> >> The analysed build is arm64, to reproduce the reports here the command: >> >> ./xen/scripts/xen-analysis.py --cppcheck-misra --run-cppcheck -- CROSS_COMPILE="aarch64-linux-gnu-" XEN_TARGET_ARCH="arm64" O=/path/to/artifacts_folder >> >> Luca Fancellu (18): >> arm: cppcheck: misra rule 20.7 deviations for alternative.h >> arm: cppcheck: misra rule 20.7 deviation on processor.h >> arm: cppcheck: misra rule 20.7 deviation on asm_defns.h >> arm: cppcheck: misra rule 20.7 deviation on config.h >> arm: cppcheck: fix misra rule 20.7 on arm/include/asm/string.h >> public: cppcheck: misra rule 20.7 on public/arch-arm.h >> xen: cppcheck: misra rule 20.7 deviation on compiler.h >> xen: cppcheck: misra rule 20.7 deviation on init.h >> xen: cppcheck: misra rule 20.7 deviation on kconfig.h >> xen: cppcheck: misra rule 20.7 deviation on types.h >> xen: cppcheck: misra rule 20.7 deviation on xmalloc.h >> arm: cppcheck: misra rule 20.7 deviation on asm/arm64/sysregs.h >> public/x86: cppcheck: misra rule 20.7 deviation on hvm/save.h >> public/x86: cppcheck: misra rule 20.7 deviation on xen-x86_32.h >> public/x86: cppcheck: misra rule 20.7 deviation on xen-x86_64.h >> public/x86: cppcheck: misra rule 20.7 deviation on arch-x86/xen.h >> public: misra rule 20.7 deviation on errno.h >> public: misra rule 20.7 deviation on memory.h > > Like Julien I object to the massive addition of false positive markers > just because of very basic shortcomings in cppcheck. I find this > particularly bad in public headers - imo no such annotations should > appear there at all. I would suggest that you split off the actual > code changes, which are likely going to be less controversial. Yes I will send the patches with your review and drop the others with False-positive or fixes that are not agreed. > > Jan