Commit de641b56 authored by Dominik Charousset's avatar Dominik Charousset

Fix unused-result warning

parent b3478a09
...@@ -223,7 +223,7 @@ void bootstrap(actor_system& system, const string& wdir, ...@@ -223,7 +223,7 @@ void bootstrap(actor_system& system, const string& wdir,
#define RETURN_WITH_ERROR(output) \ #define RETURN_WITH_ERROR(output) \
do { \ do { \
::std::cerr << output << ::std::endl; \ ::std::cerr << output << ::std::endl; \
return 1; \ return EXIT_FAILURE; \
} while (true) } while (true)
namespace { namespace {
...@@ -242,9 +242,12 @@ struct config : actor_system_config { ...@@ -242,9 +242,12 @@ struct config : actor_system_config {
int main(int argc, char** argv) { int main(int argc, char** argv) {
config cfg; config cfg;
cfg.parse(argc, argv); if (auto err = cfg.parse(argc, argv)) {
std::cerr << "error parsing command line: " << to_string(err) << '\n';
return EXIT_FAILURE;
}
if (cfg.cli_helptext_printed) if (cfg.cli_helptext_printed)
return 0; return EXIT_SUCCESS;
if (cfg.slave_mode) if (cfg.slave_mode)
RETURN_WITH_ERROR("cannot use slave mode in caf-run tool"); RETURN_WITH_ERROR("cannot use slave mode in caf-run tool");
std::unique_ptr<char, void (*)(void*)> pwd{getcwd(nullptr, 0), ::free}; std::unique_ptr<char, void (*)(void*)> pwd{getcwd(nullptr, 0), ::free};
...@@ -265,4 +268,5 @@ int main(int argc, char** argv) { ...@@ -265,4 +268,5 @@ int main(int argc, char** argv) {
hosts.erase(hosts.begin()); hosts.erase(hosts.begin());
bootstrap(system, (cfg.wdir.empty()) ? pwd.get() : cfg.wdir.c_str(), master, bootstrap(system, (cfg.wdir.empty()) ? pwd.get() : cfg.wdir.c_str(), master,
std::move(hosts), cmd, xs); std::move(hosts), cmd, xs);
return EXIT_SUCCESS;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment