diff options
author | Nico Weber <thakis@chromium.org> | 2013-05-24 01:20:22 (GMT) |
---|---|---|
committer | Nico Weber <thakis@chromium.org> | 2013-05-24 01:20:22 (GMT) |
commit | 3c8b7515f41f5b636a437a808a77fcad959b6831 (patch) | |
tree | 61adc066f9d47ea9031aadb6ab301be38c6fa738 /src/ninja.cc | |
parent | 31ef1415f208e04000424e6fc446fe4377bc7ed3 (diff) | |
download | Ninja-3c8b7515f41f5b636a437a808a77fcad959b6831.zip Ninja-3c8b7515f41f5b636a437a808a77fcad959b6831.tar.gz Ninja-3c8b7515f41f5b636a437a808a77fcad959b6831.tar.bz2 |
Don't use va_start() with reference parameters, it's undefined behavior.
Should fix issue #584.
Diffstat (limited to 'src/ninja.cc')
-rw-r--r-- | src/ninja.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ninja.cc b/src/ninja.cc index b4797ed..bb3abe1 100644 --- a/src/ninja.cc +++ b/src/ninja.cc @@ -385,7 +385,7 @@ int ToolTargets(Globals* globals, int argc, char* argv[]) { return ToolTargetsList(globals->state); } else { const char* suggestion = - SpellcheckString(mode, "rule", "depth", "all", NULL); + SpellcheckString(mode.c_str(), "rule", "depth", "all", NULL); if (suggestion) { Error("unknown target tool mode '%s', did you mean '%s'?", mode.c_str(), suggestion); @@ -628,7 +628,7 @@ bool DebugEnable(const string& name, Globals* globals) { return true; } else { const char* suggestion = - SpellcheckString(name, "stats", "explain", NULL); + SpellcheckString(name.c_str(), "stats", "explain", NULL); if (suggestion) { Error("unknown debug setting '%s', did you mean '%s'?", name.c_str(), suggestion); |