mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 12:22:39 -03:00
bench: Don't return a bool from main
Return `EXIT_SUCCESS` 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. Also add a final return for clarity.
This commit is contained in:
parent
61fcef0f89
commit
493a166948
1 changed files with 5 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue