summaryrefslogtreecommitdiff
path: root/asm/parser.c
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2020-06-30 10:14:21 -0700
committerH. Peter Anvin (Intel) <hpa@zytor.com>2020-06-30 10:14:21 -0700
commit65ab3ab1976c9e1e2642dd2e79316ff4129d8bc9 (patch)
tree10f77d9be420c338718c0e0ccaf17f7f4d966c56 /asm/parser.c
parentf21b2ba8f3772eb7d1207c214a181516b9d1f4e4 (diff)
downloadnasm-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 'asm/parser.c')
-rw-r--r--asm/parser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/asm/parser.c b/asm/parser.c
index de24103e..3daca0c6 100644
--- a/asm/parser.c
+++ b/asm/parser.c
@@ -234,7 +234,8 @@ static bool parse_braces(decoflags_t *decoflags)
}
}
-static inline const expr *next_expr(const expr *e, const expr **next_list)
+static inline unused
+const expr *next_expr(const expr *e, const expr **next_list)
{
e++;
if (!e->type) {