]> xenbits.xensource.com Git - libvirt.git/commitdiff
infra: define ATTRIBUTE_NONNULL to mark non-NULL parameters
authorJim Meyering <meyering@redhat.com>
Wed, 2 Sep 2009 10:20:32 +0000 (12:20 +0200)
committerJim Meyering <meyering@redhat.com>
Thu, 3 Sep 2009 16:04:23 +0000 (18:04 +0200)
* src/internal.h (ATTRIBUTE_NONNULL): Define.

src/internal.h

index 936cd030207e28b79f38ae943241316d68f2ddc0..8fa579cb338c6657ce06b731d3fcb79582bd5ba2 100644 (file)
 #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