svn commit: r336838 - in head/lib: libauditd libbsm

Alan Somers asomers at FreeBSD.org
Sat Jul 28 20:04:41 UTC 2018


Author: asomers
Date: Sat Jul 28 20:04:39 2018
New Revision: 336838
URL: https://svnweb.freebsd.org/changeset/base/336838

Log:
  Disable -Wcast-align in libbsm and libauditd
  
  Along with some pending upstream changes, this will allow raising the WARNS
  level.
  
  Reviewed by:	cem, aniketp
  MFC after:	2 weeks
  Differential Revision:	https://reviews.freebsd.org/D16486

Modified:
  head/lib/libauditd/Makefile
  head/lib/libbsm/Makefile

Modified: head/lib/libauditd/Makefile
==============================================================================
--- head/lib/libauditd/Makefile	Sat Jul 28 19:44:20 2018	(r336837)
+++ head/lib/libauditd/Makefile	Sat Jul 28 20:04:39 2018	(r336838)
@@ -23,3 +23,10 @@ WARNS?=		3
 MAN=
 
 .include <bsd.lib.mk>
+
+# Disable -Wcast-align.  Casting res->ai_addr in auditd_set_host triggers this
+# warning, but it's ok because res->ai_addr must've originally pointed to a
+# sockaddr_in or sockaddr_in6 anyway.
+# Better would be to disable this warning in just that one function, but GCC
+# 4.2 can't do that :( .
+CWARNFLAGS.auditd_lib.c+=	-Wno-cast-align

Modified: head/lib/libbsm/Makefile
==============================================================================
--- head/lib/libbsm/Makefile	Sat Jul 28 19:44:20 2018	(r336837)
+++ head/lib/libbsm/Makefile	Sat Jul 28 20:04:39 2018	(r336838)
@@ -181,3 +181,10 @@ MLINKS=	libbsm.3 bsm.3							\
 	setaudit.2 setaudit_addr.2
 
 .include <bsd.lib.mk>
+
+# Disable -Wcast-align.  Casting sa_local in au_to_socket_ex triggers this
+# warning, but it's ok because sa_local must've originally pointed to a
+# sockaddr_in or sockaddr_in6 anyway.
+# Better would be to disable this warning in just that one function, but GCC
+# 4.2 can't do that :( .
+CWARNFLAGS.bsm_token.c+=	-Wno-cast-align


More information about the svn-src-head mailing list