On 17/05/2025 12:21 am, Stefano Stabellini wrote:
> From: Federico Serafini <federico.seraf...@bugseng.com>
>
> MISRA C Directive 4.10 states that:
> "Precautions shall be taken in order to prevent the contents of a
> header file being included more than once".
>
> Add inclusion guards where missing to address violations of the
> guideline.
>
> Signed-off-by: Federico Serafini <federico.seraf...@bugseng.com>
> Signed-off-by: Stefano Stabellini <stefano.stabell...@amd.com>

Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com>

> diff --git a/xen/common/decompress.h b/xen/common/decompress.h
> index 4683eb6c7e..034c833665 100644
> --- a/xen/common/decompress.h
> +++ b/xen/common/decompress.h
> @@ -1,3 +1,6 @@
> +#ifndef DECOMPRESS_H
> +#define DECOMPRESS_H
> +
>  #ifdef __XEN__
>  
>  #include <xen/decompress.h>
> @@ -22,3 +25,5 @@
>  #define large_free free
>  
>  #endif
> +
> +#endif /* DECOMPRESS_H */

This is borderline too generic, but a COMMON_ prefix doesn't make it any
better.  Oh well...

~Andrew

P.S. the decompressor infrastructure is several stacked disasters and
needs redoing from scratch.

Reply via email to