From owner-dev-commits-src-branches@freebsd.org Sat Sep 25 08:41:24 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7D6C967DDAF; Sat, 25 Sep 2021 08:41:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HGj6r2rZHz3llx; Sat, 25 Sep 2021 08:41:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 36BA5270D3; Sat, 25 Sep 2021 08:41:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 18P8fOxL017925; Sat, 25 Sep 2021 08:41:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 18P8fOPW017924; Sat, 25 Sep 2021 08:41:24 GMT (envelope-from git) Date: Sat, 25 Sep 2021 08:41:24 GMT Message-Id: <202109250841.18P8fOPW017924@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Piotr Pawel Stefaniak Subject: git: 8acee856bfc8 - stable/13 - fstyp: bump WARNS to default and work around warnings MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pstef X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8acee856bfc8cf7ef0e2f622aeea5df830619db3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Sep 2021 08:41:24 -0000 The branch stable/13 has been updated by pstef: URL: https://cgit.FreeBSD.org/src/commit/?id=8acee856bfc8cf7ef0e2f622aeea5df830619db3 commit 8acee856bfc8cf7ef0e2f622aeea5df830619db3 Author: Piotr Pawel Stefaniak AuthorDate: 2021-08-17 15:46:08 +0000 Commit: Piotr Pawel Stefaniak CommitDate: 2021-09-25 08:34:38 +0000 fstyp: bump WARNS to default and work around warnings (cherry picked from commit da0c0e0121574a1d82f417cc7e245ecd5506325c) --- usr.sbin/fstyp/Makefile | 2 -- usr.sbin/fstyp/apfs.c | 2 ++ usr.sbin/fstyp/fstyp.c | 4 ++-- usr.sbin/fstyp/hammer.c | 3 +++ usr.sbin/fstyp/hfsplus.c | 2 ++ 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/usr.sbin/fstyp/Makefile b/usr.sbin/fstyp/Makefile index 384e2f7dee60..161cd0cf3764 100644 --- a/usr.sbin/fstyp/Makefile +++ b/usr.sbin/fstyp/Makefile @@ -12,8 +12,6 @@ SRCS += zfs.c MAN= fstyp.8 -WARNS?= 2 - .if ${MK_ICONV} == "yes" CFLAGS+= -DWITH_ICONV .endif diff --git a/usr.sbin/fstyp/apfs.c b/usr.sbin/fstyp/apfs.c index 049a9f862f2b..7f8543a5a108 100644 --- a/usr.sbin/fstyp/apfs.c +++ b/usr.sbin/fstyp/apfs.c @@ -100,6 +100,8 @@ fstyp_apfs(FILE *fp, char *label, size_t size) retval = 0; /* No label support yet. */ + (void)size; + (void)label; fail: free(csb); diff --git a/usr.sbin/fstyp/fstyp.c b/usr.sbin/fstyp/fstyp.c index b39277914aed..91c36d9d9191 100644 --- a/usr.sbin/fstyp/fstyp.c +++ b/usr.sbin/fstyp/fstyp.c @@ -61,7 +61,7 @@ static struct { const char *name; fstyp_function function; bool unmountable; - char *precache_encoding; + const char *precache_encoding; } fstypes[] = { { "apfs", &fstyp_apfs, true, NULL }, { "befs", &fstyp_befs, false, NULL }, @@ -206,7 +206,7 @@ main(int argc, char **argv) #ifdef WITH_ICONV /* Cache iconv conversion data before entering capability mode. */ if (show_label) { - for (i = 0; i < nitems(fstypes); i++) { + for (i = 0; i < (int)nitems(fstypes); i++) { iconv_t cd; if (fstypes[i].precache_encoding == NULL) diff --git a/usr.sbin/fstyp/hammer.c b/usr.sbin/fstyp/hammer.c index 6fdad1d642a4..777f5d312371 100644 --- a/usr.sbin/fstyp/hammer.c +++ b/usr.sbin/fstyp/hammer.c @@ -43,6 +43,9 @@ __FBSDID("$FreeBSD$"); #include "fstyp.h" +extern int fsvtyp_hammer(const char *blkdevs, char *label, size_t size); +extern int fsvtyp_hammer_partial(const char *blkdevs, char *label, size_t size); + static hammer_volume_ondisk_t read_ondisk(FILE *fp) { diff --git a/usr.sbin/fstyp/hfsplus.c b/usr.sbin/fstyp/hfsplus.c index 71287465e4ff..3a94faf7766f 100644 --- a/usr.sbin/fstyp/hfsplus.c +++ b/usr.sbin/fstyp/hfsplus.c @@ -118,6 +118,8 @@ fstyp_hfsp(FILE *fp, char *label, size_t size) retval = 0; /* No label support yet. */ + (void)size; + (void)label; fail: free(hdr);