why isn't kdevelop pedantic save

Milian Wolff mail at milianw.de
Mon Mar 12 13:09:51 UTC 2012


On Monday 12 March 2012 14:04:19 Marcel Hellwig wrote:
> > On Monday 12 March 2012 11:46:39 Marcel Hellwig wrote:
> >> Hi guys,
> >> 
> >> I try to become acquainted with kdevelop now but there are some major
> >> problems, one I will claim here.
> >> Why isn't kdevelop (and KDE too) pedantic save? I mean, it is a software
> >> for the whole world and it should be safe and for that imo a program has
> >> to compile with pedantic.
> > 
> > Can you give examples for errors that make it not compile? Why do you - as
> > a *user* of our software - even compile it with pedantic?
> 
> As I said, I'm trying to become a developer of kdev, but it isn't that
> easy ;)
> For now I don't find any errors with pedantic, but a lot more errors,
> also in KDE itself. But it could be a bug (variadic macros).
> 
> >> But also without pedantic it gives a lot of warnings, e.g. unused
> >> variable. It is that hard to comment them out or to modify the signature
> >> of the method?
> > 
> > Have you ever worked on a big open source project? The code is written by
> > many different people and while it's easy in *some* cases to fix such
> > warnings, there are places where you cannot be sure whether this is
> > actually a bug or not. Hence you leave it as-is for now since it's just a
> > warning.
> 
> Not as a main dev, but for small commits and bug fixes (bukkit and
> theier plugins).
> 
> >> It would gain a better performance, because if you don't
> >> have to hand over a paramter you can save some bytes in stack and in
> >> heap too.
> > 
> > This is not true. Compilers are good enough to optimize these statements
> > out, if they are able to emit a warning for them.
> 
> *Most* compilers, but not every one ;)
> 
> >> So. Would it be possible to programm a bit "better" (i dont want to
> >> blame anyone that he (or she) is a bad programmer, but it is not that
> >> fine......)
> > 
> > Being better is of course something we aim for. Patches welcome. I'd like
> > to enable warning-as-errors in KDevelop code base eventually, maybe even
> > pedantic warnings. But as usual, there are some far more pressing issues
> > to resolve first.
> 
> Oh yes there are (: You can't enable warnings as errors, because KDE
> itself has some pedantic errors and they would be hard to fix (e.g. the
> variadic errors)
> In Kdevplatform are some wasted semicolons. Kind of funny (:
> I'm building kdev with pedantic and I am up to 21% and my terminal is
> exploding because of errors (1000 lines until now!)

As I said, patches welcome. Just put them up on reviewboard but keep them 
small and simple to review.

Bye
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20120312/5d27b28a/attachment.sig>


More information about the KDevelop-devel mailing list