libnvpair: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12844
This commit is contained in:
наб 2021-12-12 15:16:19 +01:00 committed by Brian Behlendorf
parent 9028f99a79
commit 0cad373e5c
5 changed files with 9 additions and 7 deletions

View File

@ -253,11 +253,11 @@ NVLIST_ARRPRTFUNC(int64_array, int64_t, longlong_t, "%lld")
NVLIST_ARRPRTFUNC(uint64_array, uint64_t, u_longlong_t, "0x%llx") NVLIST_ARRPRTFUNC(uint64_array, uint64_t, u_longlong_t, "0x%llx")
NVLIST_ARRPRTFUNC(string_array, char *, char *, "%s") NVLIST_ARRPRTFUNC(string_array, char *, char *, "%s")
/*ARGSUSED*/
static int static int
nvprint_nvlist(nvlist_prtctl_t pctl, void *private, nvprint_nvlist(nvlist_prtctl_t pctl, void *private,
nvlist_t *nvl, const char *name, nvlist_t *value) nvlist_t *nvl, const char *name, nvlist_t *value)
{ {
(void) private, (void) nvl;
FILE *fp = pctl->nvprt_fp; FILE *fp = pctl->nvprt_fp;
indent(pctl, 1); indent(pctl, 1);
@ -273,11 +273,11 @@ nvprint_nvlist(nvlist_prtctl_t pctl, void *private,
return (1); return (1);
} }
/*ARGSUSED*/
static int static int
nvaprint_nvlist_array(nvlist_prtctl_t pctl, void *private, nvaprint_nvlist_array(nvlist_prtctl_t pctl, void *private,
nvlist_t *nvl, const char *name, nvlist_t **valuep, uint_t count) nvlist_t *nvl, const char *name, nvlist_t **valuep, uint_t count)
{ {
(void) private, (void) nvl;
FILE *fp = pctl->nvprt_fp; FILE *fp = pctl->nvprt_fp;
uint_t i; uint_t i;

View File

@ -36,10 +36,10 @@ nv_alloc_sys(nv_alloc_t *nva, size_t size)
return (kmem_alloc(size, (int)(uintptr_t)nva->nva_arg)); return (kmem_alloc(size, (int)(uintptr_t)nva->nva_arg));
} }
/*ARGSUSED*/
static void static void
nv_free_sys(nv_alloc_t *nva, void *buf, size_t size) nv_free_sys(nv_alloc_t *nva, void *buf, size_t size)
{ {
(void) nva;
kmem_free(buf, size); kmem_free(buf, size);
} }

View File

@ -82,13 +82,13 @@ fnvlist_pack(nvlist_t *nvl, size_t *sizep)
return (packed); return (packed);
} }
/*ARGSUSED*/
void void
fnvlist_pack_free(char *pack, size_t size) fnvlist_pack_free(char *pack, size_t size)
{ {
#ifdef _KERNEL #ifdef _KERNEL
kmem_free(pack, size); kmem_free(pack, size);
#else #else
(void) size;
free(pack); free(pack);
#endif #endif
} }

View File

@ -576,6 +576,7 @@ nvlist_nv_alloc(int kmflag)
return (nv_alloc_pushpage); return (nv_alloc_pushpage);
} }
#else #else
(void) kmflag;
return (nv_alloc_nosleep); return (nv_alloc_nosleep);
#endif /* _KERNEL */ #endif /* _KERNEL */
} }
@ -2296,10 +2297,11 @@ nvlist_add_nvpair(nvlist_t *nvl, nvpair_t *nvp)
* the values are taken from nvl in the case of duplicates. * the values are taken from nvl in the case of duplicates.
* Return 0 on success. * Return 0 on success.
*/ */
/*ARGSUSED*/
int int
nvlist_merge(nvlist_t *dst, nvlist_t *nvl, int flag) nvlist_merge(nvlist_t *dst, nvlist_t *nvl, int flag)
{ {
(void) flag;
if (nvl == NULL || dst == NULL) if (nvl == NULL || dst == NULL)
return (EINVAL); return (EINVAL);
@ -2803,10 +2805,10 @@ nvs_native_create(nvstream_t *nvs, nvs_native_t *native, char *buf,
} }
} }
/*ARGSUSED*/
static void static void
nvs_native_destroy(nvstream_t *nvs) nvs_native_destroy(nvstream_t *nvs)
{ {
(void) nvs;
} }
static int static int

View File

@ -85,11 +85,11 @@ nv_fixed_alloc(nv_alloc_t *nva, size_t size)
return ((void *)new); return ((void *)new);
} }
/*ARGSUSED*/
static void static void
nv_fixed_free(nv_alloc_t *nva, void *buf, size_t size) nv_fixed_free(nv_alloc_t *nva, void *buf, size_t size)
{ {
/* don't free memory in the pre-allocated buffer */ /* don't free memory in the pre-allocated buffer */
(void) nva, (void) buf, (void) size;
} }
static void static void