Module Name: src
Committed By: macallan
Date: Tue Jul 30 19:24:26 UTC 2013
Modified Files:
src/sys/dev/ic: ct65550.c
src/sys/dev/sbus: agten.c
src/sys/dev/sun: cgsix.c
Log Message:
avoid uninitialized use of defattr
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/ic/ct65550.c
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/sbus/agten.c
cvs rdiff -u -r1.60 -r1.61 src/sys/dev/sun/cgsix.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/ic/ct65550.c
diff -u src/sys/dev/ic/ct65550.c:1.6 src/sys/dev/ic/ct65550.c:1.7
--- src/sys/dev/ic/ct65550.c:1.6 Wed Aug 22 21:17:58 2012
+++ src/sys/dev/ic/ct65550.c Tue Jul 30 19:24:26 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: ct65550.c,v 1.6 2012/08/22 21:17:58 macallan Exp $ */
+/* $NetBSD: ct65550.c,v 1.7 2013/07/30 19:24:26 macallan Exp $ */
/*
* Copyright (c) 2006 Michael Lorenz
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ct65550.c,v 1.6 2012/08/22 21:17:58 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ct65550.c,v 1.7 2013/07/30 19:24:26 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -259,7 +259,9 @@ chipsfb_do_attach(struct chipsfb_softc *
/* do some minimal setup to avoid weirdnesses later */
vcons_init_screen(&sc->vd, &chipsfb_console_screen, 1,
&defattr);
- }
+ } else
+ (*ri->ri_ops.allocattr)(ri, 0, 0, 0, &defattr);
+
}
rasops_unpack_attr(defattr, &fg, &bg, &ul);
Index: src/sys/dev/sbus/agten.c
diff -u src/sys/dev/sbus/agten.c:1.30 src/sys/dev/sbus/agten.c:1.31
--- src/sys/dev/sbus/agten.c:1.30 Tue Oct 23 11:53:18 2012
+++ src/sys/dev/sbus/agten.c Tue Jul 30 19:24:26 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: agten.c,v 1.30 2012/10/23 11:53:18 macallan Exp $ */
+/* $NetBSD: agten.c,v 1.31 2013/07/30 19:24:26 macallan Exp $ */
/*-
* Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: agten.c,v 1.30 2012/10/23 11:53:18 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: agten.c,v 1.31 2013/07/30 19:24:26 macallan Exp $");
/*
* a driver for the Fujitsu AG-10e SBus framebuffer
@@ -350,7 +350,9 @@ agten_attach(device_t parent, device_t d
/* do some minimal setup to avoid weirdnesses later */
vcons_init_screen(&sc->vd, &sc->sc_console_screen, 1,
&defattr);
- }
+ } else
+ (*ri->ri_ops.allocattr)(ri, 0, 0, 0, &defattr);
+
glyphcache_init(&sc->sc_gc,
sc->sc_height + 5,
(0x400000 / sc->sc_stride) - sc->sc_height - 5,
Index: src/sys/dev/sun/cgsix.c
diff -u src/sys/dev/sun/cgsix.c:1.60 src/sys/dev/sun/cgsix.c:1.61
--- src/sys/dev/sun/cgsix.c:1.60 Tue Nov 13 20:47:58 2012
+++ src/sys/dev/sun/cgsix.c Tue Jul 30 19:24:26 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: cgsix.c,v 1.60 2012/11/13 20:47:58 macallan Exp $ */
+/* $NetBSD: cgsix.c,v 1.61 2013/07/30 19:24:26 macallan Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cgsix.c,v 1.60 2012/11/13 20:47:58 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cgsix.c,v 1.61 2013/07/30 19:24:26 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -653,7 +653,8 @@ cg6attach(struct cgsix_softc *sc, const
/* do some minimal setup to avoid weirdnesses later */
vcons_init_screen(&sc->vd, &cg6_console_screen, 1,
&defattr);
- }
+ } else
+ (*ri->ri_ops.allocattr)(ri, 0, 0, 0, &defattr);
if (ri->ri_flg & RI_ENABLE_ALPHA) {
glyphcache_init(&sc->sc_gc, sc->sc_height + 5,
(sc->sc_ramsize / sc->sc_stride) -