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

Re: [PATCH v2] xsm/flask: misra rule 8.4 fix


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 8 Dec 2022 09:31:46 +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=HHaGxsDIclkMPpguyuyY6mwy4nelouZrJLSamVJUtqM=; b=it2itoaAKaDbeAhdaFnK0pzEG8p4VStr+/hGAneYkn8V3KWBvl7HVA+OdMgX8MPs/Bf48lfRM5orXTSsynuWDODcmTI8bXBPIVPY2m8PMJ47bk3EUL3KI+jfWk79bqF7k9yPYQ9n5moHWtCKIJpi3HJSi2QPcvNXmw+ar8zKhsRA30cJ4ujwiwhbxlWeMl/jfkiMwz3W8Obxa1wMyUPQuBiVYE0sw0yWFtsELM2q5VQuEe4PtJO7BdXZMbpwUR0lkvhCv8QVudPGjetTvb44XgO9+tE8pTsejeebIs8Ko3AiQs0T6700pNa1+QZtze74oiHhLmcsxpYMqfwzQ6gG/w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=edPqwQl/LMLNsRigLfHvEL7T4j0l4ehwlzV2UsdiMMV594Lw1pLxbZlIlY+lrHORqhofw7Da9PSlQ3x/3MF/+EgfpYFeTZCqMtu6ISEZPaqpfMw/Tp2DmbLPKLTr9+UoVnFHMpV6Kl/gD0rKkJTY9cMcPDv23LO5gy7h6y2npu8bQuQsN2eXmJlE8UZH01GL1mgFfYTsrW28kO7IAGXE3rUv2eQO1ZNe6cipKMJbHHe5K0YPOSwJxuGPmW4XDy2ZTxrtmXabZx6g2T27ptEEIw+HxkiuAsWs/VxGQAfGtUjz23P/bw1o+6IZv2Inp49WfGYpNalcZ4PmlsEDnF765A==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: dpsmith@xxxxxxxxxxxxxxxxxxxx, michal.orzel@xxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 08 Dec 2022 08:32:24 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 08.12.2022 00:24, Stefano Stabellini wrote:
> Fix several 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.
> 
> - policydb_loaded_version is not declared; removed it because it is
>   unused
> - move ss_initialized declaration to xen/xsm/flask/include/conditional.h
> - #include <conditional.h> (which is
>   xen/xsm/flask/include/conditional.h) in xen/xsm/flask/ss/policydb.c so
>   that policydb.c also gets the declaration of ss_initialized
> - #include <conditional.h> in xen/xsm/flask/ss/services.c to declare
>   security_*_bools functions that services.c is defining and using
> 
> This patch solves all the Rule 8.4 violations found by cppcheck on xsm/
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

But I'll continue the v1 thread wrt the two conditional.h; that's
independent of the changes done here, though.

Jan



 


Rackspace

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