diff options
author | Kyle Evans <[email protected]> | 2020-07-23 19:41:48 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-23 17:41:48 -0700 |
commit | bfafe1780a61a1be0a84273c7155708de003033e (patch) | |
tree | 50722a238c8ee529e44fbba9b590a0697f235d4a /lib | |
parent | f7a68f99d07ffb231046d2bae5360b66957ca9a7 (diff) |
Annotate unused parameters on inline definitions as such
* libspl: umem: These are obviously and intentionally unused; annotate
them as such to appease -Wunused-parameter builds that include this
header.
* sys/dmu.h: In this case, clear_on_evict_dbufp is only used for
ZFS_DEBUG builds, so annotate it as __maybe_unused to appease
-Wunused-parameter.
Reviewed-By: Brian Behlendorf <[email protected]>
Signed-off-by: Kyle Evans <[email protected]>
Closes #10606
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libspl/include/umem.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libspl/include/umem.h b/lib/libspl/include/umem.h index 49e9f9c14..ef9026009 100644 --- a/lib/libspl/include/umem.h +++ b/lib/libspl/include/umem.h @@ -36,6 +36,7 @@ * * https://labs.omniti.com/trac/portableumem */ +#include <sys/debug.h> #include <stdlib.h> #include <stdio.h> @@ -131,13 +132,13 @@ umem_zalloc(size_t size, int flags) } static inline void -umem_free(void *ptr, size_t size) +umem_free(void *ptr, size_t size __maybe_unused) { free(ptr); } static inline void -umem_nofail_callback(umem_nofail_callback_t *cb) +umem_nofail_callback(umem_nofail_callback_t *cb __maybe_unused) {} static inline umem_cache_t * @@ -199,7 +200,7 @@ umem_cache_free(umem_cache_t *cp, void *ptr) } static inline void -umem_cache_reap_now(umem_cache_t *cp) +umem_cache_reap_now(umem_cache_t *cp __maybe_unused) { } |