diff options
author | H. Peter Anvin (Intel) <hpa@zytor.com> | 2020-06-30 10:14:21 -0700 |
---|---|---|
committer | H. Peter Anvin (Intel) <hpa@zytor.com> | 2020-06-30 10:14:21 -0700 |
commit | 65ab3ab1976c9e1e2642dd2e79316ff4129d8bc9 (patch) | |
tree | 10f77d9be420c338718c0e0ccaf17f7f4d966c56 /include/strlist.h | |
parent | f21b2ba8f3772eb7d1207c214a181516b9d1f4e4 (diff) | |
download | nasm-65ab3ab1976c9e1e2642dd2e79316ff4129d8bc9.tar.gz |
clang: mark inline functions unused and add warning options
clang, unlike gcc, will warn on inline functions which are
unused. This can happen if a function is either intended to be used in
the future, or it is only used under certain config options. Mark
those functions with the "unused" attribute; not only does it quiet
the warning, but it also documents it for the user.
Shuffle around the warning options in configure and add a few more
that are specific to clang.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'include/strlist.h')
-rw-r--r-- | include/strlist.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/strlist.h b/include/strlist.h index 2c80d0be..f1775abd 100644 --- a/include/strlist.h +++ b/include/strlist.h @@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------- * * - * Copyright 1996-2018 The NASM Authors - All Rights Reserved + * Copyright 1996-2020 The NASM Authors - All Rights Reserved * See the file AUTHORS included with the NASM distribution for * the specific copyright holders. * @@ -78,10 +78,10 @@ static inline size_t strlist_size(const struct strlist *list) } struct strlist safe_alloc *strlist_alloc(bool uniq); -const struct strlist_entry * never_null strlist_add(struct strlist *list, const char *str); -const struct strlist_entry * printf_func(2, 3) never_null +const struct strlist_entry *strlist_add(struct strlist *list, const char *str); +const struct strlist_entry * printf_func(2, 3) strlist_printf(struct strlist *list, const char *fmt, ...); -const struct strlist_entry * never_null +const struct strlist_entry * strlist_vprintf(struct strlist *list, const char *fmt, va_list ap); const struct strlist_entry * strlist_find(const struct strlist *list, const char *str); |