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

Re: [PATCH 0/9] MISRA C 2012 8.1 rule fixes


  • To: Michal Orzel <michal.orzel@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 22 Jun 2022 12:25:10 +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=TPo/RNvkzGPfFu6kMx1RbynPeIl9D+qzg3qIYnt+g4s=; b=JREifI5JcYw+2BM/l+0Jn9eIKh6DWpUP9J1hAYzY0/HXMjLkNHxn4UhklcTOd6E7dJa4ySpgBCD8cocqq+U7awYvJzFwtn4NSf4SBeRJg8855Jh9sfxDSqQhoapVQ23lHBdGmFBqHrbZcFtY1M/Arm1GgMc6ttr1fGc1KOQpudg+O09UfFiFA0S8iBwlCN9LAwB25xr2nEfBGncri1pfUdIlLcTkt6bwMCW3wJzkc1eFH4yCgmhG3cjnry3lTnXs3uPjvlcbq4r/kuzllwNDBidcxEAeVVRjKql5ht+Ww9hjvqxz+BVT/iOd1z3zYLzJoqN35yrHnXXj1jO1qftH0Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aAskq3TSYQOjcGS7YqvDZ0WVf+Sil3IGXpCfwL9j6eZ9dd+x9PjdlfhVQsAy/UmLGcXXwZsU/ENjJpNNwEys1r+q61FV/67bOZ2HLtNUPCNBp4OJjSliJr8F0AEvT9WPbgwEGcwCnkERhksdB9UQmE7NKXXgFhiVUyiUmqlC336KEHLl4tJY+2sWrZz+hcdM/Jks/2neXImTcPSDx9nz3wvBaIiUFGDp7KRzOwG2B9WpxhLCQGFig4epk0aGiBrqK2EGNE1bzikuvrWAxGHsO/hGBrPKSsev1bR2/Ox+FVtE/niQtImwp/goH0poWEiFrh34gF2/k2Lmfq1J0iH5XQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Dario Faggioli <dfaggioli@xxxxxxxx>, Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 22 Jun 2022 10:25:21 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 20.06.2022 09:02, Michal Orzel wrote:
> This series fixes all the findings for MISRA C 2012 8.1 rule, reported by
> cppcheck 2.7 with misra addon, for Arm (arm32/arm64 - target allyesconfig).
> Fixing this rule comes down to replacing implicit 'unsigned' with explicit
> 'unsigned int' type as there are no other violations being part of that rule
> in the Xen codebase.

I'm puzzled, I have to admit. While I agree with all the examples in the
doc, I notice that there's no instance of "signed" or "unsigned" there.
Which matches my understanding that "unsigned" and "signed" on their own
(just like "long") are proper types, and hence the omission of "int"
there is not an "omission of an explicit type".

Nevertheless I think we have had the intention to use "unsigned int"
everywhere, but simply for cosmetic / style reasons (while I didn't ever
see anyone request the use of "long int" in place of "long", despite it
also being possible to combine with "double"), so I'm happy to see this
being changed. Just that (for now) I don't buy the justification.

Jan



 


Rackspace

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