git: 0163de282e31 - main - libsa: Disable -Wdangling-pointer for zfs.c.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Mon, 05 Dec 2022 00:30:33 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=0163de282e3195a1845f75b486adb3e1e7580199

commit 0163de282e3195a1845f75b486adb3e1e7580199
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-12-05 00:27:22 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-12-05 00:27:22 +0000

    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}