提交 560ab6c0 编写于 作者: C Chandan Babu R 提交者: Darrick J. Wong

xfs: Fix 'set but not used' warning in xfs_bmap_compute_alignments()

With both CONFIG_XFS_DEBUG and CONFIG_XFS_WARN disabled, the only reference to
local variable "error" in xfs_bmap_compute_alignments() gets eliminated during
pre-processing stage of the compilation process. This causes the compiler to
generate a "set but not used" warning.
Reported-by: Nkernel test robot <lkp@intel.com>
Signed-off-by: NChandan Babu R <chandanrlinux@gmail.com>
Reviewed-by: NDarrick J. Wong <djwong@kernel.org>
Signed-off-by: NDarrick J. Wong <djwong@kernel.org>
Reviewed-by: NBrian Foster <bfoster@redhat.com>
上级 4533fc63
...@@ -3471,7 +3471,6 @@ xfs_bmap_compute_alignments( ...@@ -3471,7 +3471,6 @@ xfs_bmap_compute_alignments(
struct xfs_mount *mp = args->mp; struct xfs_mount *mp = args->mp;
xfs_extlen_t align = 0; /* minimum allocation alignment */ xfs_extlen_t align = 0; /* minimum allocation alignment */
int stripe_align = 0; int stripe_align = 0;
int error;
/* stripe alignment for allocation is determined by mount parameters */ /* stripe alignment for allocation is determined by mount parameters */
if (mp->m_swidth && (mp->m_flags & XFS_MOUNT_SWALLOC)) if (mp->m_swidth && (mp->m_flags & XFS_MOUNT_SWALLOC))
...@@ -3484,10 +3483,10 @@ xfs_bmap_compute_alignments( ...@@ -3484,10 +3483,10 @@ xfs_bmap_compute_alignments(
else if (ap->datatype & XFS_ALLOC_USERDATA) else if (ap->datatype & XFS_ALLOC_USERDATA)
align = xfs_get_extsz_hint(ap->ip); align = xfs_get_extsz_hint(ap->ip);
if (align) { if (align) {
error = xfs_bmap_extsize_align(mp, &ap->got, &ap->prev, if (xfs_bmap_extsize_align(mp, &ap->got, &ap->prev, align, 0,
align, 0, ap->eof, 0, ap->conv, ap->eof, 0, ap->conv, &ap->offset,
&ap->offset, &ap->length); &ap->length))
ASSERT(!error); ASSERT(0);
ASSERT(ap->length); ASSERT(ap->length);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册