Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/fdt Fix non-DIAGNOSTIC build
details: https://anonhg.NetBSD.org/src/rev/564f3d41c0b1
branches: trunk
changeset: 351214:564f3d41c0b1
user: skrll <skrll%NetBSD.org@localhost>
date: Tue Feb 07 09:14:52 2017 +0000
description:
Fix non-DIAGNOSTIC build
diffstat:
sys/dev/fdt/fdtbus.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r e243bda078d4 -r 564f3d41c0b1 sys/dev/fdt/fdtbus.c
--- a/sys/dev/fdt/fdtbus.c Tue Feb 07 04:27:43 2017 +0000
+++ b/sys/dev/fdt/fdtbus.c Tue Feb 07 09:14:52 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fdtbus.c,v 1.2 2015/12/16 19:33:16 jmcneill Exp $ */
+/* $NetBSD: fdtbus.c,v 1.3 2017/02/07 09:14:52 skrll Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdtbus.c,v 1.2 2015/12/16 19:33:16 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdtbus.c,v 1.3 2017/02/07 09:14:52 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -93,7 +93,7 @@
fdt_scan(device_t self, const struct fdt_attach_args *faa, const char *devname)
{
const int phandle = faa->faa_phandle;
- int len, alen, child;
+ int len, child;
char *name, *status;
for (child = OF_child(phandle); child; child = OF_peer(child)) {
@@ -109,7 +109,7 @@
len = OF_getproplen(child, "status");
if (len > 0) {
status = kmem_zalloc(len, KM_SLEEP);
- alen = OF_getprop(child, "status", status, len);
+ int alen __diagused = OF_getprop(child, "status", status, len);
KASSERT(alen == len);
const bool okay_p = strcmp(status, "okay") == 0 ||
strcmp(status, "ok") == 0;
Home |
Main Index |
Thread Index |
Old Index