All of lore.kernel.org
 help / color / mirror / Atom feed
* [xfs-linux:xfs-5.9-merge 95/116] fs/xfs/libxfs/xfs_attr_leaf.c:718:23: warning: variable 'error' set but not used
@ 2020-07-24 23:49 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-07-24 23:49 UTC (permalink / raw)
  To: Allison Collins
  Cc: kbuild-all, linux-xfs, Darrick J. Wong, Chandan Rajendra, Brian Foster

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [xfs-linux:xfs-5.9-merge 95/116] fs/xfs/libxfs/xfs_attr_leaf.c:718:23: warning: variable 'error' set but not used
@ 2020-07-24 23:49 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-07-24 23:49 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2769 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(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 50005 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-25  0:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-24 23:49 [xfs-linux:xfs-5.9-merge 95/116] fs/xfs/libxfs/xfs_attr_leaf.c:718:23: warning: variable 'error' set but not used kernel test robot
2020-07-24 23:49 ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.