Hi Peter,
Here is the continuation of my post on compiler warnings, this time regarding adding default ctors and initializing all of the members in the initializer list. In general that’s a good thing, everybody would agree! My problem is with adding default ctors to private Data classes (e.g. Protocols::Generics::Packet::Data).
[snip]
I don’t think that the (after) example is of higher quality. It’s more code and what’s worse, it’s duplicated code in my opinion.
Yes, I agree with you and I don’t see reasons why we should duplicate the code this way. Since we’ve found more than one warning that we won’t fix (on purpose) and agreed on a ‘ignore warnings list’, we could create a new page in Trac wiki where we’ll put warnings (probably in the g++ format since we’re using it, but there could be exceptions, of course - maybe it could be in a “pseudo-non-existing-compiler” format) with a brief description why we decided to ignore a particular warning and references to our discussions. I’ll later think of a script that will filter these warnings.
How do you filter your output?
[snip]
I’m just using [f]grep with (according to the situation) raw strings, something like:
cat warnings.log | fgrep -v /usr/include/qt4/ | fgrep 'warning' > warnings.filtered.log
These strings are “hard-coded”, but it works for me. There are more greps in my scripts and it’s not a perfect solution, but it’s fine for now and I’ll need to elaborate on to get a better solution.
Regards,
Petr
