Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Jun 2017 17:01:46 +0000 (UTC)
From:      Ngie Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r320413 - head/sys/fs/pseudofs
Message-ID:  <201706271701.v5RH1kIx014957@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Tue Jun 27 17:01:46 2017
New Revision: 320413
URL: https://svnweb.freebsd.org/changeset/base/320413

Log:
  Fix LINT, broken by a -Wformat warning in r320329 with PFS_DELEN being
  changed from %d to a long-width type.
  
  Use uintmax_t casting and %ju to futureproof the format string against
  potential changes with either the #define or the implementation-specific
  definition for offsetof(..).

Modified:
  head/sys/fs/pseudofs/pseudofs_vnops.c

Modified: head/sys/fs/pseudofs/pseudofs_vnops.c
==============================================================================
--- head/sys/fs/pseudofs/pseudofs_vnops.c	Tue Jun 27 16:48:05 2017	(r320412)
+++ head/sys/fs/pseudofs/pseudofs_vnops.c	Tue Jun 27 17:01:46 2017	(r320413)
@@ -866,7 +866,7 @@ pfs_readdir(struct vop_readdir_args *va)
 		free(pfsent, M_IOV);
 		i++;
 	}
-	PFS_TRACE(("%d bytes", i * PFS_DELEN));
+	PFS_TRACE(("%ju bytes", (uintmax_t)(i * PFS_DELEN)));
 	PFS_RETURN (error);
 }
 



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