From nobody Fri May 10 10:10:45 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 1701714236683559.3439886289384; Mon, 4 Dec 2023 10:23:56 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.647272.1010219 (Exim 4.92) (envelope-from ) id 1rADbE-0003Ti-LU; Mon, 04 Dec 2023 18:23:20 +0000 Received: by outflank-mailman (output) from mailman id 647272.1010219; Mon, 04 Dec 2023 18:23:20 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rADbE-0003Tb-Il; Mon, 04 Dec 2023 18:23:20 +0000 Received: by outflank-mailman (input) for mailman id 647272; Mon, 04 Dec 2023 18:23:19 +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 1rADbD-0003TC-Oq for xen-devel@lists.xenproject.org; Mon, 04 Dec 2023 18:23:19 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 326ebb05-92d2-11ee-98e5-6d05b1d4d9a1; Mon, 04 Dec 2023 19:23:18 +0100 (CET) Received: from nico.bugseng.com (unknown [147.123.100.131]) by support.bugseng.com (Postfix) with ESMTPSA id B836C4EE0C8A; Mon, 4 Dec 2023 19:23:16 +0100 (CET) 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: 326ebb05-92d2-11ee-98e5-6d05b1d4d9a1 From: Nicola Vetrini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Nicola Vetrini , Simone Ballarin , Doug Goldstein , Stefano Stabellini , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Wei Liu Subject: [XEN PATCH] docs/misra: deviate deliberately unused labels Date: Mon, 4 Dec 2023 19:23:11 +0100 Message-Id: <669f63d14926f6335a081711de5a34ef04c61717.1701714146.git.nicola.vetrini@bugseng.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1701714238896100001 Content-Type: text/plain; charset="utf-8" The labels marked with __maybe_unused are either used only in certain build configurations or deliberately unused. See the justification in docs/misra/deviations.rst. No functional changes. Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini --- automation/eclair_analysis/ECLAIR/deviations.ecl | 4 ++++ docs/misra/deviations.rst | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/= eclair_analysis/ECLAIR/deviations.ecl index c9e3a90801aa..f18ed6345e67 100644 --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -37,6 +37,10 @@ removed by the compiler, the resulting slowdown is negli= gible." -config=3DMC3R1.R2.2,reports+=3D{disapplied,"any()"} -doc_end =20 +-doc_begin=3D"Some labels are unused in certain build configurations, or a= re deliberately marked as unused, so that the compiler is entitled to remov= e them." +-config=3DMC3R1.R2.6,reports+=3D{deliberate, "any_area(text(^.*__maybe_unu= sed.*$))"} +-doc_end + # # Series 3. # diff --git a/docs/misra/deviations.rst b/docs/misra/deviations.rst index 160513b997ae..9979ddae7c7d 100644 --- a/docs/misra/deviations.rst +++ b/docs/misra/deviations.rst @@ -73,6 +73,14 @@ Deviations related to MISRA C:2012 Rules: resulting slowdown is negligible. - Project-wide deviation, tagged as `disapplied` for ECLAIR. =20 + * - R2.6 + - Labels deliberately marked as unused trough the pseudo-attribute + `__maybe_unused` are either the result of them not being in certain= build + configurations, or as a deliberate practice (e.g., `unimplemented_i= nsn`). + Given that the compiler is then entitled to remove them, the presen= ce of + such labels poses no risks. + - Tagged as `deliberate` for ECLAIR. + * - R3.1 - Comments starting with '/\*' and containing hyperlinks are safe as = they are not instances of commented-out code. --=20 2.34.1