From owner-svn-src-all@FreeBSD.ORG Thu Feb 16 05:01:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9CA2106566B; Thu, 16 Feb 2012 05:01:10 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 949538FC16; Thu, 16 Feb 2012 05:01:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1G51ACB099385; Thu, 16 Feb 2012 05:01:10 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1G51AUM099369; Thu, 16 Feb 2012 05:01:10 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201202160501.q1G51AUM099369@svn.freebsd.org> From: Eitan Adler Date: Thu, 16 Feb 2012 05:01:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: 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... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Feb 2012 05:01:10 -0000 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