> -----Original Message-----
> From: gre...@linuxfoundation.org [mailto:gre...@linuxfoundation.org]
> Sent: Wednesday, November 11, 2015 11:24 AM

> > If you move the variables to the top and have the early return as you 
> > suggest,
> then in some CONFIG cases, there will be all those automatic variables 
> declared
> but they are never used - the compiler has short-circuited the rest of the
> function.  Will not the compiler complain about unused variables in those 
> cases?
> That is the situation I was trying to avoid.
> 
> Try it and see (hint, I don't think so...)

I tested this - you are correct, no compiler warnings.  Looks like my fears 
were premature.  The failure logic will be inverted per Dan's comments.


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

Reply via email to