The branch main has been updated by pstef:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=da0c0e0121574a1d82f417cc7e245ecd5506325c

commit da0c0e0121574a1d82f417cc7e245ecd5506325c
Author:     Piotr Pawel Stefaniak <ps...@freebsd.org>
AuthorDate: 2021-08-17 15:46:08 +0000
Commit:     Piotr Pawel Stefaniak <ps...@freebsd.org>
CommitDate: 2021-09-19 11:52:12 +0000

    fstyp: bump WARNS to default and work around warnings
    
    Differential Revision:  https://reviews.freebsd.org/D31588
---
 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);
_______________________________________________
dev-commits-src-main@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main
To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"

Reply via email to