From: Emil Velikov Date: Fri, 30 May 2025 10:00:13 +0000 (+0100) Subject: shared: properly __attribute__ all macros X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5610688ec062cfeb546b105e60c76b3f8ed3130d;p=thirdparty%2Fkmod.git shared: properly __attribute__ all macros 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 Link: https://github.com/kmod-project/kmod/pull/361 Signed-off-by: Lucas De Marchi --- diff --git a/.clang-format b/.clang-format index ed2db61c..cd25560b 100644 --- a/.clang-format +++ b/.clang-format @@ -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 diff --git a/shared/macro.h b/shared/macro.h index b3e37920..a469db73 100644 --- a/shared/macro.h +++ b/shared/macro.h @@ -45,10 +45,10 @@ #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))