Subject: kern/23308: altq_hfsc.c fails to compile in -current - simple fix attatched
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <waddell@caravan.com>
List: netbsd-bugs
Date: 10/29/2003 20:15:13
>Number:         23308
>Category:       kern
>Synopsis:       altq_hfsc.c fails to compile in -current - simple fix attatched
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 29 20:16:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Harry Waddell
>Release:        i386-current
>Organization:
Caravan Electronic Publishing
>Environment:
NetBSD slump 1.6ZD NetBSD 1.6ZD (CARAVANMP) #19: Sat Oct 18 13:05:40 PDT 2003  waddell@slump:/usr/src/sys/arch/i386/compile/CARAVANMP i386

>Description:
/usr/src/sys/altq/altq_hfsc.c fails to compile since the move to gcc3 on i386 due to a warning about potentail use of two unititialized struct pointers

 struct internal_sc *rsc_tmp, *fsc_tmp;

at line 491.


>How-To-Repeat:
build i386-current with ALTQ using HFSC.
>Fix:
--- /usr/src/sys/altq/altq_hfsc.c-orig  2003-10-29 10:20:33.000000000 -0800
+++ /usr/src/sys/altq/altq_hfsc.c       2003-10-29 10:22:33.000000000 -0800
@@ -487,7 +487,7 @@
        struct hfsc_class *cl;
        struct service_curve *rsc, *fsc;
 {
-       struct internal_sc *rsc_tmp, *fsc_tmp;
+       struct internal_sc *rsc_tmp=NULL, *fsc_tmp=NULL;
        int s;
 
        if (rsc != NULL && (rsc->m1 != 0 || rsc->m2 != 0) &&

>Release-Note:
>Audit-Trail:
>Unformatted: