HomeFreeBSD

config: Fix LLVM-21 -Wuninitialized-const-pointer warning

Description

config: Fix LLVM-21 -Wuninitialized-const-pointer warning

LLVM-21 enables -Wuninitialized-const-pointer which results in the
following compiler warning and the bdev_file_open_by_path() interface
not being detected for 6.9 and newer kernels. The blk_holder_ops
are not used by the ZFS code so we can safely use a NULL argument
for this check.

bdev_file_open_by_path/bdev_file_open_by_path.c:110:54: error:
variable 'h' is uninitialized when passed as a const pointer
argument here [-Werror,-Wuninitialized-const-pointer]

Reviewed-by: Rob Norris <robn@despairlabs.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #17682
Closes #17684

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Sep 2 2025, 4:34 PM
GitHub <noreply@github.com>Committed on Sep 2 2025, 4:34 PM
Parents
rG5a8ba4520bff: manuals: Audit/bump dates for last content change
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG9acedbaceec3: config: Fix LLVM-21 -Wuninitialized-const-pointer warning (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Sep 2 2025, 4:34 PM