From nobody Sat May 18 21:45:31 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 1713961453055509.1674867944819; Wed, 24 Apr 2024 05:24:13 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.711390.1111300 (Exim 4.92) (envelope-from ) id 1rzbfE-0002rt-K1; Wed, 24 Apr 2024 12:23:52 +0000 Received: by outflank-mailman (output) from mailman id 711390.1111300; Wed, 24 Apr 2024 12:23:52 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rzbfE-0002rm-HU; Wed, 24 Apr 2024 12:23:52 +0000 Received: by outflank-mailman (input) for mailman id 711390; Wed, 24 Apr 2024 12:23:50 +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 1rzbfC-0002oV-Qw for xen-devel@lists.xenproject.org; Wed, 24 Apr 2024 12:23:50 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 81398c7e-0235-11ef-909a-e314d9c70b13; Wed, 24 Apr 2024 14:23:49 +0200 (CEST) Received: from truciolo.homenet.telecomitalia.it (host-79-60-221-62.business.telecomitalia.it [79.60.221.62]) by support.bugseng.com (Postfix) with ESMTPSA id 84E704EE0739; Wed, 24 Apr 2024 14:23:48 +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: 81398c7e-0235-11ef-909a-e314d9c70b13 From: Federico Serafini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Federico Serafini , Simone Ballarin , Doug Goldstein , Stefano Stabellini , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall Subject: [XEN PATCH] automation/eclair: add deviation of MISRA C:2012 Rule 14.4 Date: Wed, 24 Apr 2024 14:23:41 +0200 Message-Id: <899a456dc9fcd9ceb55efdfb95e71d0abd997700.1713961291.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: 1713961454320100001 Content-Type: text/plain; charset="utf-8" Update ECLAIR configuration to take into account the deviations agreed during MISRA meetings. Amend an existing entry of Rule 14.4 in deviations.rst: it is not a project-wide deviation. Signed-off-by: Federico Serafini --- automation/eclair_analysis/ECLAIR/deviations.ecl | 4 ++++ docs/misra/deviations.rst | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/= eclair_analysis/ECLAIR/deviations.ecl index d21f112a9b..f1a29389fd 100644 --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -349,6 +349,10 @@ therefore have the same behavior of a boolean" -config=3DMC3R1.R14.4,etypes+=3D{deliberate, "stmt(child(cond,child(expr,r= ef(^?::is_dying$))))","src_type(enum)"} -doc_end =20 +-doc_begin=3D"A controlling expression of 'if' and iteration statements ha= ving integer, character or pointer type has a semantics that is well-known = to all Xen developers." +-config=3DMC3R1.R14.4,etypes+=3D{deliberate, "any()", "src_type(integer||c= haracter)||src_expr(type(desugar(pointer(any()))))"} +-doc_end + # # Series 16. # diff --git a/docs/misra/deviations.rst b/docs/misra/deviations.rst index ed0c1e8ed0..a9d9cca04d 100644 --- a/docs/misra/deviations.rst +++ b/docs/misra/deviations.rst @@ -294,7 +294,13 @@ Deviations related to MISRA C:2012 Rules: - The XEN team relies on the fact that the enum is_dying has the constant with assigned value 0 act as false and the other ones as t= rue, therefore have the same behavior of a boolean. - - Project-wide deviation; tagged as `deliberate` for ECLAIR. + - Tagged as `deliberate` for ECLAIR. + + * - R14.4 + - A controlling expression of 'if' and iteration statements having + integer, character or pointer type has a semantics that is well-kno= wn to + all Xen developers. + - Tagged as `deliberate` for ECLAIR. =20 * - R16.2 - Complying with the Rule would entail a lot of code duplication in t= he --=20 2.34.1