diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index 84f69f4e26..2a54609747 100644 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_main.c @@ -751,6 +751,8 @@ note_dev_error(int err, int fd) "(As a workaround, " "try \"zfs send [...] | cat > /dev/null\")\n")); } +#else + (void) err, (void) fd; #endif } diff --git a/contrib/pam_zfs_key/pam_zfs_key.c b/contrib/pam_zfs_key/pam_zfs_key.c index 9702189f67..f831f65af1 100644 --- a/contrib/pam_zfs_key/pam_zfs_key.c +++ b/contrib/pam_zfs_key/pam_zfs_key.c @@ -47,6 +47,7 @@ static void pam_syslog(pam_handle_t *pamh, int loglevel, const char *fmt, ...) { + (void) pamh; va_list args; va_start(args, fmt); vsyslog(loglevel, fmt, args); diff --git a/lib/libshare/os/freebsd/nfs.c b/lib/libshare/os/freebsd/nfs.c index 494442cb52..ea02dc1bae 100644 --- a/lib/libshare/os/freebsd/nfs.c +++ b/lib/libshare/os/freebsd/nfs.c @@ -155,6 +155,7 @@ nfs_is_shared(sa_share_impl_t impl_share) static int nfs_validate_shareopts(const char *shareopts) { + (void) shareopts; return (SA_OK); } diff --git a/lib/libshare/os/freebsd/smb.c b/lib/libshare/os/freebsd/smb.c index 5b606ab969..a25990d3bf 100644 --- a/lib/libshare/os/freebsd/smb.c +++ b/lib/libshare/os/freebsd/smb.c @@ -47,6 +47,7 @@ static sa_fstype_t *smb_fstype; static int smb_enable_share(sa_share_impl_t impl_share) { + (void) impl_share; fprintf(stderr, "No SMB support in FreeBSD yet.\n"); return (SA_NOT_SUPPORTED); } @@ -56,6 +57,7 @@ smb_enable_share(sa_share_impl_t impl_share) static int smb_disable_share(sa_share_impl_t impl_share) { + (void) impl_share; fprintf(stderr, "No SMB support in FreeBSD yet.\n"); return (SA_NOT_SUPPORTED); } @@ -66,6 +68,7 @@ smb_disable_share(sa_share_impl_t impl_share) static int smb_validate_shareopts(const char *shareopts) { + (void) shareopts; fprintf(stderr, "No SMB support in FreeBSD yet.\n"); return (SA_NOT_SUPPORTED); } @@ -76,6 +79,7 @@ smb_validate_shareopts(const char *shareopts) static boolean_t smb_is_share_active(sa_share_impl_t impl_share) { + (void) impl_share; return (B_FALSE); } @@ -88,6 +92,7 @@ smb_is_share_active(sa_share_impl_t impl_share) static int smb_update_shareopts(sa_share_impl_t impl_share, const char *shareopts) { + (void) impl_share, (void) shareopts; return (SA_OK); } diff --git a/lib/libspl/include/sys/simd.h b/lib/libspl/include/sys/simd.h index dceedb698f..6ef836c16e 100644 --- a/lib/libspl/include/sys/simd.h +++ b/lib/libspl/include/sys/simd.h @@ -468,6 +468,7 @@ zfs_avx512vbmi_available(void) static jmp_buf env; static void sigillhandler(int x) { + (void) x; longjmp(env, 1); } #endif diff --git a/lib/libzfs/os/freebsd/libzfs_compat.c b/lib/libzfs/os/freebsd/libzfs_compat.c index e3f17662a1..cb5a27c64f 100644 --- a/lib/libzfs/os/freebsd/libzfs_compat.c +++ b/lib/libzfs/os/freebsd/libzfs_compat.c @@ -42,6 +42,7 @@ void libzfs_set_pipe_max(int infd) { /* FreeBSD automatically resizes */ + (void) infd; } static int @@ -251,24 +252,28 @@ libzfs_load_module(void) int zpool_relabel_disk(libzfs_handle_t *hdl, const char *path, const char *msg) { + (void) hdl, (void) path, (void) msg; return (0); } int zpool_label_disk(libzfs_handle_t *hdl, zpool_handle_t *zhp, const char *name) { + (void) hdl, (void) zhp, (void) name; return (0); } int find_shares_object(differ_info_t *di) { + (void) di; return (0); } int zfs_destroy_snaps_nvl_os(libzfs_handle_t *hdl, nvlist_t *snaps) { + (void) hdl, (void) snaps; return (0); }