svn commit: r231812 - in stable/9: libexec/tftpd sbin/camcontrol sbin/fsck_ffs sbin/fsirand sbin/gvinum sbin/ifconfig sbin/newfs sbin/ping6 sbin/tunefs usr.bin/brandelf usr.bin/bsdiff/bsdiff usr.bi...

Eitan Adler eadler at FreeBSD.org
Thu Feb 16 05:01:10 UTC 2012


Author: eadler
Date: Thu Feb 16 05:01:09 2012
New Revision: 231812
URL: http://svn.freebsd.org/changeset/base/231812

Log:
  MFC r22990[45] and r229907-r229919:
  
  - fix a variety of warnings produced by gcc46 when compiling world
  
  Approved by (cperciva)

Modified:
  stable/9/libexec/tftpd/tftp-io.c
  stable/9/sbin/camcontrol/camcontrol.c
  stable/9/sbin/camcontrol/modeedit.c
  stable/9/sbin/fsck_ffs/gjournal.c
  stable/9/sbin/fsirand/fsirand.c
  stable/9/sbin/gvinum/gvinum.c
  stable/9/sbin/ifconfig/ifieee80211.c
  stable/9/sbin/newfs/mkfs.c
  stable/9/sbin/ping6/ping6.c
  stable/9/sbin/tunefs/tunefs.c
  stable/9/usr.bin/brandelf/brandelf.c
  stable/9/usr.bin/bsdiff/bsdiff/bsdiff.c
  stable/9/usr.bin/ncplist/ncplist.c
  stable/9/usr.bin/netstat/if.c
  stable/9/usr.bin/split/split.c
Directory Properties:
  stable/9/libexec/tftpd/   (props changed)
  stable/9/sbin/camcontrol/   (props changed)
  stable/9/sbin/fsck_ffs/   (props changed)
  stable/9/sbin/fsirand/   (props changed)
  stable/9/sbin/geom/   (props changed)
  stable/9/sbin/gvinum/   (props changed)
  stable/9/sbin/ifconfig/   (props changed)
  stable/9/sbin/newfs/   (props changed)
  stable/9/sbin/ping6/   (props changed)
  stable/9/sbin/tunefs/   (props changed)
  stable/9/usr.bin/brandelf/   (props changed)
  stable/9/usr.bin/bsdiff/   (props changed)
  stable/9/usr.bin/ncplist/   (props changed)
  stable/9/usr.bin/netstat/   (props changed)
  stable/9/usr.bin/split/   (props changed)

