Hi all,
I’ve extracted some warning messages from my compilation log (gcc 4.1.2) and I’d like you to look at them. I’d suggest to fix nearly all warnings but unused parameter warning. They were taken from my dev branch which is basicly ‘Calitko v0.6.1′ branch so maybe some of them are fixed in your branches.
Gnutella:
Gnutella/PacketProcessing/DynamicSearching/DynamicSearcher.cpp:61: warning: suggest parentheses around assignment used as truth value
Gnutella/Handshaking/SlotAllocator.cpp:191: warning: comparison of unsigned expression >= 0 is always true
Gnutella/Handshaking/SlotAllocator.cpp:192: warning: comparison of unsigned expression >= 0 is always true
Gnutella/Handshaking/SlotAllocator.cpp:193: warning: comparison of unsigned expression >= 0 is always true
Gnutella/Packets/Packet.cpp:308: warning: comparison between signed and unsigned integer expressions
Gnutella/Packets/Packet.cpp:459: warning: comparison between signed and unsigned integer expressions
Gnutella/Packets/Testing/PacketTest.cpp:245: warning: comparison between signed and unsigned integer expressions
UI:
UIs/PacketDumpTreeView.cpp:49: warning: enumeration value ... not handled in switch
UIs/TransferTreeView.cpp:61: warning: enumeration value ... not handled in switch
(add ‘default:’ there)
3rdParty:
3rdParty/moc/TestGenerator.cpp:162: warning: too many arguments for format
I especially “hate” these two warnings so I’ve had to write a filter script to remove them when I’m compiling unit tests :).
3rdParty/cppunit/extensions/TestFixtureFactory.h:17: warning: ‘class CppUnit::TestFixtureFactory’ has virtual functions but non-virtual destructor
3rdParty/cppunit/extensions/TestFixtureFactory.h:30: warning: ‘class CppUnit::ConcretTestFixtureFactory’ has virtual functions but non-virtual destructor
I’m used to compile without warnings but if it’s not necessary then it won’t be a problem for me. It’s compiler dependant so if you’re not using gcc you can have other warnings or none of them.
What do you think of that (try to compile without warnings)?
Petr
