From owner-svn-src-stable@FreeBSD.ORG Fri Mar 23 11:01:05 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EE11106564A; Fri, 23 Mar 2012 11:01:05 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 89BC68FC20; Fri, 23 Mar 2012 11:01:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2NB15UU071283; Fri, 23 Mar 2012 11:01:05 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2NB15m4071280; Fri, 23 Mar 2012 11:01:05 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201203231101.q2NB15m4071280@svn.freebsd.org> From: Dimitry Andric Date: Fri, 23 Mar 2012 11:01:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233351 - stable/9/sbin/fsdb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Mar 2012 11:01:05 -0000 Author: dim Date: Fri Mar 23 11:01:04 2012 New Revision: 233351 URL: http://svn.freebsd.org/changeset/base/233351 Log: MFC r232749: Partially undo r228693, by removing NO_WFORMAT.clang in fsdb's Makefile, and fixing the format string in sbin/fsdb/fsdbutil.c instead. Note the remark "Work around a problem with format string warnings and ntohs macros" was actually incorrect. The DIP(dp, di_nlink) macro invocation actually returned an int, due to its ternary expression, even though the di_nlink members of struct ufs1_dinode and struct ufs2_dinode are both defined as int16_t. Modified: stable/9/sbin/fsdb/Makefile stable/9/sbin/fsdb/fsdbutil.c Directory Properties: stable/9/sbin/fsdb/ (props changed) Modified: stable/9/sbin/fsdb/Makefile ============================================================================== --- stable/9/sbin/fsdb/Makefile Fri Mar 23 10:58:35 2012 (r233350) +++ stable/9/sbin/fsdb/Makefile Fri Mar 23 11:01:04 2012 (r233351) @@ -9,8 +9,6 @@ SRCS= fsdb.c fsdbutil.c \ pass5.c setup.c utilities.c ffs_subr.c ffs_tables.c CFLAGS+= -I${.CURDIR}/../fsck_ffs WARNS?= 2 -# Work around a problem with format string warnings and ntohs macros. -NO_WFORMAT.clang= LDADD= -ledit -ltermcap DPADD= ${LIBEDIT} ${LIBTERMCAP} .PATH: ${.CURDIR}/../fsck_ffs ${.CURDIR}/../../sys/ufs/ffs Modified: stable/9/sbin/fsdb/fsdbutil.c ============================================================================== --- stable/9/sbin/fsdb/fsdbutil.c Fri Mar 23 10:58:35 2012 (r233350) +++ stable/9/sbin/fsdb/fsdbutil.c Fri Mar 23 11:01:04 2012 (r233351) @@ -195,7 +195,7 @@ printstat(const char *cp, ino_t inum, un blocks = DIP(dp, di_blocks); gen = DIP(dp, di_gen); - printf("LINKCNT=%hd FLAGS=%#x BLKCNT=%jx GEN=%jx\n", DIP(dp, di_nlink), + printf("LINKCNT=%d FLAGS=%#x BLKCNT=%jx GEN=%jx\n", DIP(dp, di_nlink), DIP(dp, di_flags), (intmax_t)blocks, (intmax_t)gen); }