Modified: stable/9/libexec/tftpd/tftp-io.c
==============================================================================
--- stable/9/libexec/tftpd/tftp-io.c	Thu Feb 16 05:00:41 2012	(r231811)
+++ stable/9/libexec/tftpd/tftp-io.c	Thu Feb 16 05:01:09 2012	(r231812)
@@ -323,7 +323,6 @@ send_ack(int fp, uint16_t block)
 {
 	struct tftphdr *tp;
 	int size;
-	char *bp;
 	char buf[MAXPKTSIZE];
 
 	if (debug&DEBUG_PACKETS)
@@ -332,7 +331,6 @@ send_ack(int fp, uint16_t block)
 	DROPPACKETn("send_ack", 0);
 
 	tp = (struct tftphdr *)buf;
-	bp = buf + 2;
 	size = sizeof(buf) - 2;
 	tp->th_opcode = htons((u_short)ACK);
 	tp->th_block = htons((u_short)block);

Modified: stable/9/sbin/camcontrol/camcontrol.c
==============================================================================
--- stable/9/sbin/camcontrol/camcontrol.c	Thu Feb 16 05:00:41 2012	(r231811)
+++ stable/9/sbin/camcontrol/camcontrol.c	Thu Feb 16 05:01:09 2012	(r231812)
@@ -3412,7 +3412,6 @@ ratecontrol(struct cam_device *device, i
 		}
 		if (spi && syncrate != -1) {
 			int prelim_sync_period;
-			u_int freq;
 
 			if ((cpi.hba_inquiry & PI_SDTR_ABLE) == 0) {
 				warnx("HBA is not capable of changing "
@@ -3437,7 +3436,6 @@ ratecontrol(struct cam_device *device, i
 				prelim_sync_period = 10000000 / syncrate;
 			spi->sync_period =
 				scsi_calc_syncparam(prelim_sync_period);
-			freq = scsi_calc_syncsrate(spi->sync_period);
 			didsettings++;
 		}
 		if (sata && syncrate != -1) {
@@ -4050,13 +4048,12 @@ retry:
 					RPL_LUNDATA_LUN_LUN_MASK);
 				break;
 			case RPL_LUNDATA_ATYP_EXTLUN: {
-				int field_len, field_len_code, eam_code;
+				int field_len_code, eam_code;
 
 				eam_code = lundata->luns[i].lundata[j] &
 					RPL_LUNDATA_EXT_EAM_MASK;
 				field_len_code = (lundata->luns[i].lundata[j] &
 					RPL_LUNDATA_EXT_LEN_MASK) >> 4;
-				field_len = field_len_code * 2;
 
 				if ((eam_code == RPL_LUNDATA_EXT_EAM_WK)
 				 && (field_len_code == 0x00)) {

Modified: stable/9/sbin/camcontrol/modeedit.c
==============================================================================
--- stable/9/sbin/camcontrol/modeedit.c	Thu Feb 16 05:00:41 2012	(r231811)
+++ stable/9/sbin/camcontrol/modeedit.c	Thu Feb 16 05:01:09 2012	(r231812)
@@ -869,7 +869,6 @@ mode_list(struct cam_device *device, int
 	  int retry_count, int timeout)
 {
 	u_int8_t data[MAX_COMMAND_SIZE];/* Buffer to hold sense data. */
-	u_int8_t *mode_pars;		/* Pointer to modepage params. */
 	struct scsi_mode_header_6 *mh;	/* Location of mode header. */
 	struct scsi_mode_page_header *mph;
 	struct pagename *nameentry;
@@ -895,7 +894,6 @@ mode_list(struct cam_device *device, int
 		/* Locate the next mode page header. */
 		mph = (struct scsi_mode_page_header *)
 		    ((intptr_t)mh + sizeof(*mh) + len);
-		mode_pars = MODE_PAGE_DATA(mph);
 
 		mph->page_code &= SMS_PAGE_CODE;
 		nameentry = nameentry_lookup(mph->page_code);

Modified: stable/9/sbin/fsck_ffs/gjournal.c
==============================================================================
--- stable/9/sbin/fsck_ffs/gjournal.c	Thu Feb 16 05:00:41 2012	(r231811)
+++ stable/9/sbin/fsck_ffs/gjournal.c	Thu Feb 16 05:01:09 2012	(r231812)
@@ -399,7 +399,7 @@ gjournal_check(const char *filesys)
 	void *p;
 	struct cgchain *cgc;
 	struct cg *cgp;
-	uint8_t *inosused, *blksfree;
+	uint8_t *inosused;
 	ino_t cino, ino;
 	int cg, mode;
 
@@ -438,7 +438,6 @@ gjournal_check(const char *filesys)
 		/* We don't want it to be freed in the meantime. */
 		busycg(cgc);
 		inosused = cg_inosused(cgp);
-		blksfree = cg_blksfree(cgp);
 		/*
 		 * Now go through the list of all inodes in this cylinder group
 		 * to find unreferenced ones.

Modified: stable/9/sbin/fsirand/fsirand.c
==============================================================================
--- stable/9/sbin/fsirand/fsirand.c	Thu Feb 16 05:00:41 2012	(r231811)
+++ stable/9/sbin/fsirand/fsirand.c	Thu Feb 16 05:01:09 2012	(r231812)
@@ -115,7 +115,7 @@ fsirand(char *device)
 	caddr_t inodebuf;
 	ssize_t ibufsize;
 	struct fs *sblock;
-	ino_t inumber, maxino;
+	ino_t inumber;
 	ufs2_daddr_t sblockloc, dblk;
 	char sbuf[SBLOCKSIZE], sbuftmp[SBLOCKSIZE];
 	int i, devfd, n, cg;
@@ -165,7 +165,6 @@ fsirand(char *device)
 		fprintf(stderr, "Cannot find file system superblock\n");
 		return (1);
 	}
-	maxino = sblock->fs_ncg * sblock->fs_ipg;
 
 	if (sblock->fs_magic == FS_UFS1_MAGIC &&
 	    sblock->fs_old_inodefmt < FS_44INODEFMT) {

Modified: stable/9/sbin/gvinum/gvinum.c
==============================================================================
--- stable/9/sbin/gvinum/gvinum.c	Thu Feb 16 05:00:41 2012	(r231811)
+++ stable/9/sbin/gvinum/gvinum.c	Thu Feb 16 05:01:09 2012	(r231812)
@@ -937,14 +937,12 @@ gvinum_parityop(int argc, char **argv, i
 	struct gctl_req *req;
 	int flags, i;
 	const char *errstr;
-	char *op, *msg;
+	char *op;
 
 	if (rebuild) {
 		op = "rebuildparity";
-		msg = "Rebuilding";
 	} else {
 		op = "checkparity";
-		msg = "Checking";
 	}
 
 	optreset = 1;
@@ -1057,9 +1055,8 @@ gvinum_rm(int argc, char **argv)
 	struct gctl_req *req;
 	int flags, i, j;
 	const char *errstr;
-	char buf[20], *cmd;
+	char buf[20];
 
-	cmd = argv[0];
 	flags = 0;
 	optreset = 1;
 	optind = 1;

Modified: stable/9/sbin/ifconfig/ifieee80211.c
==============================================================================
--- stable/9/sbin/ifconfig/ifieee80211.c	Thu Feb 16 05:00:41 2012	(r231811)
+++ stable/9/sbin/ifconfig/ifieee80211.c	Thu Feb 16 05:01:09 2012	(r231812)
@@ -4353,7 +4353,6 @@ ieee80211_status(int s)
 
 	if (get80211val(s, IEEE80211_IOC_WEP, &wepmode) != -1 &&
 	    wepmode != IEEE80211_WEP_NOSUP) {
-		int firstkey;
 
 		switch (wepmode) {
 		case IEEE80211_WEP_OFF:
@@ -4389,7 +4388,6 @@ ieee80211_status(int s)
 			goto end;
 		}
 
-		firstkey = 1;
 		for (i = 0; i < num; i++) {
 			struct ieee80211req_key ik;
 
@@ -4403,7 +4401,6 @@ ieee80211_status(int s)
 				if (verbose)
 					LINE_BREAK();
 				printkey(&ik);
-				firstkey = 0;
 			}
 		}
 end:

Modified: stable/9/sbin/newfs/mkfs.c
==============================================================================
--- stable/9/sbin/newfs/mkfs.c	Thu Feb 16 05:00:41 2012	(r231811)
+++ stable/9/sbin/newfs/mkfs.c	Thu Feb 16 05:01:09 2012	(r231812)
@@ -989,9 +989,7 @@ void
 iput(union dinode *ip, ino_t ino)
 {
 	ufs2_daddr_t d;
-	int c;
 
-	c = ino_to_cg(&sblock, ino);
 	bread(&disk, part_ofs + fsbtodb(&sblock, cgtod(&sblock, 0)), (char *)&acg,
 	    sblock.fs_cgsize);
 	if (acg.cg_magic != CG_MAGIC) {

Modified: stable/9/sbin/ping6/ping6.c
==============================================================================
--- stable/9/sbin/ping6/ping6.c	Thu Feb 16 05:00:41 2012	(r231811)
+++ stable/9/sbin/ping6/ping6.c	Thu Feb 16 05:01:09 2012	(r231812)
@@ -1812,7 +1812,7 @@ pr_ip6opt(void *extbuf, size_t bufsize)
 	struct ip6_hbh *ext;
 	int currentlen;
 	u_int8_t type;
-	socklen_t extlen, len, origextlen;
+	socklen_t extlen, len;
 	void *databuf;
 	size_t offset;
 	u_int16_t value2;
@@ -1828,7 +1828,6 @@ pr_ip6opt(void *extbuf, size_t bufsize)
 	 *     subtract the size of a cmsg structure from the buffer size.
 	 */
 	if (bufsize < (extlen  + CMSG_SPACE(0))) {
-		origextlen = extlen;
 		extlen = bufsize - CMSG_SPACE(0);
 		warnx("options truncated, showing only %u (total=%u)",
 		    (unsigned int)(extlen / 8 - 1),

Modified: stable/9/sbin/tunefs/tunefs.c
==============================================================================
--- stable/9/sbin/tunefs/tunefs.c	Thu Feb 16 05:00:41 2012	(r231811)
+++ stable/9/sbin/tunefs/tunefs.c	Thu Feb 16 05:01:09 2012	(r231812)
@@ -90,7 +90,7 @@ main(int argc, char *argv[])
 	int Aflag, aflag, eflag, evalue, fflag, fvalue, jflag, Jflag, Lflag;
 	int lflag, mflag, mvalue, Nflag, nflag, oflag, ovalue, pflag, sflag;
 	int tflag;
-	int svalue, Sflag, Svalue;
+	int svalue, Svalue;
 	int ch, found_arg, i;
 	const char *chg[2];
 	struct ufs_args args;
@@ -269,7 +269,6 @@ main(int argc, char *argv[])
 			if (Svalue < SUJ_MIN)
 				errx(10, "%s must be >= %d (was %s)",
 				    name, SUJ_MIN, optarg);
-			Sflag = 1;
 			break;
 
 		case 't':

Modified: stable/9/usr.bin/brandelf/brandelf.c
==============================================================================
--- stable/9/usr.bin/brandelf/brandelf.c	Thu Feb 16 05:00:41 2012	(r231811)
+++ stable/9/usr.bin/brandelf/brandelf.c	Thu Feb 16 05:01:09 2012	(r231812)
@@ -64,7 +64,7 @@ main(int argc, char **argv)
 	const char *strtype = "FreeBSD";
 	int type = ELFOSABI_FREEBSD;
 	int retval = 0;
-	int ch, change = 0, verbose = 0, force = 0, listed = 0;
+	int ch, change = 0, force = 0, listed = 0;
 
 	while ((ch = getopt(argc, argv, "f:lt:v")) != -1)
 		switch (ch) {
@@ -84,7 +84,7 @@ main(int argc, char **argv)
 			listed = 1;
 			break;
 		case 'v':
-			verbose = 1;
+			/* does nothing */
 			break;
 		case 't':
 			if (force)

Modified: stable/9/usr.bin/bsdiff/bsdiff/bsdiff.c
==============================================================================
--- stable/9/usr.bin/bsdiff/bsdiff/bsdiff.c	Thu Feb 16 05:00:41 2012	(r231811)
+++ stable/9/usr.bin/bsdiff/bsdiff/bsdiff.c	Thu Feb 16 05:01:09 2012	(r231812)
@@ -272,7 +272,7 @@ int main(int argc,char *argv[])
 	/* Compute the differences, writing ctrl as we go */
 	if ((pfbz2 = BZ2_bzWriteOpen(&bz2err, pf, 9, 0, 0)) == NULL)
 		errx(1, "BZ2_bzWriteOpen, bz2err = %d", bz2err);
-	scan=0;len=0;
+	scan=0;len=0;pos=0;
 	lastscan=0;lastpos=0;lastoffset=0;
 	while(scan<newsize) {
 		oldscore=0;

Modified: stable/9/usr.bin/ncplist/ncplist.c
==============================================================================
--- stable/9/usr.bin/ncplist/ncplist.c	Thu Feb 16 05:00:41 2012	(r231811)
+++ stable/9/usr.bin/ncplist/ncplist.c	Thu Feb 16 05:01:09 2012	(r231812)
@@ -373,7 +373,7 @@ enum listop {
 int
 main(int argc, char *argv[])
 {
-	int opt, wdone = 0, nargs = 0, i;
+	int opt, nargs = 0, i;
 	enum listop what;
 	char *args[MAX_ARGS];
 
@@ -436,23 +436,18 @@ main(int argc, char *argv[])
 	switch(what) {
 	    case LO_SERVERS:
 		show_serverlist(args[0]);
-		wdone = 1;
 		break;
 	    case LO_USERS:
 		show_userlist(args[0]);
-		wdone = 1;
 		break;
 	    case LO_QUEUES:
 		show_queuelist(args[0], args[1]);
-		wdone = 1;
 		break;
 	    case LO_VOLUMES:
 		list_volumes(args[0]);
-		wdone = 1;
 		break;
 	    case LO_BINDERY:
 		list_bindery(args[0], args[1], args[2]);
-		wdone = 1;
 		break;
 	    default:
 		help();

Modified: stable/9/usr.bin/netstat/if.c
==============================================================================
--- stable/9/usr.bin/netstat/if.c	Thu Feb 16 05:00:41 2012	(r231811)
+++ stable/9/usr.bin/netstat/if.c	Thu Feb 16 05:01:09 2012	(r231812)
@@ -188,7 +188,6 @@ intpr(int interval1, u_long ifnetaddr, v
 	} ifaddr;
 	u_long ifaddraddr;
 	u_long ifaddrfound;
-	u_long ifnetfound;
 	u_long opackets;
 	u_long ipackets;
 	u_long obytes;
@@ -249,7 +248,6 @@ intpr(int interval1, u_long ifnetaddr, v
 		link_layer = 0;
 
 		if (ifaddraddr == 0) {
-			ifnetfound = ifnetaddr;
 			if (kread(ifnetaddr, (char *)&ifnet, sizeof ifnet) != 0)
 				return;
 			strlcpy(name, ifnet.if_xname, sizeof(name));

Modified: stable/9/usr.bin/split/split.c
==============================================================================
--- stable/9/usr.bin/split/split.c	Thu Feb 16 05:00:41 2012	(r231811)
+++ stable/9/usr.bin/split/split.c	Thu Feb 16 05:01:09 2012	(r231812)
@@ -347,17 +347,14 @@ newfile(void)
 {
 	long i, maxfiles, tfnum;
 	static long fnum;
-	static int defname;
 	static char *fpnt;
 
 	if (ofd == -1) {
 		if (fname[0] == '\0') {
 			fname[0] = 'x';
 			fpnt = fname + 1;
-			defname = 1;
 		} else {
 			fpnt = fname + strlen(fname);
-			defname = 0;
 		}
 		ofd = fileno(stdout);
 	}


More information about the svn-src-stable-9 mailing list