Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/pic avoid some uninitialised variable warni...



details:   https://anonhg.NetBSD.org/src/rev/337f0f38c28b
branches:  trunk
changeset: 766795:337f0f38c28b
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sat Jul 02 13:08:25 2011 +0000

description:
avoid some uninitialised variable warnings from GCC 4.5.  i'm pretty
sure they can't happen in practise, but i can see why GCC isn't sure.

diffstat:

 sys/arch/powerpc/pic/pic_distopenpic.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 8516b193da1a -r 337f0f38c28b sys/arch/powerpc/pic/pic_distopenpic.c
--- a/sys/arch/powerpc/pic/pic_distopenpic.c    Sat Jul 02 07:28:08 2011 +0000
+++ b/sys/arch/powerpc/pic/pic_distopenpic.c    Sat Jul 02 13:08:25 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pic_distopenpic.c,v 1.6 2011/06/20 06:21:45 matt Exp $ */
+/*     $NetBSD: pic_distopenpic.c,v 1.7 2011/07/02 13:08:25 mrg Exp $ */
 
 /*-
  * Copyright (c) 2008 Tim Rightnour
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pic_distopenpic.c,v 1.6 2011/06/20 06:21:45 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pic_distopenpic.c,v 1.7 2011/07/02 13:08:25 mrg Exp $");
 
 #include "opt_openpic.h"
 #include "opt_interrupt.h"
@@ -174,7 +174,7 @@
 distopic_establish_irq(struct pic_ops *pic, int irq, int type, int pri)
 {
        struct openpic_ops *opic = (struct openpic_ops *)pic;
-       int isu, realirq, realpri = max(1, min(15, pri));
+       int isu, realirq = -1, realpri = max(1, min(15, pri));
        uint32_t x;
 
        isu = opic_isu_from_irq(opic, irq, &realirq);
@@ -196,7 +196,7 @@
 distopic_enable_irq(struct pic_ops *pic, int irq, int type)
 {
        struct openpic_ops *opic = (struct openpic_ops *)pic;
-       int isu, realirq;
+       int isu, realirq = -1;
        u_int x;
 
        isu = opic_isu_from_irq(opic, irq, &realirq);
@@ -210,7 +210,7 @@
 distopic_disable_irq(struct pic_ops *pic, int irq)
 {
        struct openpic_ops *opic = (struct openpic_ops *)pic;
-       int isu, realirq;
+       int isu, realirq = -1;
        u_int x;
 
        isu = opic_isu_from_irq(opic, irq, &realirq);



Home | Main Index | Thread Index | Old Index