From 0163de282e3195a1845f75b486adb3e1e7580199 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Sun, 4 Dec 2022 16:27:22 -0800 Subject: [PATCH] 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 --- stand/libsa/zfs/Makefile.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stand/libsa/zfs/Makefile.inc b/stand/libsa/zfs/Makefile.inc index dfd136a02a48..144b8cf7f31c 100644 --- a/stand/libsa/zfs/Makefile.inc +++ b/stand/libsa/zfs/Makefile.inc @@ -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}