Add more warnings and fix the ones reported by them.

This commit is contained in:
Edoardo Prezioso 2011-10-22 15:00:44 +02:00
parent 3d8fa2f76e
commit 12f6ce46f8
4 changed files with 11 additions and 4 deletions

View File

@ -6,7 +6,7 @@ ifndef HAVE_RULES
endif
ifndef CXXFLAGS
CXXFLAGS=-Wall -Wextra -Wshadow -pedantic -Wno-long-long -Wfloat-equal -Wcast-qual -D_GLIBCXX_DEBUG -g
CXXFLAGS=-Wall -Wextra -Wshadow -pedantic -Wno-long-long -Wfloat-equal -Wcast-qual -Woverloaded-virtual -Wsign-promo -Wabi -Winline -Wredundant-decls -Wpacked -Wmissing-format-attribute -Wmissing-declarations -D_GLIBCXX_DEBUG -g
endif
ifeq ($(HAVE_RULES),yes)

View File

@ -126,7 +126,6 @@ public:
};
void checkExecutionPaths(const Token *tok, ExecutionPath *c);
void checkExecutionPaths(const Token *tok, ExecutionPath *c);

View File

@ -1587,7 +1587,7 @@ const Variable *Scope::getVariable(const std::string &varname) const
return NULL;
}
const Token* skipScopeIdentifiers(const Token* tok)
inline const Token* skipScopeIdentifiers(const Token* tok)
{
const Token* ret = tok;
@ -1601,7 +1601,7 @@ const Token* skipScopeIdentifiers(const Token* tok)
return ret;
}
const Token* skipPointers(const Token* tok)
inline const Token* skipPointers(const Token* tok)
{
const Token* ret = tok;

View File

@ -223,6 +223,14 @@ int main(int argc, char **argv)
"-Wno-long-long "
"-Wfloat-equal "
"-Wcast-qual "
"-Woverloaded-virtual "
"-Wsign-promo "
"-Wabi "
"-Winline "
"-Wredundant-decls "
"-Wpacked "
"-Wmissing-format-attribute "
"-Wmissing-declarations "
// "-Wsign-conversion "
// "-Wconversion "
"-D_GLIBCXX_DEBUG "