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
|
||||
|
||||
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)
|
||||
|
|
|
@ -126,7 +126,6 @@ public:
|
|||
};
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
|
|
|
@ -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 "
|
||||
|
|
Loading…
Reference in New Issue