← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Fix clang warnings

 

This is a guess (i'm not OP), but it's pretty common to shun assignment within an if condition. The second line probably just masks the warning from the compiler -- the check that triggers the warning probably isn't exhaustive enough to check within the parentheses for assignment.


On 6/2/2014 6:32 PM, Tomasz Wlostowski wrote:
On 02.06.2014 19:52, Bernhard Stegmaier wrote:
Hi,

building with clang (at least on OSX) and -Wall is really noisy so that
you can hardly see what’s going wrong.
So, I decided to fix the warnings… attached are 3 patches I prepared
(against rev. 4911):

*** clang-warnings-1.diff:
Everything that probably should be fixed:\

Hi Bernhard,

-            if( ip = s1.Intersect( s_next ) )
+            if( (ip = s1.Intersect( s_next )) )

What upsets clang in the first line? I'm asking because I'm unable to get Kicad to build with clang on Linux (wx 3.0) due to compilation errors in wx...

Tom

_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp



Follow ups

References