Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jan 2024 17:50:04 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 23cd7dfee413 - stable/14 - makefs: Quiet a -Wdangling-pointer warning in cd9660_generate_path_table
Message-ID:  <202401031750.403Ho4IG037489@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=23cd7dfee4131c85099ea63ebe6ebf290bc867c4

commit 23cd7dfee4131c85099ea63ebe6ebf290bc867c4
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2023-11-15 02:35:44 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-01-03 17:43:48 +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 9c690fa7e704..c0f4469d29f1 100644
--- a/usr.sbin/makefs/Makefile
+++ b/usr.sbin/makefs/Makefile
@@ -49,4 +49,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>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202401031750.403Ho4IG037489>