lkml.org 
[lkml]   [2014]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] staging: wlan-ng: fix Missing a blank line after declarations warnings
From
Date
On Fri, 2014-06-13 at 10:15 -0700, Greg Kroah-Hartman wrote:
> On Fri, Jun 13, 2014 at 10:58:14PM +0800, Cheng-Wei Lee wrote:
> > Signed-off-by: Quentin Lee <lee.rhapsody@gmail.com>
[]
> > diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c
[]
> > @@ -3533,7 +3533,6 @@ static void hfa384x_usbin_rx(wlandevice_t
> > *wlandev, struct sk_buff *skb)
> > }
> >
> > done:
> > - return;
> > }
>
> That's a good thing to do, but it is not what you said you did up above
> in the changelog entry.

I don't believe it's a good thing to do at all.
I suspect more that this wasn't compile tested.

This doesn't compile for at least several
supported gcc versions.

gcc doesn't (didn't? I haven't tried 4.9) like:

label:
}

to terminate a function definition.

$ cat label_test.c
void func(void)
{
goto label;
label:
}
$

with gcc 4.8:

$ gcc label_test.c
label_test.c: In function ‘func’:
label_test.c:5:1: error: label at end of compound statement
label:
^

whereas this compiles fine:

$ cat label_test2.c
void func(void)
{
goto label;
label:
;
}
$

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2014-06-13 23:41    [W:5.644 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site