diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:17:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:21:24 +0300 |
commit | e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch) | |
tree | 8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/blenlib/BLI_compiler_attrs.h | |
parent | b3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff) |
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
Diffstat (limited to 'source/blender/blenlib/BLI_compiler_attrs.h')
-rw-r--r-- | source/blender/blenlib/BLI_compiler_attrs.h | 13 |
1 files changed, 7 insertions, 6 deletions
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__ */ |