mirror of https://gitee.com/openkylin/libvirt.git
infra: define ATTRIBUTE_NONNULL to mark non-NULL parameters
* src/internal.h (ATTRIBUTE_NONNULL): Define.
This commit is contained in:
parent
625f1745dd
commit
45aec0eae4
|
@ -116,6 +116,14 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef ATTRIBUTE_NONNULL
|
||||
# if __GNUC_PREREQ (3, 3)
|
||||
# define ATTRIBUTE_NONNULL(m) __attribute__((__nonnull__(m)))
|
||||
# else
|
||||
# define ATTRIBUTE_NONNULL(m)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#else
|
||||
#ifndef ATTRIBUTE_UNUSED
|
||||
#define ATTRIBUTE_UNUSED
|
||||
|
|
Loading…
Reference in New Issue