mirror_zfs/module/zstd/lib
Brian Behlendorf 1bf3abc634
Silence unused-but-set-variable warnings
Clang 13.0.0 added support for `Wunused-but-set-parameter` and
`-Wunused-but-set-variable` which correctly detects two unused
variables in zstd resulting in a build failure.  This commit
annotates these instances accordingly.

  https://releases.llvm.org/13.0.1/tools/clang/docs/ReleaseNotes.html#id6

In FSE_createCTable(), malloc() is intentionally defined as NULL when
compiled in the kernel so the variable is unused.

  zstd/lib/compress/fse_compress.c:307:12: error: variable 'size'
  set but not used [-Werror,-Wunused-but-set-variable]

Additionally, in ZSTD_seqDecompressedSize() the assert is compiled
out similarly resulting in an unused variable.

  zstd/lib/compress/zstd_compress_superblock.c:412:12: error: variable
  'litLengthSum' set but not used [-Werror,-Wunused-but-set-variable]

Reviewed-by: Rich Ercolani <rincebrain@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #13382
2022-04-29 14:21:11 -07:00
..
common Re-apply 6ba2e72b, silence lint 2022-03-01 13:56:00 -08:00
compress Silence unused-but-set-variable warnings 2022-04-29 14:21:11 -07:00
decompress Explode zstd 1.4.5 into separate upstream files 2022-03-01 13:55:12 -08:00
zstd.h Explode zstd 1.4.5 into separate upstream files 2022-03-01 13:55:12 -08:00