git: 7973f26ad6f9 - main - libedit: Disable -Wuse-after-free for chartype.c.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 03 Oct 2022 23:11:28 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=7973f26ad6f98e6da3e2bb07a1015270c0d16c43
commit 7973f26ad6f98e6da3e2bb07a1015270c0d16c43
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-10-03 23:10:43 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-10-03 23:10:43 +0000
libedit: Disable -Wuse-after-free for chartype.c.
GCC 12 thinks ct_visual_string can reuse a pointer after it has been
reallocated, but in this case the warning appears false.
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D36820
---
lib/libedit/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/libedit/Makefile b/lib/libedit/Makefile
index 28014feafab7..4e33320cab70 100644
--- a/lib/libedit/Makefile
+++ b/lib/libedit/Makefile
@@ -97,3 +97,5 @@ test: tc1.o libedit.a ${DPADD} ${LIBTERMCAP}
${CC} ${CFLAGS} ${.ALLSRC} -o ${.TARGET} libedit.a ${LDADD}
.include <bsd.lib.mk>
+
+CWARNFLAGS.chartype.c= ${NO_WUSE_AFTER_FREE}