Re: Compiling without warnings issues

Hi Petr,

Maybe we should create a list with warnings that are being “ignored” (resolved as non-problematic and hard/superfluous to fix)?

That’s a good idea! We could keep a list of warnings that should be ignored and write a tiny script to filter all Qt, 3rdParty and ignored warnings! That would be a perfect solution!

#define REFERENCE_OBJECT(Class)
Class (const Class &);
Class & operator= (const Class &);
// Reference objects should be compared only as pointers, so disable comparison operators
bool operator== (const Class &);
bool operator!= (const Class &);

You’re right! But are operator== and != generated automatically by the compiler? I think rather not (but have to check again). Another idea would be to implement these operators like return this == &other;, which would be useless if we always use pointers for ReferenceObjects rather references.


#define STATIC_HELPER(Class)
Class();
// Since there is no need to have these in the class (generated by compiler), disable them
~Class();
Class (const Class &);
Class & operator= (const Class &);

OK!

+ add some docs (I think that Doxygen has tags to document macros).

Sure!

Regards,

Peter

Would you like to post a relpy?


This post is a reply to:
Re: Compiling without warnings issues
Hi Peter, I’m mostly having trouble with this: Protocols/Gnutella/Packets/Testing/../BinaryReader.h:40: warning: base class ‘class Utils::Encodings::BinaryReader’ has a non-virtual destructor ./Utils/Uri.h:148: warning: base class ‘class QSharedData’ has a non-virtual destructor [snip] I’ve read some mailing list discussions (more...)

Follow-ups:
Re: Compiling without warnings issues
Hi Peter, I've fixed nearly all ("fixable") warnings in the Protocols::BitTorrent::{Bencoding,Torrents,Trackers} packages and I've found some things which I'd like to discuss. Protocols/BitTorrent/Trackers/TrackerRequestUrlCreator.cpp:110: warning: switch missing default case I haven't noticed that since (more...)
Re: Compiling without warnings issues
Hi Peter, That’s a good idea! We could keep a list of warnings that should be ignored and write a tiny script to filter all Qt, 3rdParty and ignored warnings! That (more...)
Re: Compiling without warnings issues
Hold on! Your compiler is telling you something! ./Utils/Uri.h:148: warning: base class ‘class QSharedData’ has a non-virtual destructor In Java you have a keyword which is called final, in C# it is sealed. (more...)