mirror of
https://github.com/systemd/systemd.git
synced 2024-11-02 10:51:20 +03:00
basic/macros: clang 3.5 doesn't support alloc_size
The attribute was removed in commit c047507 in the clang repository as it was never properly implemented anyway. Avoid using the attribute with clang because it generates a ton of annoying warnings.
This commit is contained in:
parent
70e43ee7be
commit
26e9e10b39
@ -26,7 +26,11 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#define _printf_(a,b) __attribute__ ((format (printf, a, b)))
|
||||
#define _alloc_(...) __attribute__ ((alloc_size(__VA_ARGS__)))
|
||||
#ifdef __clang__
|
||||
# define _alloc_(...)
|
||||
#else
|
||||
# define _alloc_(...) __attribute__ ((alloc_size(__VA_ARGS__)))
|
||||
#endif
|
||||
#define _sentinel_ __attribute__ ((sentinel))
|
||||
#define _unused_ __attribute__ ((unused))
|
||||
#define _destructor_ __attribute__ ((destructor))
|
||||
|
Loading…
Reference in New Issue
Block a user