]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
shared: properly __attribute__ all macros
authorEmil Velikov <emil.l.velikov@gmail.com>
Fri, 30 May 2025 10:00:13 +0000 (11:00 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Wed, 11 Jun 2025 12:54:40 +0000 (07:54 -0500)
Handful of the attributes were missing the trailing double underscore.
Thus they were not picked by our git grep combo and ultimately missing
from .clang-format.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/361
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
.clang-format
shared/macro.h

index ed2db61cb4f7aa7e7881bebbacfc67d8f95fde93..cd25560b3ec657395248712bd75a6e7b7cb68bca 100644 (file)
@@ -80,6 +80,7 @@ ForEachMacros:
 AttributeMacros:
   - KMOD_EXPORT
   - TS_EXPORT
+  - _alignedptr_
   - _always_inline_
   - _clang_suppress_alloc_
   - _cleanup_
@@ -88,7 +89,10 @@ AttributeMacros:
   - _nonnull_
   - _nonnull_all_
   - _printf_format_
+  - _retain_
+  - _section_
   - _sentinel_
+  - _used_
   - noreturn
 
 IncludeBlocks: Preserve
index b3e379201dd26c040ecdc64556efcd051bd2b58a..a469db73fdd9f96e52060c3762a897902dd48abb 100644 (file)
 #define _printf_format_(a, b) __attribute__((format(printf, a, b)))
 #define _always_inline_ __inline__ __attribute__((always_inline))
 #define _sentinel_ __attribute__((sentinel))
-#define _used_ __attribute((used))
-#define _retain_ __attribute((retain))
-#define _section_(a) __attribute((section(a)))
-#define _alignedptr_ __attribute((aligned(sizeof(void *))))
+#define _used_ __attribute__((used))
+#define _retain_ __attribute__((retain))
+#define _section_(a) __attribute__((section(a)))
+#define _alignedptr_ __attribute__((aligned(sizeof(void *))))
 
 #if defined(__clang_analyzer__)
 #define _clang_suppress_alloc_ __attribute__((suppress))