svn commit: r240207 - in stable/9/sys: conf gnu/fs/xfs
gnu/fs/xfs/FreeBSD modules/xfs
Dimitry Andric
dim at FreeBSD.org
Fri Sep 7 17:58:37 UTC 2012
Author: dim
Date: Fri Sep 7 17:58:36 2012
New Revision: 240207
URL: http://svn.freebsd.org/changeset/base/240207
Log:
MFC r239959:
Work around several warnings from clang in the xfs filesystem, when
linking it statically into the kernel. With our gcc in base there are
no warnings, so also remove the WERROR= from the module makefile.
Noted by: Eir Nym <eirnym at gmail.com>
MFC r240011:
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.
Modified:
stable/9/sys/conf/files
stable/9/sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c
stable/9/sys/gnu/fs/xfs/FreeBSD/xfs_stats.c
stable/9/sys/gnu/fs/xfs/FreeBSD/xfs_super.c
stable/9/sys/gnu/fs/xfs/xfs_alloc.c
stable/9/sys/gnu/fs/xfs/xfs_vfsops.c
stable/9/sys/modules/xfs/Makefile
Directory Properties:
stable/9/sys/ (props changed)
stable/9/sys/conf/ (props changed)
stable/9/sys/modules/ (props changed)
Modified: stable/9/sys/conf/files
==============================================================================
--- stable/9/sys/conf/files Fri Sep 7 17:51:12 2012 (r240206)
+++ stable/9/sys/conf/files Fri Sep 7 17:58:36 2012 (r240207)
@@ -3407,7 +3407,7 @@ gnu/fs/xfs/xfs_dir.c optional xfs \
gnu/fs/xfs/xfs_dir2.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_block.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"
+ 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 \
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_leaf.c optional xfs \
@@ -3415,7 +3415,7 @@ gnu/fs/xfs/xfs_dir2_leaf.c optional xfs
gnu/fs/xfs/xfs_dir2_node.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_sf.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"
+ 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_trace.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_dir_leaf.c optional xfs \
@@ -3505,7 +3505,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: stable/9/sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c
==============================================================================
--- stable/9/sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c Fri Sep 7 17:51:12 2012 (r240206)
+++ stable/9/sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c Fri Sep 7 17:58:36 2012 (r240207)
@@ -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: stable/9/sys/gnu/fs/xfs/FreeBSD/xfs_stats.c
==============================================================================
--- stable/9/sys/gnu/fs/xfs/FreeBSD/xfs_stats.c Fri Sep 7 17:51:12 2012 (r240206)
+++ stable/9/sys/gnu/fs/xfs/FreeBSD/xfs_stats.c Fri Sep 7 17:58:36 2012 (r240207)
@@ -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: stable/9/sys/gnu/fs/xfs/FreeBSD/xfs_super.c
==============================================================================
--- stable/9/sys/gnu/fs/xfs/FreeBSD/xfs_super.c Fri Sep 7 17:51:12 2012 (r240206)
+++ stable/9/sys/gnu/fs/xfs/FreeBSD/xfs_super.c Fri Sep 7 17:58:36 2012 (r240207)
@@ -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: stable/9/sys/gnu/fs/xfs/xfs_alloc.c
==============================================================================
--- stable/9/sys/gnu/fs/xfs/xfs_alloc.c Fri Sep 7 17:51:12 2012 (r240206)
+++ stable/9/sys/gnu/fs/xfs/xfs_alloc.c Fri Sep 7 17:58:36 2012 (r240207)
@@ -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: stable/9/sys/gnu/fs/xfs/xfs_vfsops.c
==============================================================================
--- stable/9/sys/gnu/fs/xfs/xfs_vfsops.c Fri Sep 7 17:51:12 2012 (r240206)
+++ stable/9/sys/gnu/fs/xfs/xfs_vfsops.c Fri Sep 7 17:58:36 2012 (r240207)
@@ -1955,7 +1955,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: stable/9/sys/modules/xfs/Makefile
==============================================================================
--- stable/9/sys/modules/xfs/Makefile Fri Sep 7 17:51:12 2012 (r240206)
+++ stable/9/sys/modules/xfs/Makefile Fri Sep 7 17:58:36 2012 (r240207)
@@ -6,8 +6,6 @@
KMOD= xfs
-WERROR=
-
SRCS = vnode_if.h \
xfs_alloc.c \
xfs_alloc_btree.c \
@@ -86,5 +84,6 @@ CFLAGS+= -I${.CURDIR}/../../gnu/fs/xfs/F
-I${.CURDIR}/../../gnu/fs/xfs/FreeBSD/support \
-I${.CURDIR}/../../gnu/fs/xfs
-CWARNFLAGS.xfs_ioctl.c= ${NO_WSELF_ASSIGN}
+CWARNFLAGS.xfs_dir2_block.c= ${NO_WARRAY_BOUNDS}
+CWARNFLAGS.xfs_dir2_sf.c= ${NO_WARRAY_BOUNDS}
CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}}
More information about the svn-src-stable-9
mailing list