From e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 17 Apr 2019 06:17:24 +0200 Subject: ClangFormat: apply to source, most of intern Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat --- source/blender/blenlib/BLI_compiler_attrs.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'source/blender/blenlib/BLI_compiler_attrs.h') diff --git a/source/blender/blenlib/BLI_compiler_attrs.h b/source/blender/blenlib/BLI_compiler_attrs.h index 98e0eb09813..24da0be122c 100644 --- a/source/blender/blenlib/BLI_compiler_attrs.h +++ b/source/blender/blenlib/BLI_compiler_attrs.h @@ -36,13 +36,13 @@ * arguments would be expected to be non-null */ #ifdef __GNUC__ -# define ATTR_NONNULL(args ...) __attribute__((nonnull(args))) +# define ATTR_NONNULL(args...) __attribute__((nonnull(args))) #else # define ATTR_NONNULL(...) #endif /* never returns NULL */ -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 /* gcc4.9+ only */ +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 /* gcc4.9+ only */ # define ATTR_RETURNS_NONNULL __attribute__((returns_nonnull)) #else # define ATTR_RETURNS_NONNULL @@ -64,7 +64,7 @@ /* the function return value points to memory (2 args for 'size * tot') */ #if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 403)) -# define ATTR_ALLOC_SIZE(args ...) __attribute__((alloc_size(args))) +# define ATTR_ALLOC_SIZE(args...) __attribute__((alloc_size(args))) #else # define ATTR_ALLOC_SIZE(...) #endif @@ -78,14 +78,15 @@ /* hint to compiler that function uses printf-style format string */ #ifdef __GNUC__ -# define ATTR_PRINTF_FORMAT(format_param, dots_param) __attribute__((format(printf, format_param, dots_param))) +# define ATTR_PRINTF_FORMAT(format_param, dots_param) \ + __attribute__((format(printf, format_param, dots_param))) #else # define ATTR_PRINTF_FORMAT(format_param, dots_param) #endif /* Use to suppress '-Wimplicit-fallthrough' (in place of 'break'). */ #ifndef ATTR_FALLTHROUGH -# if defined(__GNUC__) && (__GNUC__ >= 7) /* gcc7.0+ only */ +# if defined(__GNUC__) && (__GNUC__ >= 7) /* gcc7.0+ only */ # define ATTR_FALLTHROUGH __attribute__((fallthrough)) # else # define ATTR_FALLTHROUGH ((void)0) @@ -99,4 +100,4 @@ # define ATTR_ALIGN(x) __attribute__((aligned(x))) #endif -#endif /* __BLI_COMPILER_ATTRS_H__ */ +#endif /* __BLI_COMPILER_ATTRS_H__ */ -- cgit v1.2.3