Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Jul 2001 03:20:02 -0700 (PDT)
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/28824: [patch] src/usr.sbin/burncd warning clean up
Message-ID:  <200107091020.f69AK2t23114@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/28824; it has been noted by GNATS.

From: Bruce Evans <bde@zeta.org.au>
To: Mike Barcroft <mike@q9media.com>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG, sos@FreeBSD.ORG
Subject: Re: bin/28824: [patch] src/usr.sbin/burncd warning clean up
Date: Mon, 9 Jul 2001 20:08:41 +1000 (EST)

 > Index: burncd/burncd.c
 > ===================================================================
 > RCS file: /home/ncvs/src/usr.sbin/burncd/burncd.c,v
 > retrieving revision 1.13
 > diff -u -r1.13 burncd.c
 > --- burncd/burncd.c	2001/05/30 08:13:39	1.13
 > +++ burncd/burncd.c	2001/07/08 18:25:50
 > ...
 > @@ -134,7 +134,7 @@
 >  				err(EX_IOERR, "ioctl(CDIOREADTOCENTRY)");
 >  			if (ioctl(fd, CDRIOCNEXTWRITEABLEADDR, &addr) < 0) 
 >  				err(EX_IOERR, "ioctl(CDRIOCNEXTWRITEABLEADDR)");
 > -			fprintf(stderr, "%d, %d\n", 
 > +			fprintf(stderr, "%ul, %d\n", 
 >  				ntohl(entry.entry.addr.lba), addr);
 
 This breaks alphas.  ntohl() should return uint32_t (POSIX.1-200x-draft),
 but ntohl() actually returns unsigned long on i386's and in_addr_t on
 alphas, and both uint32_t and in_addr_t may be almost any unsigned integer
 type, so ntohl() should always be cast to unsigned long (possibly spelled
 as u_long) for printing.
 
 Bruce
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107091020.f69AK2t23114>