From: kernel test robot <lkp@intel.com>
To: Allison Collins <allison.henderson@oracle.com>
Cc: kbuild-all@lists.01.org, linux-xfs@vger.kernel.org,
"Darrick J. Wong" <darrick.wong@oracle.com>,
Chandan Rajendra <chandanrlinux@gmail.com>,
Brian Foster <bfoster@redhat.com>
Subject: [xfs-linux:xfs-5.9-merge 95/116] fs/xfs/libxfs/xfs_attr_leaf.c:718:23: warning: variable 'error' set but not used
Date: Sat, 25 Jul 2020 07:49:25 +0800 [thread overview]
Message-ID: <202007250720.aICpTFU2%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2694 bytes --]
tree: https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git xfs-5.9-merge
head: 9f347d7a7e0ee9b12434b9ef0ccac3a2680960de
commit: cfe3d8821c6fc4358e82ec234940891f353ab03b [95/116] xfs: Add xfs_has_attr and subroutines
config: x86_64-rhel-7.6-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
git checkout cfe3d8821c6fc4358e82ec234940891f353ab03b
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
fs/xfs/libxfs/xfs_attr_leaf.c: In function 'xfs_attr_shortform_add':
>> fs/xfs/libxfs/xfs_attr_leaf.c:718:23: warning: variable 'error' set but not used [-Wunused-but-set-variable]
718 | int offset, size, error;
| ^~~~~
vim +/error +718 fs/xfs/libxfs/xfs_attr_leaf.c
706
707 /*
708 * Add a name/value pair to the shortform attribute list.
709 * Overflow from the inode has already been checked for.
710 */
711 void
712 xfs_attr_shortform_add(
713 struct xfs_da_args *args,
714 int forkoff)
715 {
716 struct xfs_attr_shortform *sf;
717 struct xfs_attr_sf_entry *sfe;
> 718 int offset, size, error;
719 struct xfs_mount *mp;
720 struct xfs_inode *dp;
721 struct xfs_ifork *ifp;
722
723 trace_xfs_attr_sf_add(args);
724
725 dp = args->dp;
726 mp = dp->i_mount;
727 dp->i_d.di_forkoff = forkoff;
728
729 ifp = dp->i_afp;
730 ASSERT(ifp->if_flags & XFS_IFINLINE);
731 sf = (xfs_attr_shortform_t *)ifp->if_u1.if_data;
732 error = xfs_attr_sf_findname(args, &sfe, NULL);
733 ASSERT(error != -EEXIST);
734
735 offset = (char *)sfe - (char *)sf;
736 size = XFS_ATTR_SF_ENTSIZE_BYNAME(args->namelen, args->valuelen);
737 xfs_idata_realloc(dp, size, XFS_ATTR_FORK);
738 sf = (xfs_attr_shortform_t *)ifp->if_u1.if_data;
739 sfe = (xfs_attr_sf_entry_t *)((char *)sf + offset);
740
741 sfe->namelen = args->namelen;
742 sfe->valuelen = args->valuelen;
743 sfe->flags = args->attr_filter;
744 memcpy(sfe->nameval, args->name, args->namelen);
745 memcpy(&sfe->nameval[args->namelen], args->value, args->valuelen);
746 sf->hdr.count++;
747 be16_add_cpu(&sf->hdr.totsize, size);
748 xfs_trans_log_inode(args->trans, dp, XFS_ILOG_CORE | XFS_ILOG_ADATA);
749
750 xfs_sbversion_add_attr2(mp, args->trans);
751 }
752
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 50005 bytes --]
reply other threads:[~2020-07-25 0:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202007250720.aICpTFU2%lkp@intel.com \
--to=lkp@intel.com \
--cc=allison.henderson@oracle.com \
--cc=bfoster@redhat.com \
--cc=chandanrlinux@gmail.com \
--cc=darrick.wong@oracle.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox