2
0
mirror of https://github.com/boostorg/process.git synced 2026-01-19 04:22:15 +00:00

fixed missing return.

This commit is contained in:
Klemens Morgenstern
2024-07-02 09:47:12 +08:00
committed by Klemens Morgenstern
parent c773ee16cf
commit 67a92df441
8 changed files with 13 additions and 14 deletions

View File

@@ -263,7 +263,7 @@ public:
auto st1 = key + ::boost::process::v1::detail::equal_sign<Char>();
while (*p != nullptr)
{
const std::size_t len = std::char_traits<Char>::length(*p);
const std::ptrdiff_t len = std::char_traits<Char>::length(*p);
if ((std::distance(st1.begin(), st1.end()) < len)
&& std::equal(st1.begin(), st1.end(), *p))
break;

View File

@@ -254,8 +254,8 @@ struct basic_process_handle_fd
{
ec.clear();
exit_code = code;
return false;
}
return false;
}
bool running(native_exit_code_type &exit_code)

View File

@@ -283,10 +283,9 @@ struct basic_process_handle_fd_or_signal
if (process_is_running(res))
return true;
else
{
exit_code = code;
return false;
}
return false;
}
bool running(native_exit_code_type &exit_code)

View File

@@ -248,10 +248,8 @@ struct basic_process_handle_signal
if (res == 0)
return true;
else
{
exit_code = code;
return false;
}
return false;
}
bool running(native_exit_code_type &exit_code)

View File

@@ -247,10 +247,9 @@ struct basic_process_handle_win
if (process_is_running(code))
return true;
else
{
exit_code = code;
return false;
}
return false;
}
bool running(native_exit_code_type &exit_code)

View File

@@ -46,7 +46,10 @@ BOOST_AUTO_TEST_CASE(stackless, *boost::unit_test::timeout(15))
boost::system::error_code ec = boost::system::error_code(),
std::size_t exit_code = 0)
{
if (!ec) reenter (this)
if (ec)
return;
reenter (this)
{
yield bp::async_system(
ios, *this,

View File

@@ -79,7 +79,7 @@ BOOST_AUTO_TEST_CASE(cmd_exe)
bp2::basic_cstring_ref<typename bp2::shell::char_type> ref(cm.argv()[0]);
BOOST_CHECK_EQUAL(bp2::detail::conv_string<char>(ref.data(), ref.size()), pth);
BOOST_REQUIRE_EQUAL(cm.argc(), args.size() + 1);
BOOST_REQUIRE_EQUAL(cm.argc(), args.size() + 1u);
for (auto i = 0u; i < args.size(); i++)
{
ref = cm.argv()[i + 1];

View File

@@ -370,7 +370,7 @@ BOOST_AUTO_TEST_CASE(popen)
// default CWD
bpv::popen proc(/*bpv::default_process_launcher(), */ctx, pth, {"echo"});
BOOST_CHECK_EQUAL(asio::write(proc, asio::buffer("FOOBAR", 6)), 6);
BOOST_CHECK_EQUAL(asio::write(proc, asio::buffer("FOOBAR", 6)), 6u);
proc.get_stdin().close();