[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] libxl: Replace open-coded __attribute__ with NN() macro
commit 1f2c7894dfe3d52f33655de202bd474999a1637b Author: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> AuthorDate: Fri Oct 20 11:42:42 2017 +0100 Commit: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> CommitDate: Mon Oct 23 15:23:32 2017 +0100 libxl: Replace open-coded __attribute__ with NN() macro Inspired by #define __nonnull(...) __attribute__((__nonnull__(__VA_ARGS__))) which is used in the hypervisor. These annotations may well become very common in libxl, so we choose a short name. Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> Release-acked-by: Julien Grall <julien.grall@xxxxxxxxxx> Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx> CC: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- tools/libxl/libxl_internal.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 9fe472e..bfa95d8 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -635,6 +635,7 @@ static inline int libxl__gc_is_real(const libxl__gc *gc) */ /* register ptr in gc for free on exit from outermost libxl callframe. */ +#define NN(...) __attribute__((nonnull(__VA_ARGS__))) #define NN1 __attribute__((nonnull(1))) /* It used to be legal to pass NULL for gc_opt. Get the compiler to * warn about this if any slip through. */ @@ -1711,7 +1712,7 @@ _hidden char *libxl__domid_to_name(libxl__gc *gc, uint32_t domid); _hidden char *libxl__cpupoolid_to_name(libxl__gc *gc, uint32_t poolid); _hidden int libxl__enum_from_string(const libxl_enum_string_table *t, - const char *s, int *e) __attribute__((nonnull(2))); + const char *s, int *e) NN(2); _hidden yajl_gen_status libxl__yajl_gen_asciiz(yajl_gen hand, const char *str); -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |