From owner-freebsd-current@FreeBSD.ORG Tue Dec 23 16:50:18 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 7E93816A4CE; Tue, 23 Dec 2003 16:50:18 -0800 (PST) Received: from rwcrmhc13.comcast.net (rwcrmhc13.comcast.net [204.127.198.39]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5B67E43D5C; Tue, 23 Dec 2003 16:50:17 -0800 (PST) (envelope-from rodrigc@crodrigues.org) Received: from h00609772adf0.ne.client2.attbi.com ([66.31.45.197]) by comcast.net (rwcrmhc13) with ESMTP id <200312240050160150067vlte>; Wed, 24 Dec 2003 00:50:16 +0000 Received: from h00609772adf0.ne.client2.attbi.com (localhost.crodrigues.org [127.0.0.1])hBO0oOZ3078416; Tue, 23 Dec 2003 19:50:24 -0500 (EST) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: (from rodrigc@localhost)hBO0oOaJ078415; Tue, 23 Dec 2003 19:50:24 -0500 (EST) (envelope-from rodrigc) Date: Tue, 23 Dec 2003 19:50:24 -0500 From: Craig Rodrigues To: freebsd-current@freebsd.org Message-ID: <20031224005024.GA78326@crodrigues.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i cc: harti@freebsd.org cc: peter@freebsd.org Subject: 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: Wed, 24 Dec 2003 00:50:18 -0000 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; -- Craig Rodrigues http://crodrigues.org rodrigc@crodrigues.org