Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libutil Ignore strncpy(foo, bar, sizeof(foo)) for the wt...



details:   https://anonhg.NetBSD.org/src/rev/22fccc9cfdcd
branches:  trunk
changeset: 1003885:22fccc9cfdcd
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Oct 04 00:03:56 2019 +0000

description:
Ignore strncpy(foo, bar, sizeof(foo)) for the wtmp fields where we don't
want NUL termination. We can't use pragma's because the old gcc complains
about the new warnings it does not understand.

diffstat:

 lib/libutil/Makefile |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r 8941d0246434 -r 22fccc9cfdcd lib/libutil/Makefile
--- a/lib/libutil/Makefile      Thu Oct 03 23:11:11 2019 +0000
+++ b/lib/libutil/Makefile      Fri Oct 04 00:03:56 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.82 2018/04/04 04:43:46 kre Exp $
+#      $NetBSD: Makefile,v 1.83 2019/10/04 00:03:56 christos Exp $
 #      @(#)Makefile    8.1 (Berkeley) 6/4/93
 
 USE_SHLIBDIR=  yes
@@ -39,6 +39,11 @@
 CPPFLAGS.sockaddr_snprintf.c+=-DHAVE_NETATALK_AT_H
 CPPFLAGS.sockaddr_snprintf.c+=-DHAVE_NET_IF_DL_H
 
+#.if ${HAVE_GCC:U0} > 7
+COPTS.logwtmp.c += -Wno-stringop-truncation
+COPTS.logwtmpx.c += -Wno-stringop-truncation
+#.endif
+
 YPREFIX=__pd
 .PATH: ${NETBSDSRCDIR}/lib/libc/gen
 



Home | Main Index | Thread Index | Old Index