git: 0c348b97eb05 - main - zfs: Disable -Wunused-but-set-variable for a few files in zstd.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Fri, 08 Apr 2022 00:04:03 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=0c348b97eb051b22f3ee956f17c332eaacb63d59

commit 0c348b97eb051b22f3ee956f17c332eaacb63d59
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-04-08 00:01:29 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-04-08 00:01:29 +0000

    zfs: Disable -Wunused-but-set-variable for a few files in zstd.
    
    FSE_createCTable raises the warning because we stub out malloc() to
    NULL in the kernel, so the passed in size is unused.
    
    ZSTD_seqDecompressedSize has a variable whose value is only used in
    assertions.
    
    NB: These files are missing corresponding entries in sys/conf/files.
---
 sys/modules/zfs/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/modules/zfs/Makefile b/sys/modules/zfs/Makefile
index c0e258691339..086d10a23730 100644
--- a/sys/modules/zfs/Makefile
+++ b/sys/modules/zfs/Makefile
@@ -421,6 +421,7 @@ CFLAGS.zstd.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
 CFLAGS.entropy_common.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
 CFLAGS.error_private.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
 CFLAGS.fse_compress.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
+CFLAGS.fse_compress.c+= ${NO_WUNUSED_BUT_SET_VARIABLE}
 CFLAGS.fse_decompress.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
 CFLAGS.hist.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
 CFLAGS.huf_compress.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
@@ -433,6 +434,7 @@ CFLAGS.zstd_compress.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
 CFLAGS.zstd_compress_literals.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
 CFLAGS.zstd_compress_sequences.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
 CFLAGS.zstd_compress_superblock.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
+CFLAGS.zstd_compress_superblock.c+= ${NO_WUNUSED_BUT_SET_VARIABLE}
 CFLAGS.zstd_ddict.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
 CFLAGS.zstd_decompress.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
 CFLAGS.zstd_decompress_block.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL}