libsa: Disable -Wdangling-pointer for zfs.c.

GCC 12 warns about a dangling pointer to 'objid' in
zfs_bootenv_initial().  However, this appears to be a false positive
as the pointer to 'objid' is only passed to zfs_lookup_dataset() but
not saved anywhere that outlives the lifetime of the
zfs_bootenv_initial() function.

Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D37533
This commit is contained in:
John Baldwin 2022-12-04 16:27:22 -08:00
parent ad96424e31
commit 0163de282e

View File

@ -83,3 +83,5 @@ CFLAGS.skein_block.c+= -DSKEIN_LOOP=111
# To find blake3_impl.c in OpenZFS tree for our somehat ugly blake3_impl_hack.c
# that's needed until the necessary tweaks can be upstreamed.
CFLAGS.blake3_impl_hack.c+= -I${OZFS}/module/icp/algs/blake3
CWARNFLAGS.zfs.c+= ${NO_WDANGLING_POINTER}