Re: [PATCH] docs: point out that locals should be defined at the top of a block of code

2020-07-10 Thread Pavel Hrdina
On Thu, Jul 09, 2020 at 06:41:21PM -0400, Laine Stump wrote: > Although we have nothing in make syntax-check to enforce this, and > apparently there are places where it isn't the case (according to > Dan), we should discourage the practice of defining new variables in > the middle of a block of

Re: [PATCH] docs: point out that locals should be defined at the top of a block of code

2020-07-10 Thread Daniel P . Berrangé
On Thu, Jul 09, 2020 at 06:41:21PM -0400, Laine Stump wrote: > Although we have nothing in make syntax-check to enforce this, and > apparently there are places where it isn't the case (according to > Dan), we should discourage the practice of defining new variables in > the middle of a block of

Re: [PATCH] docs: point out that locals should be defined at the top of a block of code

2020-07-10 Thread Andrea Bolognani
On Thu, 2020-07-09 at 18:41 -0400, Laine Stump wrote: > +Defining Local Variables > + > + > +Always define local variables at the top of the block in which they > +are used (before any pure code). Although modern C compilers allow > +defining a local variable in the middle

[PATCH] docs: point out that locals should be defined at the top of a block of code

2020-07-09 Thread Laine Stump
Although we have nothing in make syntax-check to enforce this, and apparently there are places where it isn't the case (according to Dan), we should discourage the practice of defining new variables in the middle of a block of code.