Mailing List Archive

[XEN PATCH v3 16/16] xen/lz4: address violations of MISRA C:2012 Directive 4.10
From: Maria Celeste Cesario <maria.celeste.cesario@bugseng.com>

Add inclusion guard to address violations of
MISRA C:2012 Directive 4.10 ("Precautions shall be taken in order to
prevent the contents of a header file being included more than once").
Mechanical change.
---
Commit introduced in v3

Signed-off-by: Maria Celeste Cesario <maria.celeste.cesario@bugseng.com>
Signed-off-by: Simone Ballarin <simone.ballarin@bugseng.com>
---
xen/common/lz4/defs.h | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/xen/common/lz4/defs.h b/xen/common/lz4/defs.h
index 6d81113266..ecfbf07f83 100644
--- a/xen/common/lz4/defs.h
+++ b/xen/common/lz4/defs.h
@@ -8,6 +8,9 @@
* published by the Free Software Foundation.
*/

+#ifndef COMMON_LZ4_DEFS_H
+#define COMMON_LZ4_DEFS_H
+
#ifdef __XEN__
#include <asm/byteorder.h>
#include <xen/unaligned.h>
@@ -166,3 +169,5 @@ typedef struct _U64_S { u64 v; } U64_S;
LZ4_WILDCOPY(s, d, e); \
d = e; \
} while (0)
+
+#endif /* COMMON_LZ4_DEFS_H */
--
2.34.1
Re: [XEN PATCH v3 16/16] xen/lz4: address violations of MISRA C:2012 Directive 4.10 [ In reply to ]
On 11.03.2024 09:59, Simone Ballarin wrote:
> From: Maria Celeste Cesario <maria.celeste.cesario@bugseng.com>
>
> Add inclusion guard to address violations of
> MISRA C:2012 Directive 4.10 ("Precautions shall be taken in order to
> prevent the contents of a header file being included more than once").
> Mechanical change.
> ---
> Commit introduced in v3
>
> Signed-off-by: Maria Celeste Cesario <maria.celeste.cesario@bugseng.com>
> Signed-off-by: Simone Ballarin <simone.ballarin@bugseng.com>

Once again somewhat reluctantly
Acked-by: Jan Beulich <jbeulich@suse.com>

Jan