Skip to content
Snippets Groups Projects
Commit 08e29126 authored by Marek Vavruša's avatar Marek Vavruša
Browse files

ccan/compiler: attribute nonnull support

parent 65e8658c
Branches
Tags
No related merge requests found
......@@ -228,4 +228,16 @@
#define WARN_UNUSED_RESULT
#endif
#endif
#ifndef NON_NULL
#if HAVE_ATTRIBUTE_NONNULL
/**
* NON_NULL - nonnull attribute specifies that some function parameters should be non-null pointers.
*/
#define NON_NULL(...) __attribute__((nonnull(__VA_ARGS__)))
#else
#define NON_NULL(...)
#endif
#endif
#endif /* CCAN_COMPILER_H */
......@@ -2,4 +2,5 @@
#define HAVE_ATTRIBUTE_COLD 1
#define HAVE_ATTRIBUTE_NORETURN 1
#define HAVE_ATTRIBUTE_PURE 1
#define HAVE_ATTRIBUTE_UNUSED 1
\ No newline at end of file
#define HAVE_ATTRIBUTE_UNUSED 1
#define HAVE_ATTRIBUTE_NONNULL 1
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment