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
This commit is contained in:
parent
81eb4e6351
commit
917a07e1ab
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=240011
@ -3608,7 +3608,7 @@ xdr/xdr_reference.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl |
|
||||
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 optional xfs \
|
||||
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 xfs \
|
||||
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 \
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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",
|
||||
|
@ -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);
|
||||
|
@ -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.
|
||||
*/
|
||||
|
@ -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)
|
||||
|
@ -84,12 +84,6 @@ CFLAGS+= -I${.CURDIR}/../../gnu/fs/xfs/FreeBSD \
|
||||
-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}}
|
||||
|
Loading…
Reference in New Issue
Block a user