Re: [PATCH] cifs: remove redundant assignment to variable rc

2019-08-01 Thread Steve French
merged into cifs-2.6.git for-next On Wed, Jul 31, 2019 at 10:54 AM Colin Ian King wrote: > > On 31/07/2019 16:34, Aurélien Aptel wrote: > > "Dan Carpenter" writes: > >> You're just turning off GCC's static analysis (and introducing false > >> positives) when you do that. We have seen bugs cause

Re: [PATCH] cifs: remove redundant assignment to variable rc

2019-08-01 Thread Dan Carpenter
On Wed, Jul 31, 2019 at 05:34:39PM +0200, Aurélien Aptel wrote: > "Dan Carpenter" writes: > > You're just turning off GCC's static analysis (and introducing false > > positives) when you do that. We have seen bugs caused by this and never > > seen any bugs prevented by this style. > > You've nev

Re: [PATCH] cifs: remove redundant assignment to variable rc

2019-07-31 Thread Colin Ian King
On 31/07/2019 16:34, Aurélien Aptel wrote: > "Dan Carpenter" writes: >> You're just turning off GCC's static analysis (and introducing false >> positives) when you do that. We have seen bugs caused by this and never >> seen any bugs prevented by this style. > > You've never seen bugs prevented b

Re: [PATCH] cifs: remove redundant assignment to variable rc

2019-07-31 Thread Aurélien Aptel
"Dan Carpenter" writes: > You're just turning off GCC's static analysis (and introducing false > positives) when you do that. We have seen bugs caused by this and never > seen any bugs prevented by this style. You've never seen bugs prevented by initializing uninitialized variables? Code can cha

Re: [PATCH] cifs: remove redundant assignment to variable rc

2019-07-31 Thread Dan Carpenter
On Wed, Jul 31, 2019 at 12:09:31PM +0200, Aurélien Aptel wrote: > Colin King writes: > > Variable rc is being initialized with a value that is never read > > and rc is being re-assigned a little later on. The assignment is > > redundant and hence can be removed. > > I think I would actually rathe

Re: [PATCH] cifs: remove redundant assignment to variable rc

2019-07-31 Thread Aurélien Aptel
Colin King writes: > Variable rc is being initialized with a value that is never read > and rc is being re-assigned a little later on. The assignment is > redundant and hence can be removed. I think I would actually rather have rc set to an error by default than uninitialized. Just my personal op

[PATCH] cifs: remove redundant assignment to variable rc

2019-07-31 Thread Colin King
From: Colin Ian King Variable rc is being initialized with a value that is never read and rc is being re-assigned a little later on. The assignment is redundant and hence can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- fs/cifs/smb2pdu.c | 2 +- 1 file cha