From owner-freebsd-current@FreeBSD.ORG Thu Dec 25 10:53:08 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6FDAC16A4CE for ; Thu, 25 Dec 2003 10:53:08 -0800 (PST) Received: from mailhub.fokus.fraunhofer.de (mailhub.fokus.fraunhofer.de [193.174.154.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3468743D31 for ; Thu, 25 Dec 2003 10:53:06 -0800 (PST) (envelope-from brandt@fokus.gmd.de) Received: from fokus.gmd.de (dial-05 [193.174.152.250])hBPIqsL03114; Thu, 25 Dec 2003 19:52:54 +0100 (MET) Message-ID: <3FEB328D.5020803@fokus.gmd.de> Date: Thu, 25 Dec 2003 19:55:09 +0100 From: harti brandt User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4a) Gecko/20030401 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Craig Rodrigues References: <20031224005024.GA78326@crodrigues.org> In-Reply-To: <20031224005024.GA78326@crodrigues.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Thu, 25 Dec 2003 17:57:07 -0800 cc: current@freebsd.org Subject: Re: Error building if_fatm.c X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2003 18:53:08 -0000 Craig Rodrigues wrote: >Hi, > >I just cvsup'd current and got the following error when >building if_fatm.c: > >cc -c -O -pipe -mcpu=pentiumpro -Wall -Wredundant-decls -Wnested-externs -Wstric >t-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fforma >t-extensions -std=c99 -g -nostdinc -I- -I. -I/usr/src/sys -I/usr/src/sys/contri >b/dev/acpica -I/usr/src/sys/contrib/ipfilter -I/usr/src/sys/contrib/dev/ath -I/u >sr/src/sys/contrib/dev/ath/freebsd -I/usr/src/sys/contrib/ngatm -D_KERNEL -inclu >de opt_global.h -fno-common -finline-limit=15000 -fno-strict-aliasing -mno-alig >n-long-strings -mpreferred-stack-boundary=2 -ffreestanding -Werror /usr/src/sys >/dev/fatm/if_fatm.c >/usr/src/sys/dev/fatm/if_fatm.c: In function `fatm_open_vcc': >/usr/src/sys/dev/fatm/if_fatm.c:2285: warning: comparison between pointer and integer >*** Error code 1 > > >I think that this is due to the new definition of NULL >in . > >Here is the offending code: > > 2227 int error; > > 2285 if (error != NULL) { > 2286 sc->vccs[op->param.vci] = NULL; > 2287 sc->open_vccs--; > 2288 goto done; > 2289 } > > >Is the correct fix this? > > >--- sys/dev/fatm/if_fatm.c.orig Tue Dec 23 19:46:08 2003 >+++ sys/dev/fatm/if_fatm.c Tue Dec 23 19:46:18 2003 >@@ -2282,7 +2282,7 @@ > sc->open_vccs++; > > error = fatm_load_vc(sc, vc); >- if (error != NULL) { >+ if (error != 0) { > sc->vccs[op->param.vci] = NULL; > sc->open_vccs--; > goto done; > > > > Looks ok. harti