From owner-freebsd-ports Fri Jan 4 8:20: 8 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id A93EE37B41C for ; Fri, 4 Jan 2002 08:20:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g04GK2w98307; Fri, 4 Jan 2002 08:20:02 -0800 (PST) (envelope-from gnats) Date: Fri, 4 Jan 2002 08:20:02 -0800 (PST) Message-Id: <200201041620.g04GK2w98307@freefall.freebsd.org> To: freebsd-ports@FreeBSD.org Cc: From: Alan Eldridge Subject: Re: ports/33538: esound-0.2.23 doesn't build with gcc 3.0.2 Reply-To: Alan Eldridge Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR ports/33538; it has been noted by GNATS. From: Alan Eldridge To: Mack Cc: freebsd-gnats-submit@FreeBSD.ORG Subject: Re: ports/33538: esound-0.2.23 doesn't build with gcc 3.0.2 Date: Fri, 4 Jan 2002 11:09:20 -0500 On Fri, Jan 04, 2002 at 07:48:22AM -0800, Mack wrote: >rm -f .libs/esddsp.lo >gcc30 -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -DSYSCONFDIR=\"/usr/local/etc\" -pipe -mpentiumpro -O3 -c esddsp.c -fPIC -DPIC -o .libs/esddsp.lo >esddsp.c: In function `open': >esddsp.c:183: `mode_t' is promoted to `int' when passed through `...' >esddsp.c:183: (so you should pass `int' not `mode_t' to `va_arg') >*** Error code 1 Awww, jeez.... that's a bug in esddsp.c, alright. However, it is operationally benign because the x86 is a little-endian processor, so picking off 2 bytes for a mode_t is picking off the low-order 2 bytes of the int that was pushed on the stack. But yes, it should be fixed. ---8<-snip---8<-snip---8<-snip---8<-snip---8<-snip---8<-snip---8<--- --- esddsp.c.or Sun Nov 5 01:57:58 2000 +++ esddsp.c Fri Jan 4 11:07:31 2002 @@ -180,7 +180,7 @@ dsp_init (); va_start (args, flags); - mode = va_arg (args, mode_t); + mode = va_arg (args, unsigned); va_end (args); if (!strcmp (pathname, "/dev/dsp")) ---8<-snip---8<-snip---8<-snip---8<-snip---8<-snip---8<-snip---8<--- -- Alan Eldridge Pmmfmffmmfmp mmmpppppffmpmfpmpppff $PffMmmPppMpmPpfPpm mfpmmmmmfpmpmpppff. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message