Module Name: src
Committed By: thorpej
Date: Fri Feb 19 17:58:43 UTC 2021
Modified Files:
src/sys/arch/powerpc/oea: ofw_consinit.c
Log Message:
Avoid an unused variable warning for the not-building-macppc case.
To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/powerpc/oea/ofw_consinit.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/arch/powerpc/oea/ofw_consinit.c
diff -u src/sys/arch/powerpc/oea/ofw_consinit.c:1.21 src/sys/arch/powerpc/oea/ofw_consinit.c:1.22
--- src/sys/arch/powerpc/oea/ofw_consinit.c:1.21 Fri Feb 19 05:23:53 2021
+++ src/sys/arch/powerpc/oea/ofw_consinit.c Fri Feb 19 17:58:43 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ofw_consinit.c,v 1.21 2021/02/19 05:23:53 thorpej Exp $ */
+/* $NetBSD: ofw_consinit.c,v 1.22 2021/02/19 17:58:43 thorpej Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofw_consinit.c,v 1.21 2021/02/19 05:23:53 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw_consinit.c,v 1.22 2021/02/19 17:58:43 thorpej Exp $");
#include "adb.h"
#include "adbkbd.h"
@@ -134,12 +134,10 @@ cninit(void)
OFPRINTF("console type: %s\n", name);
if (strcmp(name, "serial") == 0) {
- struct consdev *cp;
-
#ifdef PMAC_G5
/* The MMU hasn't been initialized yet, use failsafe for now */
extern struct consdev failsafe_cons;
- cp = &failsafe_cons;
+ struct consdev *cp = &failsafe_cons;
cn_tab = cp;
(*cp->cn_probe)(cp);
(*cp->cn_init)(cp);
@@ -150,7 +148,7 @@ cninit(void)
#if (NZSTTY > 0) && !defined(MAMBO)
OF_getprop(console_node, "name", name, sizeof(name));
if (strcmp(name, "ch-a") == 0 || strcmp(name, "ch-b") == 0) {
- cp = &consdev_zs;
+ struct consdev *cp = &consdev_zs;
(*cp->cn_probe)(cp);
(*cp->cn_init)(cp);
cn_tab = cp;