From 3cf259c3908e8b2605626123d12372cd7a89ba27 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Fri, 5 May 2017 15:26:55 +0000 Subject: [PATCH] UFS fs.h: clear warning from use in makefs(1) makefs(1) has a number of signedness warnings (when built with higher WARNS), most of which can be addressed by careful application of casts in makefs itself. There is one case where a signedness warning arises from the blksize macro, so must be addressed in the macro itself. Reviewed by: kib, mckusick MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D10589 --- sys/ufs/ffs/fs.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/ufs/ffs/fs.h b/sys/ufs/ffs/fs.h index c87c2b8f436e..4d08210cb522 100644 --- a/sys/ufs/ffs/fs.h +++ b/sys/ufs/ffs/fs.h @@ -608,7 +608,8 @@ struct cg { * Determining the size of a file block in the filesystem. */ #define blksize(fs, ip, lbn) \ - (((lbn) >= UFS_NDADDR || (ip)->i_size >= smalllblktosize(fs, (lbn) + 1)) \ + (((lbn) >= UFS_NDADDR || (ip)->i_size >= \ + (uint64_t)smalllblktosize(fs, (lbn) + 1)) \ ? (fs)->fs_bsize \ : (fragroundup(fs, blkoff(fs, (ip)->i_size)))) #define sblksize(fs, size, lbn) \