infra: define ATTRIBUTE_NONNULL to mark non-NULL parameters

* src/internal.h (ATTRIBUTE_NONNULL): Define.
This commit is contained in:
Jim Meyering 2009-09-02 12:20:32 +02:00
parent 625f1745dd
commit 45aec0eae4
1 changed files with 8 additions and 0 deletions

View File

@ -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