Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci - avoid an uninitialised variable warning



details:   https://anonhg.NetBSD.org/src/rev/8e6faa32debc
branches:  trunk
changeset: 791250:8e6faa32debc
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Nov 10 03:44:03 2013 +0000

description:
- avoid an uninitialised variable warning
- fix a series of comparisions that duplicated one test and
  did not test one variable (found by gcc set-but-unused.)
ok rkujawa

diffstat:

 sys/dev/pci/tdvfb.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (36 lines):

diff -r a32948c1d04d -r 8e6faa32debc sys/dev/pci/tdvfb.c
--- a/sys/dev/pci/tdvfb.c       Sun Nov 10 03:38:58 2013 +0000
+++ b/sys/dev/pci/tdvfb.c       Sun Nov 10 03:44:03 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tdvfb.c,v 1.6 2013/07/30 19:21:50 macallan Exp $       */
+/*     $NetBSD: tdvfb.c,v 1.7 2013/11/10 03:44:03 mrg Exp $    */
 
 /*
  * Copyright (c) 2012 The NetBSD Foundation, Inc.   
@@ -49,7 +49,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tdvfb.c,v 1.6 2013/07/30 19:21:50 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tdvfb.c,v 1.7 2013/11/10 03:44:03 mrg Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -348,6 +348,8 @@
        uint16_t hbackporch, hsyncon, hsyncoff; 
        uint16_t yheight, xwidth; 
 
+       fbiinit5 = fbiinit6 = 0; /* XXX gcc */
+
        yheight = sc->sc_videomode->vdisplay;
        xwidth = sc->sc_videomode->hdisplay;
 
@@ -746,7 +748,7 @@
            (n_f1 == TDV_GENDAC_DFLT_F1_N) &&
            (m_f7 == TDV_GENDAC_DFLT_F7_M) &&
            (n_f7 == TDV_GENDAC_DFLT_F7_N) &&
-           (n_fb == TDV_GENDAC_DFLT_FB_N) &&
+           (m_fb == TDV_GENDAC_DFLT_FB_M) &&
            (n_fb == TDV_GENDAC_DFLT_FB_N) ) {
                aprint_normal_dev(sc->sc_dev, "ICS 5342 GENDAC\n");
                return true;



Home | Main Index | Thread Index | Old Index