The branch stable/13 has been updated by jhb:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=2758ca2ebf7ac8ad019e775afc07e802b4f9adae

commit 2758ca2ebf7ac8ad019e775afc07e802b4f9adae
Author:     John Baldwin <[email protected]>
AuthorDate: 2023-11-15 02:35:44 +0000
Commit:     John Baldwin <[email protected]>
CommitDate: 2024-11-30 18:55:44 +0000

    makefs: Quiet a -Wdangling-pointer warning in cd9660_generate_path_table
    
    This function temporarily stores a pointer to an on-stack variable (a
    TAILQ_HEAD of a temporary list) into a global variable (*n).
    
    Reviewed by:    imp
    Differential Revision:  https://reviews.freebsd.org/D42581
    
    (cherry picked from commit 5fc8ed9313609fbafe505deaea253e6bde5ac165)
---
 usr.sbin/makefs/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/usr.sbin/makefs/Makefile b/usr.sbin/makefs/Makefile
index b3f6c08fe361..e578ceae5046 100644
--- a/usr.sbin/makefs/Makefile
+++ b/usr.sbin/makefs/Makefile
@@ -38,4 +38,9 @@ LIBADD=               netbsd util sbuf
 HAS_TESTS=
 SUBDIR.${MK_TESTS}+= tests
 
+# cd9660_generate_path_table adds a global variable to an on-stack
+# TAILQ which temporarily stores a pointer to the on-stack TAILQ head
+# in the global
+CWARNFLAGS.cd9660.c+= ${NO_WDANGLING_POINTER}
+
 .include <bsd.prog.mk>

Reply via email to