From owner-freebsd-bugs Mon Jul 9 3:20: 4 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id C19AA37B407 for ; Mon, 9 Jul 2001 03:20:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.3/8.11.3) id f69AK2t23114; Mon, 9 Jul 2001 03:20:02 -0700 (PDT) (envelope-from gnats) Date: Mon, 9 Jul 2001 03:20:02 -0700 (PDT) Message-Id: <200107091020.f69AK2t23114@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Bruce Evans Subject: Re: bin/28824: [patch] src/usr.sbin/burncd warning clean up Reply-To: Bruce Evans Sender: owner-freebsd-bugs@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 bin/28824; it has been noted by GNATS. From: Bruce Evans To: Mike Barcroft 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