Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 May 2017 15:26:55 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r317832 - head/sys/ufs/ffs
Message-ID:  <201705051526.v45FQt3U016561@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Fri May  5 15:26:55 2017
New Revision: 317832
URL: https://svnweb.freebsd.org/changeset/base/317832

Log:
  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

Modified:
  head/sys/ufs/ffs/fs.h

Modified: head/sys/ufs/ffs/fs.h
==============================================================================
--- head/sys/ufs/ffs/fs.h	Fri May  5 15:15:41 2017	(r317831)
+++ head/sys/ufs/ffs/fs.h	Fri May  5 15:26:55 2017	(r317832)
@@ -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) \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705051526.v45FQt3U016561>