From owner-svn-src-head@freebsd.org Sat Jun 16 23:46:00 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8093110024F4; Sat, 16 Jun 2018 23:46:00 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 32727740AA; Sat, 16 Jun 2018 23:46:00 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E9B2D57BC; Sat, 16 Jun 2018 23:45:59 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5GNjxWV081388; Sat, 16 Jun 2018 23:45:59 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5GNjxsi081386; Sat, 16 Jun 2018 23:45:59 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201806162345.w5GNjxsi081386@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 16 Jun 2018 23:45:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335267 - head/sbin/gvinum X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/sbin/gvinum X-SVN-Commit-Revision: 335267 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jun 2018 23:46:00 -0000 Author: eadler Date: Sat Jun 16 23:45:59 2018 New Revision: 335267 URL: https://svnweb.freebsd.org/changeset/base/335267 Log: gvinum: build with WARNS=6 This also removes an unused and uninitialized variable. Tested with amd64, arm64, i386, mips Modified: head/sbin/gvinum/Makefile head/sbin/gvinum/gvinum.c Modified: head/sbin/gvinum/Makefile ============================================================================== --- head/sbin/gvinum/Makefile Sat Jun 16 23:44:18 2018 (r335266) +++ head/sbin/gvinum/Makefile Sat Jun 16 23:45:59 2018 (r335267) @@ -5,7 +5,6 @@ PROG= gvinum SRCS= gvinum.c gvinum.h geom_vinum_share.c MAN= gvinum.8 -WARNS?= 2 CFLAGS+= -I${SRCTOP}/sys -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/edit LIBADD= edit geom Modified: head/sbin/gvinum/gvinum.c ============================================================================== --- head/sbin/gvinum/gvinum.c Sat Jun 16 23:44:18 2018 (r335266) +++ head/sbin/gvinum/gvinum.c Sat Jun 16 23:45:59 2018 (r335267) @@ -94,7 +94,7 @@ static void copy_device(struct gv_drive *, const char int main(int argc, char **argv) { - int line, tokens; + int tokens; char buffer[BUFSIZ], *inputline, *token[GV_MAXARGS]; /* Load the module if necessary. */ @@ -124,7 +124,6 @@ main(int argc, char **argv) add_history(inputline); strcpy(buffer, inputline); free(inputline); - line++; /* count the lines */ tokens = gv_tokenize(buffer, token, GV_MAXARGS); if (tokens) parseline(tokens, token); @@ -184,7 +183,8 @@ gvinum_create(int argc, char * const *argv) int drives, errors, fd, flags, i, line, plexes, plex_in_volume; int sd_in_plex, status, subdisks, tokens, undeffd, volumes; const char *errstr; - char buf[BUFSIZ], buf1[BUFSIZ], commandline[BUFSIZ], *ed, *sdname; + char buf[BUFSIZ], buf1[BUFSIZ], commandline[BUFSIZ], *sdname; + const char *ed; char original[BUFSIZ], tmpfile[20], *token[GV_MAXARGS]; char plex[GV_MAXPLEXNAME], volume[GV_MAXVOLNAME]; @@ -806,7 +806,8 @@ gvinum_list(int argc, char * const *argv) struct gctl_req *req; int flags, i, j; const char *errstr; - char buf[20], *cmd, config[GV_CFG_LEN + 1]; + char buf[20], config[GV_CFG_LEN + 1]; + const char *cmd; flags = 0; cmd = "list"; @@ -931,7 +932,7 @@ gvinum_move(int argc, char * const *argv) } static void -gvinum_printconfig(int argc, char * const *argv) +gvinum_printconfig(int argc __unused, char * const *argv __unused) { printconfig(stdout, ""); @@ -943,7 +944,7 @@ gvinum_parityop(int argc, char * const *argv, int rebu struct gctl_req *req; int flags, i; const char *errstr; - char *op; + const char *op; if (rebuild) { op = "rebuildparity"; @@ -1214,7 +1215,7 @@ gvinum_start(int argc, char * const *argv) } static void -gvinum_stop(int argc, char * const *argv) +gvinum_stop(int argc __unused, char * const *argv __unused) { int err, fileid;