Re: gcc doesn't warn about uninitialized variable use in switch/case with -O (was: Re: [PATCH] Staging: dgnc: Using temporary value for repeated dereferences)

2015-04-20 Thread Joe Perches
On Mon, 2015-04-20 at 03:42 -0700, Joe Perches wrote: > On Mon, 2015-04-20 at 11:33 +0300, Dan Carpenter wrote: > > You would hope that GCC would warn about the uninitialized variable but > > it doesn't. > > That's odd. So I filed this new gcc bugzilla: > https://gcc.gnu.org/bugzilla/show_bug.cgi

gcc doesn't warn about uninitialized variable use in switch/case with -O (was: Re: [PATCH] Staging: dgnc: Using temporary value for repeated dereferences)

2015-04-20 Thread Joe Perches
On Mon, 2015-04-20 at 11:33 +0300, Dan Carpenter wrote: > You would hope that GCC would warn about the uninitialized variable but > it doesn't. That's odd. So I filed this new gcc bugzilla: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65812) gcc 4.9.1 doesn't warn about uninitialized variable us

Re: [PATCH] Staging: dgnc: Using temporary value for repeated dereferences.

2015-04-20 Thread Dan Carpenter
On Sun, Apr 19, 2015 at 05:54:19PM -0700, Joe Perches wrote: > > diff --git a/drivers/staging/dgnc/dgnc_mgmt.c > > b/drivers/staging/dgnc/dgnc_mgmt.c > > index b13318a..0437117 100644 > > --- a/drivers/staging/dgnc/dgnc_mgmt.c > > +++ b/drivers/staging/dgnc/dgnc_mgmt.c > > @@ -131,6 +131,7 @@ long

Re: [PATCH] Staging: dgnc: Using temporary value for repeated dereferences.

2015-04-20 Thread Dan Carpenter
On Sun, Apr 19, 2015 at 11:58:53PM +0200, Yorick Rommers wrote: > Hello Joe, > > Thank you once again for the feedback. > I've changed my patch accordingly, see below. > > -- The patch is nice except for this chunk. And also you should be putting version numb

Re: [PATCH] Staging: dgnc: Using temporary value for repeated dereferences.

2015-04-19 Thread Joe Perches
On Sun, 2015-04-19 at 23:58 +0200, Yorick Rommers wrote: > Hello Joe, > > Thank you once again for the feedback. > I've changed my patch accordingly, see below. > > -- > > A patch for a line being too long (>80) in dgnc_mgmt.c, > fixed by making a temporary va

[PATCH] Staging: dgnc: Using temporary value for repeated dereferences.

2015-04-19 Thread Yorick Rommers
Hello Joe, Thank you once again for the feedback. I've changed my patch accordingly, see below. -- A patch for a line being too long (>80) in dgnc_mgmt.c, fixed by making a temporary value for dgnc_Board[brd], replacing all instanced of dgnc_Board[brd] with te