Module Name:    src
Committed By:   mrg
Date:           Sun Nov 10 03:44:03 UTC 2013

Modified Files:
        src/sys/dev/pci: tdvfb.c

Log Message:
- 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


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/tdvfb.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/pci/tdvfb.c
diff -u src/sys/dev/pci/tdvfb.c:1.6 src/sys/dev/pci/tdvfb.c:1.7
--- src/sys/dev/pci/tdvfb.c:1.6	Tue Jul 30 19:21:50 2013
+++ src/sys/dev/pci/tdvfb.c	Sun Nov 10 03:44:03 2013
@@ -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 @@ tdvfb_videomode_set(struct tdvfb_softc *
 	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 @@ tdvfb_gendac_detect(struct tdvfb_softc *
 	    (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;

Reply via email to