Re: [PATCH] staging: wlan-ng: fix Missing a blank line after declarations warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
[]
> > 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:
	;
}
$

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel





[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux