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

Re: [XEN PATCH 09/13] xen/common: address violations of MISRA C:2012 Directive 4.10


  • To: Simone Ballarin <simone.ballarin@xxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 31 Aug 2023 15:05: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=6RKLictqT8RQ7ZB7/x7DlpnQjCWm1z44DFO94tl4Jmw=; b=l99BZCeBQM8uZ++e3Sj97SSU9CBHQAJiiqicLRQNZMvNI5DKSSIhg0T/EK4msx9JF8jEWWuMfMvWgz6VBNIsWjnqyRymEhh6TwucHWVhW+baJoSjMoBKxVLMXk/ZaeD985/ePm5oSf8YCRw9+4fkKwz+O23nA8ijKfAUyCA5weaPLKa+3UXqSS4ejbXZLysZz4bhly0mpXCR3re1Z+uYIAvT7YbxYMyxAl5BBoMuw3Vj406Iw8jjnFzuCbp206UKEnV9tyvUCLBVGawvgMKjRxQu4wck7cSSduHbWoixV7iot/oQfu4BjMOBQvAEAwJwQjI7rubj7OIcCVvrWlUQIw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Tt3iZftyXHRdn1/YnV1wRrFZ4CcNVyKpyJGURjftoSkeh+DTT+8QAwwMkhbROSYsTpkXfOWb4oLLsw2zlP3dcbI1R1zTvk9kYRyG+JddypRBmBXqZ8eZu/966xRq3f4s8g7LoB5RVo+DLSWqyjeAFE+9msVgJ6dDaTASSeJerjGh9rXPpgZV5GO7E+O+aHxwVuN+wmH+GQSUvsp0h1pzqYFMcixD898hWojOYhtMi+jQV0vxmFp3Whirwl0LPRu1LYIyG0owicZRkPx1H5gTpE5yPt4mTF1L3A84h0xETUjiMZop1/ZaX/iOkKQCdg4rOm7m6EBDs28AtDESPZrghw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: consulting@xxxxxxxxxxx, sstabellini@xxxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 31 Aug 2023 13:05:58 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 31.08.2023 14:54, Simone Ballarin wrote:
> On 31/08/23 13:10, Jan Beulich wrote:
>> On 31.08.2023 12:08, Simone Ballarin wrote:
>>> The danger of multi-inclusion also exists for .c files, why do you want
>>> to avoid guards for them?
>>
>> Counter question: Why only add guards to some of them? (My personal
>> answer is "Because it's extra clutter.")
> 
> It's not "some of them", it's exactly the ones used in an #include 
> directive, so I'm not getting your objection.

My point is that by adding guards only for files we presently use in some
#include directive, we set us up for introducing new violations as soon
as another .c file becomes the subject of an #include. The more that it
is unusual to add guards in .c files, i.e. it is to be expected that
people wouldn't think about this extra Misra requirement.

Jan




 


Rackspace

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