From nobody Sun May 19 04:05:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 169631969043110.513414889381352; Tue, 3 Oct 2023 00:54:50 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.612134.951971 (Exim 4.92) (envelope-from ) id 1qnaEV-0007ow-33; Tue, 03 Oct 2023 07:54:19 +0000 Received: by outflank-mailman (output) from mailman id 612134.951971; Tue, 03 Oct 2023 07:54:19 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qnaEU-0007op-Ub; Tue, 03 Oct 2023 07:54:18 +0000 Received: by outflank-mailman (input) for mailman id 612134; Tue, 03 Oct 2023 07:54:17 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qnaET-0007oj-Hj for xen-devel@lists.xenproject.org; Tue, 03 Oct 2023 07:54:17 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 0cce8d55-61c2-11ee-98d2-6d05b1d4d9a1; Tue, 03 Oct 2023 09:54:16 +0200 (CEST) Received: from Dell.homenet.telecomitalia.it (host-87-11-204-216.retail.telecomitalia.it [87.11.204.216]) by support.bugseng.com (Postfix) with ESMTPSA id B162F4EE0737; Tue, 3 Oct 2023 09:54:15 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 0cce8d55-61c2-11ee-98d2-6d05b1d4d9a1 From: Federico Serafini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Federico Serafini , Simone Ballarin , Doug Goldstein , Stefano Stabellini , Henry Wang Subject: [XEN PATCH] automation/eclair: add deviations for MISRA C:2012 Rule 10.1 Date: Tue, 3 Oct 2023 09:54:09 +0200 Message-Id: <83f4f9df2459f22690e6df98a43b3602c22bf27b.1696319475.git.federico.serafini@bugseng.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1696319691947100001 Content-Type: text/plain; charset="utf-8" Update the configuration of ECLAIR to deviate some violations of Rule 10.1 in accordance with docs/misra/rules.rst. Signed-off-by: Federico Serafini Acked-by: Stefano Stabellini --- automation/eclair_analysis/ECLAIR/deviations.ecl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/= eclair_analysis/ECLAIR/deviations.ecl index d8170106b4..241aad6393 100644 --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -274,6 +274,18 @@ still non-negative." -config=3DMC3R1.R10.1,etypes+=3D{safe, "stmt(operator(logical)||node(condi= tional_operator||binary_conditional_operator))", "dst_type(ebool||boolean)"} -doc_end =20 +-doc_begin=3D"XEN only supports architectures where signed integers are re= presentend using two's complement and all the XEN developers are aware of t= his." +-config=3DMC3R1.R10.1,etypes+=3D{safe, + "stmt(operator(and||or||xor||not||and_assign||or_assign||xor_assign))", + "any()"} +-doc_end + +-doc_begin=3D"See Section \"4.5 Integers\" of \"GCC_MANUAL\", where it say= s that \"Signed `>>' acts on negative numbers by sign extension. As an exte= nsion to the C language, GCC does not use the latitude given in C99 and C11= only to treat certain aspects of signed `<<' as undefined. However, -fsani= tize=3Dshift (and -fsanitize=3Dundefined) will diagnose such cases. They ar= e also diagnosed where constant expressions are required.\"" +-config=3DMC3R1.R10.1,etypes+=3D{safe, + "stmt(operator(shl||shr||shl_assign||shr_assign))", + "any()"} +-doc_end + ### Set 3 ### =20 # --=20 2.34.1