fstyp: bump WARNS to default and work around warnings

(cherry picked from commit da0c0e0121)
This commit is contained in:
Piotr Pawel Stefaniak 2021-08-17 17:46:08 +02:00
parent a7ce2cf0ff
commit 8acee856bf
5 changed files with 9 additions and 4 deletions

View file

@ -12,8 +12,6 @@ SRCS += zfs.c
MAN= fstyp.8
WARNS?= 2
.if ${MK_ICONV} == "yes"
CFLAGS+= -DWITH_ICONV
.endif

View file

@ -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);

View file

@ -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)

View file

@ -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)
{

View file

@ -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);