Date: Sun, 2 Sep 2012 14:46:19 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r240011 - in head/sys: conf gnu/fs/xfs gnu/fs/xfs/FreeBSD modules/xfs Message-ID: <201209021446.q82EkJIP019410@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Sun Sep 2 14:46:18 2012 New Revision: 240011 URL: http://svn.freebsd.org/changeset/base/240011 Log: Partially revert r239959, after actually fixing most of the clang warnings in sys/gnu/fs/xfs. The only warnings that still need to be suppressed are those about array bound overruns of flexible array members in xfs_dir2_{block,sf}.c, which are too expensive (in terms of cascading code changes) to fix. MFC after: 1 week X-MFC-With: r239959 Modified: head/sys/conf/files head/sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c head/sys/gnu/fs/xfs/FreeBSD/xfs_stats.c head/sys/gnu/fs/xfs/FreeBSD/xfs_super.c head/sys/gnu/fs/xfs/xfs_alloc.c head/sys/gnu/fs/xfs/xfs_vfsops.c head/sys/modules/xfs/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Sep 2 14:45:36 2012 (r240010) +++ head/sys/conf/files Sun Sep 2 14:46:18 2012 (r240011) @@ -3608,7 +3608,7 @@ xdr/xdr_reference.c optional krpc | nfs xdr/xdr_sizeof.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd # gnu/fs/xfs/xfs_alloc.c optional xfs \ - compile-with "${NORMAL_C} ${NO_WSOMETIMES_UNINITIALIZED} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" \ warning "kernel contains GPL contaminated xfs filesystem" gnu/fs/xfs/xfs_alloc_btree.c optional xfs \ compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" @@ -3627,7 +3627,7 @@ gnu/fs/xfs/xfs_da_btree.c optional xfs \ gnu/fs/xfs/xfs_dir.c optional xfs \ compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/xfs_dir2.c optional xfs \ - compile-with "${NORMAL_C} ${NO_WARRAY_BOUNDS} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/xfs_dir2_block.c optional xfs \ compile-with "${NORMAL_C} ${NO_WARRAY_BOUNDS} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/xfs_dir2_data.c optional xfs \ @@ -3685,7 +3685,7 @@ gnu/fs/xfs/xfs_trans_item.c optional xfs gnu/fs/xfs/xfs_utils.c optional xfs \ compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/xfs_vfsops.c optional xfs \ - compile-with "${NORMAL_C} ${NO_WFORMAT_SECURITY} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/xfs_vnodeops.c optional xfs \ compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/xfs_rw.c optional xfs \ @@ -3715,9 +3715,9 @@ gnu/fs/xfs/FreeBSD/xfs_globals.c optiona gnu/fs/xfs/FreeBSD/xfs_dmistubs.c optional xfs \ compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/FreeBSD/xfs_super.c optional xfs \ - compile-with "${NORMAL_C} ${NO_WFORMAT_SECURITY} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/FreeBSD/xfs_stats.c optional xfs \ - compile-with "${NORMAL_C} ${NO_WFORMAT_SECURITY} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/FreeBSD/xfs_vfs.c optional xfs \ compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/FreeBSD/xfs_vnode.c optional xfs \ @@ -3727,7 +3727,7 @@ gnu/fs/xfs/FreeBSD/xfs_sysctl.c optional gnu/fs/xfs/FreeBSD/xfs_fs_subr.c optional xfs \ compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/FreeBSD/xfs_ioctl.c optional xfs \ - compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/FreeBSD/support/debug.c optional xfs \ compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/FreeBSD/support/ktrace.c optional xfs \ Modified: head/sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c ============================================================================== --- head/sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c Sun Sep 2 14:45:36 2012 (r240010) +++ head/sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c Sun Sep 2 14:46:18 2012 (r240011) @@ -1249,7 +1249,6 @@ xfs_ioc_xattr( XFS_AT_NEXTENTS | XFS_AT_PROJID; XVOP_GETATTR(vp, vattr, 0, NULL, error); if (unlikely(error)) { - error = error; break; } @@ -1287,7 +1286,6 @@ xfs_ioc_xattr( if (likely(!error)) __vn_revalidate(vp, vattr); /* update flags */ #endif - error = error; break; } @@ -1296,7 +1294,6 @@ xfs_ioc_xattr( XFS_AT_ANEXTENTS | XFS_AT_PROJID; XVOP_GETATTR(vp, vattr, 0, NULL, error); if (unlikely(error)) { - error = error; break; } @@ -1347,7 +1344,6 @@ xfs_ioc_xattr( if (likely(!error)) __vn_revalidate(vp, vattr); /* update flags */ #endif - error = error; break; } Modified: head/sys/gnu/fs/xfs/FreeBSD/xfs_stats.c ============================================================================== --- head/sys/gnu/fs/xfs/FreeBSD/xfs_stats.c Sun Sep 2 14:45:36 2012 (r240010) +++ head/sys/gnu/fs/xfs/FreeBSD/xfs_stats.c Sun Sep 2 14:46:18 2012 (r240011) @@ -65,7 +65,7 @@ xfs_read_xfsstats( }; for (i=j=len = 0; i < sizeof(xstats)/sizeof(struct xstats_entry); i++) { - len += sprintf(buffer + len, xstats[i].desc); + len += sprintf(buffer + len, "%s", xstats[i].desc); /* inner loop does each group */ while (j < xstats[i].endpoint) { len += sprintf(buffer + len, " %u", Modified: head/sys/gnu/fs/xfs/FreeBSD/xfs_super.c ============================================================================== --- head/sys/gnu/fs/xfs/FreeBSD/xfs_super.c Sun Sep 2 14:45:36 2012 (r240010) +++ head/sys/gnu/fs/xfs/FreeBSD/xfs_super.c Sun Sep 2 14:46:18 2012 (r240011) @@ -251,7 +251,7 @@ xfs_blkdev_issue_flush( int init_xfs_fs( void ) { - static char message[] = + static const char message[] = XFS_VERSION_STRING " with " XFS_BUILD_OPTIONS " enabled\n"; printf(message); Modified: head/sys/gnu/fs/xfs/xfs_alloc.c ============================================================================== --- head/sys/gnu/fs/xfs/xfs_alloc.c Sun Sep 2 14:45:36 2012 (r240010) +++ head/sys/gnu/fs/xfs/xfs_alloc.c Sun Sep 2 14:46:18 2012 (r240011) @@ -1479,8 +1479,10 @@ xfs_alloc_ag_vextent_small( /* * Can't allocate from the freelist for some reason. */ - else + else { + fbno = NULLAGBLOCK; flen = 0; + } /* * Can't do the allocation, give up. */ Modified: head/sys/gnu/fs/xfs/xfs_vfsops.c ============================================================================== --- head/sys/gnu/fs/xfs/xfs_vfsops.c Sun Sep 2 14:45:36 2012 (r240010) +++ head/sys/gnu/fs/xfs/xfs_vfsops.c Sun Sep 2 14:46:18 2012 (r240011) @@ -1954,7 +1954,7 @@ xfs_showargs( for (xfs_infop = xfs_info; xfs_infop->flag; xfs_infop++) { if (mp->m_flags & xfs_infop->flag) - sbuf_printf(m, xfs_infop->str); + sbuf_printf(m, "%s", xfs_infop->str); } if (mp->m_flags & XFS_MOUNT_IHASHSIZE) Modified: head/sys/modules/xfs/Makefile ============================================================================== --- head/sys/modules/xfs/Makefile Sun Sep 2 14:45:36 2012 (r240010) +++ head/sys/modules/xfs/Makefile Sun Sep 2 14:46:18 2012 (r240011) @@ -84,12 +84,6 @@ CFLAGS+= -I${.CURDIR}/../../gnu/fs/xfs/F -I${.CURDIR}/../../gnu/fs/xfs/FreeBSD/support \ -I${.CURDIR}/../../gnu/fs/xfs -CWARNFLAGS.xfs_alloc.c= ${NO_WSOMETIMES_UNINITIALIZED} -CWARNFLAGS.xfs_dir2.c= ${NO_WARRAY_BOUNDS} CWARNFLAGS.xfs_dir2_block.c= ${NO_WARRAY_BOUNDS} CWARNFLAGS.xfs_dir2_sf.c= ${NO_WARRAY_BOUNDS} -CWARNFLAGS.xfs_ioctl.c= ${NO_WSELF_ASSIGN} -CWARNFLAGS.xfs_stats.c= ${NO_WFORMAT_SECURITY} -CWARNFLAGS.xfs_super.c= ${NO_WFORMAT_SECURITY} -CWARNFLAGS.xfs_vfsops.c= ${NO_WFORMAT_SECURITY} CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209021446.q82EkJIP019410>