Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/oea Avoid an unused variable warning for th...



details:   https://anonhg.NetBSD.org/src/rev/0137c87c7f73
branches:  trunk
changeset: 959583:0137c87c7f73
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Feb 19 17:58:43 2021 +0000

description:
Avoid an unused variable warning for the not-building-macppc case.

diffstat:

 sys/arch/powerpc/oea/ofw_consinit.c |  10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diffs (41 lines):

diff -r 9c6f7031b6aa -r 0137c87c7f73 sys/arch/powerpc/oea/ofw_consinit.c
--- a/sys/arch/powerpc/oea/ofw_consinit.c       Fri Feb 19 17:46:53 2021 +0000
+++ b/sys/arch/powerpc/oea/ofw_consinit.c       Fri Feb 19 17:58:43 2021 +0000
@@ -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 @@
        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 @@
 #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;



Home | Main Index | Thread Index | Old Index