Merge #13349: bench: Don't return a bool from main

493a166948 bench: Don't return a bool from main (Wladimir J. van der Laan)

Pull request description:

  Return `1` from `main()` on error, not the bool `false` (introduced in #13112). This is the correct value to return on error, and also shuts up a clang warning.

Tree-SHA512: 52a0f1b2f6ae2697555f71ee2019ce657046f7f379f1f4faf3cce9d5f3fb21fcdc43a4c84895a2a8b6929997ba70bbe87c231f2f9553215b84c22333810d58d9
This commit is contained in:
MarcoFalke 2018-05-31 05:14:07 -04:00
commit 24f7011841
No known key found for this signature in database
GPG key ID: D2EA4850E7528B25

View file

@ -39,20 +39,19 @@ static void SetupBenchArgs()
gArgs.AddArg("-help", "", false, OptionsCategory::HIDDEN);
}
int
main(int argc, char** argv)
int main(int argc, char** argv)
{
SetupBenchArgs();
std::string error;
if (!gArgs.ParseParameters(argc, argv, error)) {
fprintf(stderr, "Error parsing command line arguments: %s\n", error.c_str());
return false;
return EXIT_FAILURE;
}
if (HelpRequested(gArgs)) {
std::cout << gArgs.GetHelpMessage();
return 0;
return EXIT_SUCCESS;
}
SHA256AutoDetect();
@ -80,4 +79,6 @@ main(int argc, char** argv)
benchmark::BenchRunner::RunAll(*printer, evaluations, scaling_factor, regex_filter, is_list_only);
ECC_Stop();
return EXIT_SUCCESS;
}