mirror of
https://github.com/netwide-assembler/nasm
synced 2026-08-26 16:23:04 -04:00
Change unused -> unused_func to remove special case
The autoconf process automatically generates macros for function attributes, including empty placeholders. Said empty placeholders also propagate automatically into config/unconfig.h for the compilers which don't support autoconf. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
parent
fc3e4dcc65
commit
b877708a83
3 changed files with 3 additions and 24 deletions
|
|
@ -234,7 +234,7 @@ static bool parse_braces(decoflags_t *decoflags)
|
|||
}
|
||||
}
|
||||
|
||||
static inline unused
|
||||
static inline unused_func
|
||||
const expr *next_expr(const expr *e, const expr **next_list)
|
||||
{
|
||||
e++;
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@ static inline bool tok_text_match(const struct Token *a, const struct Token *b)
|
|||
return a->len == b->len && !memcmp(tok_text(a), tok_text(b), a->len);
|
||||
}
|
||||
|
||||
static inline unused bool
|
||||
static inline unused_func bool
|
||||
tok_match(const struct Token *a, const struct Token *b)
|
||||
{
|
||||
return a->type == b->type && tok_text_match(a, b);
|
||||
|
|
@ -764,7 +764,7 @@ static const char *unquote_token_cstr(Token *t)
|
|||
* TOK_STRING tokens.
|
||||
*/
|
||||
static Token *quote_any_token(Token *t);
|
||||
static inline unused
|
||||
static inline unused_func
|
||||
Token *quote_token(Token *t)
|
||||
{
|
||||
if (likely(!tok_is(t, TOK_INTERNAL_STRING)))
|
||||
|
|
|
|||
|
|
@ -310,27 +310,6 @@ static inline void *mempcpy(void *dst, const void *src, size_t n)
|
|||
#define printf_func(fmt, list) format_func3(printf,fmt,list)
|
||||
#define printf_func_ptr(fmt, list) format_func3_ptr(printf,fmt,list)
|
||||
|
||||
/*
|
||||
* A static [inline] function which either is currently unused but
|
||||
* likely to be used in the future, or used only under some #if
|
||||
* combinations. Mark with this option to suppress compiler
|
||||
* warnings.
|
||||
*
|
||||
* This is better than #if(def) because it still lets the compiler
|
||||
* analyze the function for validity, and it works even for the
|
||||
* conditional use case.
|
||||
*
|
||||
* The macro UNUSED is set to 1 if the unused macro is meaningful,
|
||||
* otherwise 0; this may be useful in some #if statements.
|
||||
*/
|
||||
#ifdef HAVE_FUNC_ATTRIBUTE_UNUSED
|
||||
# define unused __attribute__((unused))
|
||||
# define UNUSED 1
|
||||
#else
|
||||
# define unused
|
||||
# define UNUSED 0
|
||||
#endif
|
||||
|
||||
/* Determine probabilistically if something is a compile-time constant */
|
||||
#ifdef HAVE___BUILTIN_CONSTANT_P
|
||||
# if defined(__GNUC__) && (__GNUC__ >= 5)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue