NetBSD Problem Report #41316

From www@NetBSD.org  Fri May  1 02:54:51 2009
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 3A74463BC38
	for <gnats-bugs@gnats.netbsd.org>; Fri,  1 May 2009 02:54:51 +0000 (UTC)
Message-Id: <20090501025450.EBE4763B8A5@www.NetBSD.org>
Date: Fri,  1 May 2009 02:54:50 +0000 (UTC)
From: lidl@pix.net
Reply-To: lidl@pix.net
To: gnats-bugs@NetBSD.org
Subject: cannot compile sys/netinet6/ip6_input.c with gcc 4.4.1-prerelease
X-Send-Pr-Version: www-1.0

>Number:         41316
>Category:       kern
>Synopsis:       cannot compile sys/netinet6/ip6_input.c with gcc 4.4.1-prerelease
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 01 02:55:00 +0000 2009
>Closed-Date:    Wed May 06 01:05:06 +0000 2009
>Last-Modified:  Wed May 06 01:05:06 +0000 2009
>Originator:     Kurt Lidl
>Release:        netbsd-5-RC4
>Organization:
>Environment:
cross-compile of netbsd-5-RC4 from solaris for a vax
I noticed the problem compiling for a vax, but it's
a MI kernel file.
>Description:
I whacked up a gcc 4.4.1-prerelease to build the netbsd-vax
tree.  (I've not updated to netbsd-5 release, but will soon.)

Anyway, it complains thusly:

#   compile  GENERIC/ip6_input.o
/nbsd/vax-5/tools/bin/vax--netbsdelf-gcc -fno-pic -ffreestanding -fno-zero-initialized-in-bss -g -pipe -O2 -std=gnu99 -fno-strict-aliasing -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-unreachable-code -Wno-sign-compare -Wno-pointer-sign -Wno-attributes -Werror -D_VAX_INLINE_ -I. -I/nbsd/nbsd-5/sys/../common/include -I/nbsd/nbsd-5/sys/arch -I/nbsd/nbsd-5/sys -nostdinc -DLKM -DMAXUSERS=8 -D_KERNEL -D_KERNEL_OPT -I/nbsd/nbsd-5/sys/lib/libkern/../../../common/lib/libc/quad -I/nbsd/nbsd-5/sys/lib/libkern/../../../common/lib/libc/string -I/nbsd/nbsd-5/sys/lib/libkern/../../../common/lib/libc/arch/vax/string -I/nbsd/nbsd-5/sys/dist/ipf -c /nbsd/nbsd-5/sys/netinet6/ip6_input.c
cc1: warnings being treated as errors
/nbsd/nbsd-5/sys/netinet6/ip6_input.c: In function 'ip6_savecontrol':
/nbsd/nbsd-5/sys/netinet6/ip6_input.c:1260: error: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~'
/nbsd/nbsd-5/sys/netinet6/ip6_input.c:1271: error: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~'


>How-To-Repeat:
Do the above compile.

>Fix:
My patch gets it to compile, but I'm not sure that it is
the true intent of the code.  Perhaps someone could review
and let me know.

Index: sys/netinet6/ip6_input.c
===================================================================
RCS file: /cvsroot/src/sys/netinet6/ip6_input.c,v
retrieving revision 1.122
diff -u -3 -r1.122 ip6_input.c
--- sys/netinet6/ip6_input.c    21 Aug 2008 15:34:10 -0000      1.122
+++ sys/netinet6/ip6_input.c    30 Apr 2009 02:45:48 -0000
@@ -1257,7 +1257,7 @@

                        switch (nxt) {
                        case IPPROTO_DSTOPTS:
-                               if (!in6p->in6p_flags & IN6P_DSTOPTS)
+                               if (!(in6p->in6p_flags & IN6P_DSTOPTS))
                                        break;

                                *mp = sbcreatecontrol((void *)ip6e, elen,
@@ -1268,7 +1268,7 @@
                                break;

                        case IPPROTO_ROUTING:
-                               if (!in6p->in6p_flags & IN6P_RTHDR)
+                               if (!(in6p->in6p_flags & IN6P_RTHDR))
                                        break;

                                *mp = sbcreatecontrol((void *)ip6e, elen,

>Release-Note:

>Audit-Trail:
From: Martin Husemann <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/41316 CVS commit: src/sys/netinet6
Date: Fri, 1 May 2009 03:23:39 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Fri May  1 03:23:39 UTC 2009

 Modified Files:
 	src/sys/netinet6: ip6_input.c

 Log Message:
 Add missing paranthesis - from Kurt Lidl in PR port-vax/41316


 To generate a diff of this commit:
 cvs rdiff -u -r1.126 -r1.127 src/sys/netinet6/ip6_input.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: port-vax-maintainer->kern-bug-people
Responsible-Changed-By: martin@NetBSD.org
Responsible-Changed-When: Fri, 01 May 2009 03:43:39 +0000
Responsible-Changed-Why:
not vax specific


State-Changed-From-To: open->pending-pullups
State-Changed-By: martin@NetBSD.org
State-Changed-When: Fri, 01 May 2009 03:43:39 +0000
State-Changed-Why:
waiting on pullup-5 #733


From: Manuel Bouyer <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/41316 CVS commit: [netbsd-5] src/sys/netinet6
Date: Sun, 3 May 2009 13:22:23 +0000

 Module Name:	src
 Committed By:	bouyer
 Date:		Sun May  3 13:22:22 UTC 2009

 Modified Files:
 	src/sys/netinet6 [netbsd-5]: ip6_input.c

 Log Message:
 Pull up following revision(s) (requested by martin in ticket #733):
 	sys/netinet6/ip6_input.c: revision 1.127
 Add missing paranthesis - from Kurt Lidl in PR port-vax/41316


 To generate a diff of this commit:
 cvs rdiff -u -r1.122 -r1.122.4.1 src/sys/netinet6/ip6_input.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Manuel Bouyer <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/41316 CVS commit: [netbsd-5-0] src/sys/netinet6
Date: Sun, 3 May 2009 13:39:21 +0000

 Module Name:	src
 Committed By:	bouyer
 Date:		Sun May  3 13:39:21 UTC 2009

 Modified Files:
 	src/sys/netinet6 [netbsd-5-0]: ip6_input.c

 Log Message:
 Pull up following revision(s) (requested by martin in ticket #733):
 	sys/netinet6/ip6_input.c: revision 1.127
 Add missing paranthesis - from Kurt Lidl in PR port-vax/41316


 To generate a diff of this commit:
 cvs rdiff -u -r1.122 -r1.122.8.1 src/sys/netinet6/ip6_input.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: pending-pullups->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 06 May 2009 01:05:06 +0000
State-Changed-Why:
pullup completed; thanks.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.