git: 7b9e74754674 - stable/13 - libsa: Disable -Wdangling-pointer for zfs.c.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 03 May 2023 00:29:31 UTC
The branch stable/13 has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=7b9e74754674be7afa1059f4ca66d6c6723efdc9
commit 7b9e74754674be7afa1059f4ca66d6c6723efdc9
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-12-05 00:27:22 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-05-03 00:03:01 +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
(cherry picked from commit 0163de282e3195a1845f75b486adb3e1e7580199)
---
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 f0d8129be9e1..4eb89fb80b2c 100644
--- a/stand/libsa/zfs/Makefile.inc
+++ b/stand/libsa/zfs/Makefile.inc
@@ -42,3 +42,5 @@ CFLAGS+= -I${SYSDIR}/contrib/openzfs/include/os/freebsd/zfs
CFLAGS.zfs.c+= -I${SYSDIR}/cddl/contrib/opensolaris/common/lz4
CFLAGS+= -Wformat -Wall
+
+CWARNFLAGS.zfs.c+= ${NO_WDANGLING_POINTER}