Module Name: src
Committed By: skrll
Date: Tue Feb 7 09:14:52 UTC 2017
Modified Files:
src/sys/dev/fdt: fdtbus.c
Log Message:
Fix non-DIAGNOSTIC build
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/fdt/fdtbus.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/fdt/fdtbus.c
diff -u src/sys/dev/fdt/fdtbus.c:1.2 src/sys/dev/fdt/fdtbus.c:1.3
--- src/sys/dev/fdt/fdtbus.c:1.2 Wed Dec 16 19:33:16 2015
+++ src/sys/dev/fdt/fdtbus.c Tue Feb 7 09:14:52 2017
@@ -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 <[email protected]>
@@ -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 @@ static void
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 @@ fdt_scan(device_t self, const struct fdt
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;