[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 00/18] cppcheck rule 20.7 fixes


  • To: Luca Fancellu <luca.fancellu@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 20 Dec 2022 10:55:15 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Ei6zyklD4yY9mJ8hfzymc5Ul7oPdTCckog4gmv7mtB8=; b=dNsV8bkBh5CcyZOtjVY7ohvsx6o3j4gk+UMo17aAJPoxaw1GS/kQ+02J19uwflOGWcWUkqw+wbqfr9aR5vS8gGJ/ASrq4Z/+msQqIogRK0PTkpYgtWeEqrb1kTvPUxAYMHmK7j2GBKM8Yi6LdfDc7SrG1+w0MX6Gcst4VPNGOb0gckzBwBeJdKqST4FX7Awfas4DoS3TJnSgxTxuHmuVPEnHnLf1akkOjaBKuWm0UQzy7rNSuYmW19THq4ejH9W97SdM6GDnVbt/UcieRs/sh4KqqoFv+vGXmIk6AYTWGdqQ8iIewPM3P+lqCu8W0n4cGkS8T12KG+TkMciuPWkb0w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DlKuKtD6lLvdm/4NVcOD/1Fw7ByFRs57v6rLpQkoOjx89w/zuSlJ7AeAoghGUq+cZpUZruTRsQHIj7PTh5r9Iwg5HzrPUIAS7MxoZiJn3hvQrkTSXnHbkXmi0p3TiTFXMHSu1Dedq7FRwE/4oquIDbPlUwOsJXAgxyI0uHbtufeI/oaerN1SrtGssH5zdUnXnPQDpulslJUi5NWC1kdG0AWpqRqvhGO4py7BC/QomUGoSEKv3SwDhCP6hSKpdQIbmwf6AUu53k1yCcY6mYcWpXynlbsrISfjWJ2VGN34049mxOO2lOr2F7FuJ3KVR6fCHhEdLyB1mhKJ2OXdGt/Tlw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: wei.chen@xxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 20 Dec 2022 09:55:22 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.