Commit 9f06b8f8 authored by Rusty Russell's avatar Rusty Russell

compiler: allow NON_NULL_ARGS with only a single argument.

Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 8cc0749a
...@@ -263,12 +263,12 @@ ...@@ -263,12 +263,12 @@
* The compiler will warn if any of the specified pointer args are NULL. * The compiler will warn if any of the specified pointer args are NULL.
* *
* Example: * Example:
* char *my_copy2(char *buf, char *maybenull) NON_NULL_ARGS(1, 2); * char *my_copy2(char *buf, char *maybenull) NON_NULL_ARGS(1);
*/ */
#define NON_NULL_ARGS(index, ...) __attribute__((__nonnull__(index, __VA_ARGS__))) #define NON_NULL_ARGS(...) __attribute__((__nonnull__(__VA_ARGS__)))
#else #else
#define NO_NULL_ARGS #define NO_NULL_ARGS
#define NON_NULL_ARGS(index, ...) #define NON_NULL_ARGS(...)
#endif #endif
......
Markdown is supported
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