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

Re: [XEN PATCH 07/11] xen: address MISRA C:2012 Rule 2.1


  • To: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 3 Aug 2023 11:16:16 +0200
  • 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=1kj9ri09BREZFT2T6zcvI87nG5Txd5cPnlOAP7pxLDM=; b=MEAL98fu3CWBgqE6GwwPwJu8XVp0+S4WFhBZKOM7w/UAL2WD4KK5Qxf4CFN0QjhajiMNtxWQ+qb5dQT5i5ujql3VZ1Z11ZU8EGpJrJDMj5M0kGtF1tQt5ELLF+g1BHXaD8Hx+LmY1mVSdgCchc9GFkOuh1u+i0FPysbvFsBQr5kM93aqjPxh0zB6UI5iH2dY2SPEiVg65F0YXHXRmbOGxRbAo2JzPKY2yAjU45yOR/kzMgz4HZi54kbJlJb+xT+t4eFjwVokaG49at8huSPH8bjWLN4+iDL5JeCSxkh0MgPwV2AT7v2dFa8rXWFQO1rvbxczbs8w/YT8h5rAZ+fxIQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UUPvXqQLlcpGrmHBxoCMFObe8JK91q1IJ+W7bA1UaTYm+nlGy9jRJs/4pyn40fv+txk0qMAXilGYmhkjjcHshbqV8gP3JyVNKUVx6MIH2STQulL8gB3iRB2UetWgtnfSviiBdbaug/x1U4pUAYW8gzdeP9cRLWWM82wKwtOxAbKrI6abS4XCzh0U3v0jlK5Yd3XEgWa4Te/Ax7Ngq8bspIwRvH1iK7bpiWL8XS4JETAfRtIjKjK3+7CXv3orcjMFL8LNuujaT4Kj0ZFLog1F7uHh8lJ6qRMBterEsGx51tFYzkuh8NVbpgZFQkdksQ/Hs04L5kmAwWwIEBnA6tdYKg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: sstabellini@xxxxxxxxxx, michal.orzel@xxxxxxx, xenia.ragiadakou@xxxxxxx, ayan.kumar.halder@xxxxxxx, consulting@xxxxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 03 Aug 2023 09:16:35 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 02.08.2023 16:38, Nicola Vetrini wrote:
> Rule 2.1 states: "A project shall not contain unreachable code".
> 
> The functions
> - machine_halt
> - maybe_reboot
> - machine_restart
> are not supposed to return, hence the following break statement
> is marked as intentionally unreachable with the ASSERT_UNREACHABLE()
> macro to justify the violation of the rule.

During the discussion it was mentioned that this won't help with
release builds, where right now ASSERT_UNREACHABLE() expands to
effectively nothing. You want to clarify here how release builds
are to be taken care of, as those are what eventual certification
will be run against.

Jan



 


Rackspace

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