Add more warnings and fix the ones reported by them.
This commit is contained in:
parent
3d8fa2f76e
commit
12f6ce46f8
2
Makefile
2
Makefile
|
@ -6,7 +6,7 @@ ifndef HAVE_RULES
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef CXXFLAGS
|
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
|
endif
|
||||||
|
|
||||||
ifeq ($(HAVE_RULES),yes)
|
ifeq ($(HAVE_RULES),yes)
|
||||||
|
|
|
@ -126,7 +126,6 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void checkExecutionPaths(const Token *tok, ExecutionPath *c);
|
|
||||||
void checkExecutionPaths(const Token *tok, ExecutionPath *c);
|
void checkExecutionPaths(const Token *tok, ExecutionPath *c);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1587,7 +1587,7 @@ const Variable *Scope::getVariable(const std::string &varname) const
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Token* skipScopeIdentifiers(const Token* tok)
|
inline const Token* skipScopeIdentifiers(const Token* tok)
|
||||||
{
|
{
|
||||||
const Token* ret = tok;
|
const Token* ret = tok;
|
||||||
|
|
||||||
|
@ -1601,7 +1601,7 @@ const Token* skipScopeIdentifiers(const Token* tok)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Token* skipPointers(const Token* tok)
|
inline const Token* skipPointers(const Token* tok)
|
||||||
{
|
{
|
||||||
const Token* ret = tok;
|
const Token* ret = tok;
|
||||||
|
|
||||||
|
|
|
@ -223,6 +223,14 @@ int main(int argc, char **argv)
|
||||||
"-Wno-long-long "
|
"-Wno-long-long "
|
||||||
"-Wfloat-equal "
|
"-Wfloat-equal "
|
||||||
"-Wcast-qual "
|
"-Wcast-qual "
|
||||||
|
"-Woverloaded-virtual "
|
||||||
|
"-Wsign-promo "
|
||||||
|
"-Wabi "
|
||||||
|
"-Winline "
|
||||||
|
"-Wredundant-decls "
|
||||||
|
"-Wpacked "
|
||||||
|
"-Wmissing-format-attribute "
|
||||||
|
"-Wmissing-declarations "
|
||||||
// "-Wsign-conversion "
|
// "-Wsign-conversion "
|
||||||
// "-Wconversion "
|
// "-Wconversion "
|
||||||
"-D_GLIBCXX_DEBUG "
|
"-D_GLIBCXX_DEBUG "
|
||||||
|
|
Loading…
Reference in New Issue