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:
* Disable “overloaded virtual” and many template warnings by means of compiler 
switch (maybe they should be checked somewhen, but most of the stuff seems to 
come from wxWidgets and other libraries)
* Mainly cosmetic stuff and some things with undefined behavior
* A real catch in view.cpp with a wrong “;”

*** clang-warnings-2.diff:
Removes every variable/function reported as unused. 
Might probably depend on my configuration, I don’t know whether they should be 
kept or not for whatever reason.

*** clang-warnings-3.diff:
Removes unneeded checks (e.g., a check “x > 0” for an "unsigned x” is pretty 
obsolete).

With those 3 patches it builds really nice and clean also with clang (like I 
have seen on linux with gcc).


Best regards,
Bernhard

Attachment: clang-warnings-1.diff
Description: Binary data

Attachment: clang-warnings-2.diff
Description: Binary data

Attachment: clang-warnings-3.diff
Description: Binary data

_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to