mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 12:22:39 -03:00
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:
commit
24f7011841
1 changed files with 5 additions and 4 deletions
|
@ -39,20 +39,19 @@ static void SetupBenchArgs()
|
||||||
gArgs.AddArg("-help", "", false, OptionsCategory::HIDDEN);
|
gArgs.AddArg("-help", "", false, OptionsCategory::HIDDEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int main(int argc, char** argv)
|
||||||
main(int argc, char** argv)
|
|
||||||
{
|
{
|
||||||
SetupBenchArgs();
|
SetupBenchArgs();
|
||||||
std::string error;
|
std::string error;
|
||||||
if (!gArgs.ParseParameters(argc, argv, error)) {
|
if (!gArgs.ParseParameters(argc, argv, error)) {
|
||||||
fprintf(stderr, "Error parsing command line arguments: %s\n", error.c_str());
|
fprintf(stderr, "Error parsing command line arguments: %s\n", error.c_str());
|
||||||
return false;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HelpRequested(gArgs)) {
|
if (HelpRequested(gArgs)) {
|
||||||
std::cout << gArgs.GetHelpMessage();
|
std::cout << gArgs.GetHelpMessage();
|
||||||
|
|
||||||
return 0;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
SHA256AutoDetect();
|
SHA256AutoDetect();
|
||||||
|
@ -80,4 +79,6 @@ main(int argc, char** argv)
|
||||||
benchmark::BenchRunner::RunAll(*printer, evaluations, scaling_factor, regex_filter, is_list_only);
|
benchmark::BenchRunner::RunAll(*printer, evaluations, scaling_factor, regex_filter, is_list_only);
|
||||||
|
|
||||||
ECC_Stop();
|
ECC_Stop();
|
||||||
|
|
||||||
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue