FreeBSD Bugzilla – Attachment 15569 Details for
Bug 28824
[patch] src/usr.sbin/burncd warning clean up
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 2.72 KB, created by
mike
on 2001-07-08 20:00:05 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
mike
Created:
2001-07-08 20:00:05 UTC
Size:
2.72 KB
patch
obsolete
>Index: burncd/Makefile >=================================================================== >RCS file: /home/ncvs/src/usr.sbin/burncd/Makefile,v >retrieving revision 1.4 >diff -u -r1.4 Makefile >--- burncd/Makefile 2001/03/26 14:39:38 1.4 >+++ burncd/Makefile 2001/07/08 18:25:49 >@@ -1,6 +1,7 @@ > # $FreeBSD: src/usr.sbin/burncd/Makefile,v 1.4 2001/03/26 14:39:38 ru Exp $ > > PROG= burncd >+WARNS?= 2 > MAN= burncd.8 > > .include <bsd.prog.mk> >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 >@@ -56,7 +56,7 @@ > { > int ch, arg, addr; > int eject=0, list=0, multi=0, preemp=0, speed=1, test_write=0; >- char *devname = "/dev/acd0c", *prog_name; >+ const char *dev_name = "/dev/acd0c", *prog_name; > int block_size = 0; > > prog_name = argv[0]; >@@ -67,7 +67,7 @@ > break; > > case 'f': >- devname = optarg; >+ dev_name = optarg; > break; > > case 'l': >@@ -106,8 +106,8 @@ > if (argc == 0) > usage(prog_name); > >- if ((fd = open(devname, O_RDWR, 0)) < 0) >- err(EX_NOINPUT, "open(%s)", devname); >+ if ((fd = open(dev_name, O_RDWR, 0)) < 0) >+ err(EX_NOINPUT, "open(%s)", dev_name); > > if (ioctl(fd, CDRIOCWRITESPEED, &speed) < 0) > err(EX_IOERR, "ioctl(CDRIOCWRITESPEED)"); >@@ -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); > > break; >@@ -207,7 +207,7 @@ > while (fgets(file_buf, sizeof(file_buf), fp) != NULL) { > if (*file_buf == '#' || *file_buf == '\n') > continue; >- if (eol = strchr(file_buf, '\n')) >+ if ((eol = strchr(file_buf, '\n')) != NULL) > *eol = NULL; > write_file(file_buf, block_size); > } >@@ -233,7 +233,7 @@ > } > > void >-cleanup(int dummy) >+cleanup(int dummy __unused) > { > if (ioctl(fd, CDRIOCSETBLOCKSIZE, &saved_block_size) < 0) > err(EX_IOERR, "ioctl(CDRIOCSETBLOCKSIZE)"); >@@ -252,7 +252,7 @@ > { > int addr, count, file, filesize, size; > char buf[2352*BLOCKS]; >- struct stat stat; >+ struct stat filestat; > static int cdopen, done_stdin, tot_size = 0; > > if (!strcmp(name, "-")) { >@@ -278,9 +278,9 @@ > if (ioctl(fd, CDRIOCNEXTWRITEABLEADDR, &addr) < 0) > err(EX_IOERR, "ioctl(CDRIOCNEXTWRITEABLEADDR)"); > >- if (fstat(file, &stat) < 0) >+ if (fstat(file, &filestat) < 0) > err(EX_IOERR, "fstat(%s)", name); >- filesize = stat.st_size / 1024; >+ filesize = filestat.st_size / 1024; > > if (!quiet) { > fprintf(stderr, "next writeable LBA %d\n", addr);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 28824
: 15569