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 <[email protected]>
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