git: a8f92d247e77 - main - Enable -Wdate-time warning
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 30 Nov 2022 19:00:28 UTC
The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a8f92d247e77f97f70aada494210bf04f1f7ef39 commit a8f92d247e77f97f70aada494210bf04f1f7ef39 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2022-02-09 22:10:03 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2022-11-30 18:59:57 +0000 Enable -Wdate-time warning This produces an "expansion of date or time macro is not reproducible" warning or error upon use of __DATE__ or __TIME__. Provide NO_WDATE_TIME for ports or 3rd party software to opt out. This is a recommit of 489d7a8528ca, which was reverted (by baf8cbcd97a6) due to ports build failures. PR: 267902 [exp-run] Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29580 --- share/mk/bsd.sys.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 02a27e0f9464..18aecfbcc110 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -75,6 +75,9 @@ CWARNFLAGS.clang+= -Wthread-safety CWARNFLAGS+= -Wno-uninitialized .endif # WARNS >=2 && WARNS <= 4 CWARNFLAGS+= -Wno-pointer-sign +.if !defined(NO_WDATE_TIME) +CWARNFLAGS+= -Wdate-time +.endif # NO_WDATE_TIME # Clang has more warnings enabled by default, and when using -Wall, so if WARNS # is set to low values, these have to be disabled explicitly. .if ${WARNS} <= 6