diff options
| author | rillig <rillig@NetBSD.org> | 2020-09-13 15:27:25 +0000 |
|---|---|---|
| committer | rillig <rillig@NetBSD.org> | 2020-09-13 15:27:25 +0000 |
| commit | ee3a5ce88549a9b769ddd7451af2fa8d0977655c (patch) | |
| tree | 82b6857a9fac724da56d326b55371ce5388b03ff /usr.bin/make/make_malloc.h | |
| parent | ec56d9d6dc2a8f543093246c1c7ee23c05e39ae3 (diff) | |
make(1): fix position of MAKE_ATTR_UNUSED in inline functions
The attribute needs to be before the return type, otherwise GCC 5
complains that Hash_GetValue is defined but not used, when compiling
with USER_CPPFLAGS=-Dinline=. The other functions don't get any
warnings. It's probably because Hash_GetValue is the only inline
function that returns a pointer.
Diffstat (limited to 'usr.bin/make/make_malloc.h')
| -rw-r--r-- | usr.bin/make/make_malloc.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/make/make_malloc.h b/usr.bin/make/make_malloc.h index ac804d79c71..492ff0b6961 100644 --- a/usr.bin/make/make_malloc.h +++ b/usr.bin/make/make_malloc.h @@ -1,4 +1,4 @@ -/* $NetBSD: make_malloc.h,v 1.10 2020/08/29 16:47:45 rillig Exp $ */ +/* $NetBSD: make_malloc.h,v 1.11 2020/09/13 15:27:25 rillig Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ char *bmake_strsedup(const char *, const char *); * * The case of a NULL pointer happens especially often after Var_Value, * since only environment variables need to be freed, but not others. */ -static inline void MAKE_ATTR_UNUSED +static inline MAKE_ATTR_UNUSED void bmake_free(void *p) { if (p != NULL) |
