Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src updates for GCC 6.4:
details: https://anonhg.NetBSD.org/src/rev/bc608fd65115
branches: trunk
changeset: 359197:bc608fd65115
user: mrg <mrg%NetBSD.org@localhost>
date: Sun Feb 04 09:03:23 2018 +0000
description:
updates for GCC 6.4:
identd has aliasing violations, use -fno-strict-aliasing.
newfs_msdos's getbpbinfo() has missing {} issues.
sysctl's kern_cp_id() has missing {} issues.
diffstat:
libexec/identd/Makefile | 5 ++++-
sbin/newfs_msdos/mkfs_msdos.c | 7 ++++---
sbin/sysctl/sysctl.c | 7 ++++---
3 files changed, 12 insertions(+), 7 deletions(-)
diffs (81 lines):
diff -r 5de8f820562d -r bc608fd65115 libexec/identd/Makefile
--- a/libexec/identd/Makefile Sun Feb 04 09:01:12 2018 +0000
+++ b/libexec/identd/Makefile Sun Feb 04 09:03:23 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2016/12/11 15:43:48 christos Exp $
+# $NetBSD: Makefile,v 1.16 2018/02/04 09:03:23 mrg Exp $
.include <bsd.own.mk>
@@ -26,4 +26,7 @@
DPADD+=${LIBNPF} ${LIBPROP}
.endif
+# XXX
+COPTS+= -fno-strict-aliasing
+
.include <bsd.prog.mk>
diff -r 5de8f820562d -r bc608fd65115 sbin/newfs_msdos/mkfs_msdos.c
--- a/sbin/newfs_msdos/mkfs_msdos.c Sun Feb 04 09:01:12 2018 +0000
+++ b/sbin/newfs_msdos/mkfs_msdos.c Sun Feb 04 09:03:23 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mkfs_msdos.c,v 1.13 2017/04/14 15:39:29 christos Exp $ */
+/* $NetBSD: mkfs_msdos.c,v 1.14 2018/02/04 09:03:23 mrg Exp $ */
/*
* Copyright (c) 1998 Robert Nordier
@@ -37,7 +37,7 @@
static const char rcsid[] =
"$FreeBSD: src/sbin/newfs_msdos/newfs_msdos.c,v 1.15 2000/10/10 01:49:37 wollman Exp $";
#else
-__RCSID("$NetBSD: mkfs_msdos.c,v 1.13 2017/04/14 15:39:29 christos Exp $");
+__RCSID("$NetBSD: mkfs_msdos.c,v 1.14 2018/02/04 09:03:23 mrg Exp $");
#endif
#endif /* not lint */
@@ -896,10 +896,11 @@
return -1;
bpb->spt = nsectors;
}
- if (!bpb->hds)
+ if (!bpb->hds) {
if (ckgeom(fname, ntracks, "drive heads") == -1)
return -1;
bpb->hds = ntracks;
+ }
if (!bpb->bsec)
bpb->bsec = size;
diff -r 5de8f820562d -r bc608fd65115 sbin/sysctl/sysctl.c
--- a/sbin/sysctl/sysctl.c Sun Feb 04 09:01:12 2018 +0000
+++ b/sbin/sysctl/sysctl.c Sun Feb 04 09:03:23 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysctl.c,v 1.159 2017/04/13 14:46:32 christos Exp $ */
+/* $NetBSD: sysctl.c,v 1.160 2018/02/04 09:03:23 mrg Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
#if 0
static char sccsid[] = "@(#)sysctl.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: sysctl.c,v 1.159 2017/04/13 14:46:32 christos Exp $");
+__RCSID("$NetBSD: sysctl.c,v 1.160 2018/02/04 09:03:23 mrg Exp $");
#endif
#endif /* not lint */
@@ -2454,12 +2454,13 @@
sizeof(u_int64_t),
DISPLAY_VALUE);
else if (Aflag) {
- for (i = 0; i < n; i++)
+ for (i = 0; i < n; i++) {
(void)snprintf(s, sizeof(s), "%s%s%d", sname, sep, i);
tname = s;
display_number(&node, tname, &cp_id[i],
sizeof(u_int64_t),
DISPLAY_VALUE);
+ }
}
else {
if (xflag || rflag)
Home |
Main Index |
Thread Index |
Old Index