freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] WIP PATCH: clang static analyzer and warning fixes


From: Werner LEMBERG
Subject: Re: [ft-devel] WIP PATCH: clang static analyzer and warning fixes
Date: Tue, 04 Mar 2014 04:50:06 +0100 (CET)

> Here's another 2 patches to fix most of the remaining warnings.

Thanks, I've applied the first one (and sorry for forgetting git
commit's `--author' flag).  However, I strongly dislike the second
one.  IMHO, this is wrong analysis of clang (BTW, what exactly does it
report?).  The declaration of a variable with a later initialization
is fully justified.  FreeType is full of such code, and I strongly
believe that code in general is more readable if a variable is
initialized at a logical place.

I can't imagine that compilers do better if initialization and
declaration is emitted at the same point.  This certainly gets
optimized in *any* decent compiler, in case optimization is necessary
at all for that.


    Werner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]