Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/adb fix non-debug build



details:   https://anonhg.NetBSD.org/src/rev/c2464953abbb
branches:  trunk
changeset: 454380:c2464953abbb
user:      macallan <macallan%NetBSD.org@localhost>
date:      Sun Sep 15 16:16:36 2019 +0000

description:
fix non-debug build

diffstat:

 sys/dev/adb/adb_ktm.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (42 lines):

diff -r 0e535b7b4b9d -r c2464953abbb sys/dev/adb/adb_ktm.c
--- a/sys/dev/adb/adb_ktm.c     Sun Sep 15 15:27:50 2019 +0000
+++ b/sys/dev/adb/adb_ktm.c     Sun Sep 15 16:16:36 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: adb_ktm.c,v 1.1 2019/09/08 05:55:15 macallan Exp $     */
+/*     $NetBSD: adb_ktm.c,v 1.2 2019/09/15 16:16:36 macallan Exp $     */
 
 /*-
  * Copyright (c) 2019 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: adb_ktm.c,v 1.1 2019/09/08 05:55:15 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: adb_ktm.c,v 1.2 2019/09/15 16:16:36 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -175,7 +175,6 @@
 {
        const struct sysctlnode *me = NULL, *node = NULL;
        int ret;
-       uint8_t addr;
 
        /* Found Kensington Turbo Mouse */
 
@@ -212,7 +211,6 @@
        /* this seems to be the most reasonable default */
        uint8_t data[8] = { 0xa5, 0x0e, 0, 0, 1, 0xff, 0xff, 0 };
 
-       addr = sc->sc_adbdev->current_addr;
        memcpy(sc->sc_config, data, sizeof(data));
 
        sc->sc_left = 1;
@@ -221,6 +219,7 @@
        ktm_buttons(sc);
 
 #ifdef KTM_DEBUG
+       int addr = sc->sc_adbdev->current_addr;
        {
                int i;
                ktm_send_sync(sc, ADBTALK(addr, 2), 0, NULL);



Home | Main Index | Thread Index | Old Index