| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH 09/13] xen/common: address violations of MISRA C:2012 Directive 4.10
 On 29/08/23 08:50, Jan Beulich wrote: On 28.08.2023 15:20, Simone Ballarin wrote: This is the MISRA's definition of "header file" (MISRA C:2012 Revision 1, Appendix J): "A header file is any file that is the subject of a #include directive. Note: the filename extension is not significant."So, the guards are required if we want to comply with the directive, otherwise we can raise a deviation. The danger of multi-inclusion also exists for .c files, why do you want to avoid guards for them? --- a/xen/common/compat/grant_table.c +++ b/xen/common/compat/grant_table.c @@ -3,6 +3,10 @@ * */+Nit: No double blank lines please.+#ifndef __COMMON_COMPAT_GRANT_TABLE_C__ +#define __COMMON_COMPAT_GRANT_TABLE_C__ + #include <xen/hypercall.h> #include <compat/grant_table.h>@@ -331,6 +335,9 @@ int compat_grant_table_op( -- Simone Ballarin, M.Sc. Field Application Engineer, BUGSENG (https://bugseng.com) 
 
 
  | 
  
![]()  | 
            
         Lists.xenproject.org is hosted with RackSpace, monitoring our  |