[PATCH xcalc 3/3] Reduce scope of i (cppcheck --verbose --enable=all)

Stéphane Aulery lkppo at free.fr
Mon Jul 8 14:34:10 PDT 2013


Le lundi 08 juillet 2013 à 02:53:09, Matthieu Herrb a écrit :
> On Sun, Jul 07, 2013 at 10:50:30PM +0200, Stéphane Aulery wrote:
> > Signed-off-by: Stéphane Aulery <lkppo at free.fr>
> > 
> > diff --git a/math.c b/math.c
> > index a8c4a5c..b09b94a 100644
> > --- a/math.c
> > -      for (i=1; i < XCALC_MEMORY; i++)
> > +      for (int i=1; i < XCALC_MEMORY; i++)
> 
> This is a C99 only feature. There are still people build X with
> compilers that aren't fully C99 and don't understand this idiom.
> 
> If you really want to hack on xcalc, please fix 
> https://bugs.freedesktop.org/show_bug.cgi?id=10578

It is true that these changes are highly questionable (stylistic). I'll
stick to the doc fixes for the moment.

-- 
Stéphane Aulery


More information about the xorg-devel mailing list