Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci initialize a variable before using it
details: https://anonhg.NetBSD.org/src/rev/09510b47ec34
branches: trunk
changeset: 778974:09510b47ec34
user: macallan <macallan%NetBSD.org@localhost>
date: Mon Apr 23 11:51:56 2012 +0000
description:
initialize a variable before using it
found by uebayasi@
now why did gcc warn him on x86 but not me on macppc?
diffstat:
sys/dev/pci/voodoofb.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r d803c9ecb3ee -r 09510b47ec34 sys/dev/pci/voodoofb.c
--- a/sys/dev/pci/voodoofb.c Mon Apr 23 11:25:03 2012 +0000
+++ b/sys/dev/pci/voodoofb.c Mon Apr 23 11:51:56 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: voodoofb.c,v 1.40 2012/03/15 03:12:51 macallan Exp $ */
+/* $NetBSD: voodoofb.c,v 1.41 2012/04/23 11:51:56 macallan Exp $ */
/*
* Copyright (c) 2005, 2006, 2012 Michael Lorenz
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: voodoofb.c,v 1.40 2012/03/15 03:12:51 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: voodoofb.c,v 1.41 2012/04/23 11:51:56 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1726,7 +1726,7 @@
* best one we can support
*/
if (sc->sc_videomode == NULL) {
- int n;
+ int n = 0;
struct videomode *m =
sc->sc_edid_info.edid_modes;
Home |
Main Index |
Thread Index |
Old Index