Build: Enabled the Wextra flag when building cppcheck

This commit is contained in:
Daniel Marjamäki 2009-01-22 21:16:50 +00:00
parent 5de5eab9fe
commit e691ade8e6
2 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,4 @@
CXXFLAGS=-Wall -pedantic -g
CXXFLAGS=-Wall -Wextra -pedantic -g
BIN=${DESTDIR}/usr/bin

View File

@ -37,6 +37,8 @@ void getDeps(const std::string &filename, std::vector<std::string> &depfiles)
std::ifstream f(filename.c_str());
if (! f.is_open())
return;
if (filename.find(".c") == std::string::npos)
depfiles.push_back(filename);
std::string path(filename);
if (path.find("/") != std::string::npos)
@ -56,7 +58,6 @@ void getDeps(const std::string &filename, std::vector<std::string> &depfiles)
hfile.erase(0, 4 + hfile.find("/../"));
if (std::find(depfiles.begin(), depfiles.end(), hfile) != depfiles.end())
continue;
depfiles.push_back(hfile);
getDeps(hfile, depfiles);
}
}
@ -76,7 +77,8 @@ int main()
std::ofstream fout("Makefile");
fout << "CXXFLAGS=-Wall -pedantic -g\n";
// more warnings.. -Wfloat-equal -Wcast-qual -Wsign-conversion -Wlogical-op
fout << "CXXFLAGS=-Wall -Wextra -pedantic -g\n";
fout << "BIN=${DESTDIR}/usr/bin\n\n";
fout << "\n###### Object Files\n\n";