xfs: remove redundant assignment to variable error
Subsystems (2)
PATCH 1/1 xfs: remove redundant assignment to variable error
From: Colin Ian King <[email protected]>
Variable error is being initialized with a value that is never read and is being re-assigned a couple of statements later on. The assignment is redundant and hence can be removed.
Addresses-Coverity: ("Unused value")
--- fs/xfs/xfs_super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_super.c +1 -1
@@ -1362,7 +1362,7 @@ xfs_fc_fill_super( {struct xfs_mount *mp = sb->s_fs_info;struct inode *root; -int flags =0 , error = -ENOMEM ; +int flags =0 , error; mp->m_super = sb;
Signature · 1 line
2.20.1
Quoted 7 lines · Colin King
From: Colin Ian King <[email protected]>
Variable error is being initialized with a value that is never read and is being re-assigned a couple of statements later on. The assignment is redundant and hence can be removed.
Addresses-Coverity: ("Unused value")
Er... is there a coverity id that goes with this?
Patch looks fine otherwise.
--D
Quoted 21 lines
Signed-off-by Colin Ian King <[email protected]>--- fs/xfs/xfs_super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/xfs/xfs_super.c +1
-1@@ -1362,7 +1362,7 @@ xfs_fc_fill_super( {struct xfs_mount *mp = sb->s_fs_info;struct inode *root; -int flags =0 , error = -ENOMEM ; +int flags =0 , error; mp->m_super = sb;Signature · 1 line
2.20.1
Quoted 10 lines · Darrick J. Wong
Quoted 7 lines · Colin King
From: Colin Ian King <[email protected]>
Variable error is being initialized with a value that is never read and is being re-assigned a couple of statements later on. The assignment is redundant and hence can be removed.
Addresses-Coverity: ("Unused value")
Er... is there a coverity id that goes with this?
Unfortunately it is a private one, so it does not make sense to use it.
Quoted 26 lines
Patch looks fine otherwise.
--D
Quoted 21 lines
Signed-off-by Colin Ian King <[email protected]>--- fs/xfs/xfs_super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/xfs/xfs_super.c +1
-1@@ -1362,7 +1362,7 @@ xfs_fc_fill_super( {struct xfs_mount *mp = sb->s_fs_info;struct inode *root; -int flags =0 , error = -ENOMEM ; +int flags =0 , error; mp->m_super = sb;Signature · 1 line
2.20.1
Quoted 8 lines · Colin Ian King
Quoted 7 lines · Darrick J. Wong
Quoted 6 lines · Colin King
From: Colin Ian King <[email protected]>
Variable error is being initialized with a value that is never read and is being re-assigned a couple of statements later on. The assignment is redundant and hence can be removed.
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Addresses-Coverity: ("Unused value")
Er... is there a coverity id that goes with this?
Unfortunately it is a private one, so it does not make sense to use it.
If it's not in the upstream coverity scan (and AFAICT it's not), it makes no sense to reference coverity in the commit log. It's not useful to anyone IMHO.
-Eric
Quoted 11 lines · Eric Sandeen
Quoted 8 lines · Colin Ian King
Quoted 7 lines · Darrick J. Wong
Quoted 6 lines · Colin King
From: Colin Ian King <[email protected]>
Variable error is being initialized with a value that is never read and is being re-assigned a couple of statements later on. The assignment is redundant and hence can be removed.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Addresses-Coverity: ("Unused value")
Er... is there a coverity id that goes with this?
Unfortunately it is a private one, so it does not make sense to use it.
If it's not in the upstream coverity scan (and AFAICT it's not),
that's because I'm using coverity with improved tuned coverage settings and coverity scan is just set on the default low setting.
Quoted 2 lines
it makes no sense to reference coverity in the commit log. It's not useful to anyone IMHO.
It's useful for tracking which bugs are being picked up with Coverity and the kind of bug issue. I'm trying to gather stats on static analysis fixes that land in linux to help catagorize the types of issues with fixes landing upstream.
Quoted 3 lines
-Eric
Quoted 23 lines · Colin Ian King
Quoted 11 lines · Eric Sandeen
Quoted 8 lines · Colin Ian King
Quoted 7 lines · Darrick J. Wong
Quoted 6 lines · Colin King
From: Colin Ian King <[email protected]>
Variable error is being initialized with a value that is never read and is being re-assigned a couple of statements later on. The assignment is redundant and hence can be removed.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Addresses-Coverity: ("Unused value")
Er... is there a coverity id that goes with this?
Unfortunately it is a private one, so it does not make sense to use it.
If it's not in the upstream coverity scan (and AFAICT it's not),
that's because I'm using coverity with improved tuned coverage settings and coverity scan is just set on the default low setting.
Quoted 7 lines
Quoted 2 lines
it makes no sense to reference coverity in the commit log. It's not useful to anyone IMHO.
It's useful for tracking which bugs are being picked up with Coverity and the kind of bug issue. I'm trying to gather stats on static analysis fixes that land in linux to help catagorize the types of issues with fixes landing upstream.
The commit log is public.
The way you've tagged the commit really makes no sense to anyone outside of your org.
Maybe:
or something would make more sense to the general public?
-Eric
Quoted 13 lines · Eric Sandeen
Quoted 10 lines · Colin Ian King
Quoted 9 lines · Darrick J. Wong
Quoted 7 lines · Colin King
From: Colin Ian King <[email protected]>
Variable error is being initialized with a value that is never read and is being re-assigned a couple of statements later on. The assignment is redundant and hence can be removed.
Addresses-Coverity: ("Unused value")
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Er... is there a coverity id that goes with this?
Unfortunately it is a private one, so it does not make sense to use it.
If it's not in the upstream coverity scan (and AFAICT it's not), it makes no sense to reference coverity in the commit log. It's not useful to anyone IMHO.
It's sort of useful if want to see how the bug was found or if you want to count how many bugs coverity finds... I'm pretty sure I remember someone complaining that it wasn't mentioned in the commit.
regards,
dan carpenter