Fix compiler warnings.

Switch of compiler warnings for part of the code.
The compiler flag -Weffc++ of the gcc compiler creates many warnings about non virtual destructor of base classes where the
base class is actually a class from boost or from stl. Switch of the compiler flag for the problematic parts of the code
using preprocessor statements. There are also such preprocessor guards for code which creates many warnings when
using clang.

Filter warnings comming from generated files.
When using CTest all warnings comming from generated code (Root Dictionaries, code generated by protoc) will be filtered
before sending the results to the CDash web server.

Remove unused variables or use them.
Initialize all data members in initializer lists.
Use in initializer list the same order of data members as defined in the class declaration.
Declare private copy constructors and assignment operators where needed.

Fix format problems in printf statements.
Correctly cast the variables.
This commit is contained in:
Florian Uhlig
2016-03-17 13:19:49 +01:00
parent fa7040fe65
commit 4ca66e33da
5 changed files with 26 additions and 1 deletions

View File

@@ -65,6 +65,10 @@ int getHostIPs(map<string, string>& addressMap)
return 0;
}
#if defined(__GNUC__) || defined(__GNUG__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
// below are SFINAE template functions to check for function member signatures of class
namespace details
{
@@ -111,6 +115,9 @@ struct has_BindGetCurrentIndex
} // end namespace details
#if defined(__GNUC__) || defined(__GNUG__)
#pragma GCC diagnostic pop
#endif
// Alias template of the above structs
template<class T, class Sig>