Page MenuHomePhabricator

bench: Don't return a bool from main
ClosedPublic

Authored by Fabien on Wed, Jul 31, 14:21.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Commits
rABC6ddee6965f62: bench: Don't return a bool from main
Summary
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.

Backport of core PR13349
https://github.com/bitcoin/bitcoin/pull/13349/files

Test Plan

With clang:

ninja bench-bitcoin

Ensure there is no -Wmain warning during the build.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Wed, Jul 31, 14:21
Herald added a reviewer: Restricted Project. · View Herald TranscriptWed, Jul 31, 14:21
deadalnix accepted this revision.Wed, Jul 31, 18:21
This revision is now accepted and ready to land.Wed, Jul 31, 18:21
This revision was automatically updated to reflect the committed changes.