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

Re: [PATCH] xsm: misra rule 8.4 fix


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 7 Dec 2022 10:47:59 +0100
  • 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=P0Y2FkX8sGUPj/P9upfIH4pegaBReVkV48iHOylcdWQ=; b=Vf42axXuA+g9I4QhCcf2LWbIjAuj9c5sk97Q9r+LKlzcMaiGKapfB3ko4jB6QTYZXrfXVMc3OOWZpB3PUB6Kneihfwicok09ZfpgL8dfqqnCEus36jO5HwDeRHKJk1x4wK3FAGSF6VDWeQ1744NfjKmZGx6fkk8SnE05vS8RIRd9iB3DDZjA2Nc5pXwIU8wFO4rlKCDI29z0J0xaEG4NZVKBftZKU5TkMBqO8TorLrJbijQLaXegjqgsQki0VGHZz8XnlbNdhLdgKrk4WX01CjdIRFOS0yjBJ4o/CMOwyX8okCtrR5aXBmEybByCzp/Le4ijK+KWtK/jbPJfUfwr4g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A1gmlEqtXqa9ce3MoYWs9AFMsaQa/vR+OyiISqIfb/pTbzYxZy4Fxqxu6AYlBvNyLqHxMs6S6mloWbrtTwVKwWSN1SMw7SgpyZqG+CcyDh59PmbkeARKNMvJcEBHBwIE1CbLhaL9T3E9LvrCIHMIOLF5c85IHrRSpmZT1ciSo39BVaS6q5yYDm5CT15fLnWr3i7pftjncIfiNLXpPFzhoQGXAGxzESNnxDBruicoadnsfJ+e1gi0KWHGJB6GNCZMmG25UIJ8wDnDOo7YPcq+g9ck0PVT0j23EJiW38ft3hogZw8VUd5lYJr17T4zL9wpnbEXxC6nyA9ELQIgmWl/6Q==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: dpsmith@xxxxxxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 07 Dec 2022 09:48:10 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 07.12.2022 03:12, Stefano Stabellini wrote:
> Fix two MISRA Issues Rule 8.4 ("A compatible declaration shall be
> visible when an object or function with external linkage is defined")
> found by cppcheck affecting xen/xsm/flask/ss/services.c.
> 
> Fix the first issue by making policydb_loaded_version static

This variable is only ever written to afaics, so perhaps better simply
drop it?

> and the
> second issue by declaring ss_initialized in a proper header.
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>

As to the title: The changes are contained to Flask, so xsm: really
is too wide a prefix.

> --- a/xen/xsm/flask/flask_op.c
> +++ b/xen/xsm/flask/flask_op.c
> @@ -56,8 +56,6 @@ static int bool_num = 0;
>  static int *bool_pending_values = NULL;
>  static int flask_security_make_bools(void);
>  
> -extern int ss_initialized;

What about the 2nd one in flask/ss/policydb.c?

Jan



 


Rackspace

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