summaryrefslogtreecommitdiffstats
path: root/sbin/fsck_msdosfs
diff options
context:
space:
mode:
authoruqs <uqs@FreeBSD.org>2012-10-21 12:01:19 +0000
committeruqs <uqs@FreeBSD.org>2012-10-21 12:01:19 +0000
commit0435f4a49c48e7ffd3690c28630f09490ec3c2dc (patch)
tree51a66e358e4c5579ab65ee6198ef02fdd1437244 /sbin/fsck_msdosfs
parentd704245c81126879f7dc17d84768dfe6451bbe9c (diff)
downloadFreeBSD-src-0435f4a49c48e7ffd3690c28630f09490ec3c2dc.zip
FreeBSD-src-0435f4a49c48e7ffd3690c28630f09490ec3c2dc.tar.gz
Make fsck and fsck_msdosfs WARNS=6 clean
- sprinkle const - add volatile qualifier to avoid vfork clobbering Inspired by: NetBSD PR: bin/139802 Reviewed by: ed
Diffstat (limited to 'sbin/fsck_msdosfs')
-rw-r--r--sbin/fsck_msdosfs/Makefile1
-rw-r--r--sbin/fsck_msdosfs/boot.c2
-rw-r--r--sbin/fsck_msdosfs/ext.h2
-rw-r--r--sbin/fsck_msdosfs/fat.c2
4 files changed, 3 insertions, 4 deletions
diff --git a/sbin/fsck_msdosfs/Makefile b/sbin/fsck_msdosfs/Makefile
index ddb8e8a..f9dd9fa 100644
--- a/sbin/fsck_msdosfs/Makefile
+++ b/sbin/fsck_msdosfs/Makefile
@@ -9,6 +9,5 @@ MAN= fsck_msdosfs.8
SRCS= main.c check.c boot.c fat.c dir.c fsutil.c
CFLAGS+= -I${FSCK}
-WARNS?= 2
.include <bsd.prog.mk>
diff --git a/sbin/fsck_msdosfs/boot.c b/sbin/fsck_msdosfs/boot.c
index 97d9419..3195183 100644
--- a/sbin/fsck_msdosfs/boot.c
+++ b/sbin/fsck_msdosfs/boot.c
@@ -48,7 +48,7 @@ readboot(int dosfs, struct bootblock *boot)
int ret = FSOK;
int i;
- if (read(dosfs, block, sizeof block) != sizeof block) {
+ if ((size_t)read(dosfs, block, sizeof block) != sizeof block) {
perr("could not read boot block");
return FSFATAL;
}
diff --git a/sbin/fsck_msdosfs/ext.h b/sbin/fsck_msdosfs/ext.h
index a4fd19b..681cde9 100644
--- a/sbin/fsck_msdosfs/ext.h
+++ b/sbin/fsck_msdosfs/ext.h
@@ -133,7 +133,7 @@ void finishlf(void);
/*
* Return the type of a reserved cluster as text
*/
-char *rsrvdcltype(cl_t);
+const char *rsrvdcltype(cl_t);
/*
* Clear a cluster chain in a FAT
diff --git a/sbin/fsck_msdosfs/fat.c b/sbin/fsck_msdosfs/fat.c
index 837bd69..d2d1444 100644
--- a/sbin/fsck_msdosfs/fat.c
+++ b/sbin/fsck_msdosfs/fat.c
@@ -320,7 +320,7 @@ readfat(int fs, struct bootblock *boot, u_int no, struct fatEntry **fp)
/*
* Get type of reserved cluster
*/
-char *
+const char *
rsrvdcltype(cl_t cl)
{
if (cl == CLUST_FREE)
OpenPOWER on IntegriCloud