makefs: clean up signedness warnings and bump WARNS to 3
Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D10650
This commit is contained in:
parent
fade31741d
commit
3afe6a68e0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=318451
@ -14,7 +14,7 @@ SRCS= cd9660.c ffs.c \
|
||||
walk.c
|
||||
MAN= makefs.8
|
||||
|
||||
WARNS?= 2
|
||||
WARNS?= 3
|
||||
|
||||
.include "${SRCDIR}/cd9660/Makefile.inc"
|
||||
.include "${SRCDIR}/ffs/Makefile.inc"
|
||||
|
@ -1065,10 +1065,11 @@ ffs_write_inode(union dinode *dp, uint32_t ino, const fsinfo_t *fsopts)
|
||||
struct ufs2_dinode *dp2, *dip;
|
||||
struct cg *cgp;
|
||||
struct fs *fs;
|
||||
int cg, cgino, i;
|
||||
int cg, cgino;
|
||||
uint32_t i;
|
||||
daddr_t d;
|
||||
char sbbuf[FFS_MAXBSIZE];
|
||||
int32_t initediblk;
|
||||
uint32_t initediblk;
|
||||
ffs_opt_t *ffs_opts = fsopts->fs_specific;
|
||||
|
||||
assert (dp != NULL);
|
||||
|
@ -64,7 +64,7 @@ static int scanc(u_int, const u_char *, const u_char *, int);
|
||||
|
||||
static daddr_t ffs_alloccg(struct inode *, int, daddr_t, int);
|
||||
static daddr_t ffs_alloccgblk(struct inode *, struct buf *, daddr_t);
|
||||
static daddr_t ffs_hashalloc(struct inode *, int, daddr_t, int,
|
||||
static daddr_t ffs_hashalloc(struct inode *, u_int, daddr_t, int,
|
||||
daddr_t (*)(struct inode *, int, daddr_t, int));
|
||||
static int32_t ffs_mapsearch(struct fs *, struct cg *, daddr_t, int);
|
||||
|
||||
@ -152,8 +152,8 @@ daddr_t
|
||||
ffs_blkpref_ufs1(struct inode *ip, daddr_t lbn, int indx, int32_t *bap)
|
||||
{
|
||||
struct fs *fs;
|
||||
int cg;
|
||||
int avgbfree, startcg;
|
||||
u_int cg, startcg;
|
||||
int avgbfree;
|
||||
|
||||
fs = ip->i_fs;
|
||||
if (indx % fs->fs_maxbpg == 0 || bap[indx - 1] == 0) {
|
||||
@ -191,8 +191,8 @@ daddr_t
|
||||
ffs_blkpref_ufs2(struct inode *ip, daddr_t lbn, int indx, int64_t *bap)
|
||||
{
|
||||
struct fs *fs;
|
||||
int cg;
|
||||
int avgbfree, startcg;
|
||||
u_int cg, startcg;
|
||||
int avgbfree;
|
||||
|
||||
fs = ip->i_fs;
|
||||
if (indx % fs->fs_maxbpg == 0 || bap[indx - 1] == 0) {
|
||||
@ -240,12 +240,12 @@ ffs_blkpref_ufs2(struct inode *ip, daddr_t lbn, int indx, int64_t *bap)
|
||||
*/
|
||||
/*VARARGS5*/
|
||||
static daddr_t
|
||||
ffs_hashalloc(struct inode *ip, int cg, daddr_t pref, int size,
|
||||
ffs_hashalloc(struct inode *ip, u_int cg, daddr_t pref, int size,
|
||||
daddr_t (*allocator)(struct inode *, int, daddr_t, int))
|
||||
{
|
||||
struct fs *fs;
|
||||
daddr_t result;
|
||||
int i, icg = cg;
|
||||
u_int i, icg = cg;
|
||||
|
||||
fs = ip->i_fs;
|
||||
/*
|
||||
|
@ -123,7 +123,8 @@ ffs_balloc_ufs1(struct inode *ip, off_t offset, int bufsize, struct buf **bpp)
|
||||
|
||||
if (lbn < UFS_NDADDR) {
|
||||
nb = ufs_rw32(ip->i_ffs1_db[lbn], needswap);
|
||||
if (nb != 0 && ip->i_ffs1_size >= lblktosize(fs, lbn + 1)) {
|
||||
if (nb != 0 && ip->i_ffs1_size >=
|
||||
(uint64_t)lblktosize(fs, lbn + 1)) {
|
||||
|
||||
/*
|
||||
* The block is an already-allocated direct block
|
||||
@ -178,7 +179,7 @@ ffs_balloc_ufs1(struct inode *ip, off_t offset, int bufsize, struct buf **bpp)
|
||||
* allocate a new block or fragment.
|
||||
*/
|
||||
|
||||
if (ip->i_ffs1_size < lblktosize(fs, lbn + 1))
|
||||
if (ip->i_ffs1_size < (uint64_t)lblktosize(fs, lbn + 1))
|
||||
nsize = fragroundup(fs, size);
|
||||
else
|
||||
nsize = fs->fs_bsize;
|
||||
@ -373,7 +374,8 @@ ffs_balloc_ufs2(struct inode *ip, off_t offset, int bufsize, struct buf **bpp)
|
||||
|
||||
if (lbn < UFS_NDADDR) {
|
||||
nb = ufs_rw64(ip->i_ffs2_db[lbn], needswap);
|
||||
if (nb != 0 && ip->i_ffs2_size >= lblktosize(fs, lbn + 1)) {
|
||||
if (nb != 0 && ip->i_ffs2_size >=
|
||||
(uint64_t)lblktosize(fs, lbn + 1)) {
|
||||
|
||||
/*
|
||||
* The block is an already-allocated direct block
|
||||
@ -428,7 +430,7 @@ ffs_balloc_ufs2(struct inode *ip, off_t offset, int bufsize, struct buf **bpp)
|
||||
* allocate a new block or fragment.
|
||||
*/
|
||||
|
||||
if (ip->i_ffs2_size < lblktosize(fs, lbn + 1))
|
||||
if (ip->i_ffs2_size < (uint64_t)lblktosize(fs, lbn + 1))
|
||||
nsize = fragroundup(fs, size);
|
||||
else
|
||||
nsize = fs->fs_bsize;
|
||||
|
@ -39,12 +39,12 @@ __FBSDID("$FreeBSD$");
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#define panic(x) printf("%s\n", (x)), abort()
|
||||
#endif
|
||||
|
||||
#include <ufs/ufs/dinode.h>
|
||||
#include "ffs/ufs_bswap.h"
|
||||
#include <ufs/ffs/fs.h>
|
||||
#include "ffs/ffs_extern.h"
|
||||
|
||||
#define fs_old_postbloff fs_spare5[0]
|
||||
#define fs_old_rotbloff fs_spare5[1]
|
||||
|
@ -505,7 +505,8 @@ read_mtree_keywords(FILE *fp, fsnode *node)
|
||||
struct stat *st, sb;
|
||||
intmax_t num;
|
||||
u_long flset, flclr;
|
||||
int error, istemp, type;
|
||||
int error, istemp;
|
||||
uint32_t type;
|
||||
|
||||
st = &node->inode->st;
|
||||
do {
|
||||
|
Loading…
Reference in New Issue
Block a user