disable the 'unused parameter' warning

It was firing too often, and hadn't uncovered any bugs.
This commit is contained in:
Evan Martin 2011-12-05 11:53:33 -08:00
parent 3b9f727e2b
commit 3d17415c46
9 changed files with 15 additions and 12 deletions

View File

@ -74,7 +74,10 @@ n.variable('builddir', 'build')
n.variable('cxx', os.environ.get('CXX', 'g++'))
n.variable('ar', os.environ.get('AR', 'ar'))
cflags = ['-g', '-Wall', '-Wextra', '-Wno-deprecated', '-fno-exceptions',
cflags = ['-g', '-Wall', '-Wextra',
'-Wno-deprecated',
'-Wno-unused-parameter',
'-fno-exceptions',
'-fvisibility=hidden', '-pipe']
if not options.debug:
cflags += ['-O2', '-DNDEBUG']

View File

@ -20,7 +20,7 @@
#include "../build/browse_py.h"
void RunBrowsePython(State* /* state */, const char* ninja_command,
void RunBrowsePython(State* state, const char* ninja_command,
const char* initial_target) {
// Fork off a Python process and have it run our code via its stdin.
// (Actually the Python process becomes the parent.)

View File

@ -421,7 +421,7 @@ struct DryRunCommandRunner : public CommandRunner {
finished_.push(edge);
return true;
}
virtual Edge* WaitForCommand(bool* success, string* /* output */) {
virtual Edge* WaitForCommand(bool* success, string* output) {
if (finished_.empty())
return NULL;
*success = true;

View File

@ -251,7 +251,7 @@ bool BuildTest::StartCommand(Edge* edge) {
return true;
}
Edge* BuildTest::WaitForCommand(bool* success, string* /* output */) {
Edge* BuildTest::WaitForCommand(bool* success, string* output) {
if (Edge* edge = last_command_) {
if (edge->rule_->name_ == "fail")
*success = false;

View File

@ -163,15 +163,15 @@ struct StatTest : public StateTestWithBuiltinRules,
public DiskInterface {
// DiskInterface implementation.
virtual int Stat(const string& path);
virtual bool MakeDir(const string& /* path */) {
virtual bool MakeDir(const string& path) {
assert(false);
return false;
}
virtual string ReadFile(const string& /* path */, string* /* err */) {
virtual string ReadFile(const string& path, string* err) {
assert(false);
return "";
}
virtual int RemoveFile(const string& /* path */) {
virtual int RemoveFile(const string& path) {
assert(false);
return 0;
}

View File

@ -203,8 +203,8 @@ bool Edge::LoadDepFile(State* state, DiskInterface* disk_interface,
// Check that this depfile matches our output.
StringPiece opath = StringPiece(outputs_[0]->file_->path_);
if (opath != makefile.out_) {
*err = "expected makefile to mention '" + outputs_[0]->file_->path_ + "', "
"got '" + makefile.out_.AsString() + "'";
*err = "expected depfile '" + path + "' to mention '" +
outputs_[0]->file_->path_ + "', got '" + makefile.out_.AsString() + "'";
return false;
}

View File

@ -367,7 +367,7 @@ int CmdTargets(State* state, int argc, char* argv[]) {
}
}
int CmdRules(State* state, int /* argc */, char* /* argv */[]) {
int CmdRules(State* state, int argc, char* /* argv */[]) {
for (map<string, const Rule*>::iterator i = state->rules_.begin();
i != state->rules_.end(); ++i) {
if (i->second->description_.unparsed_.empty()) {

View File

@ -37,7 +37,7 @@ Subprocess::~Subprocess() {
Finish();
}
bool Subprocess::Start(SubprocessSet* /* set */, const string& command) {
bool Subprocess::Start(SubprocessSet* set, const string& command) {
int output_pipe[2];
if (pipe(output_pipe) < 0)
Fatal("pipe: %s", strerror(errno));

View File

@ -51,7 +51,7 @@ bool VirtualFileSystem::MakeDir(const string& path) {
return true; // success
}
string VirtualFileSystem::ReadFile(const string& path, string* /* err */) {
string VirtualFileSystem::ReadFile(const string& path, string* err) {
files_read_.push_back(path);
FileMap::iterator i = files_.find(path);
if (i != files_.end())