kyua: fix gcc builds

For some reason execenv::exec() isn't successfully marked noreturn
(rlibby reports that virtual functions can't be noreturn), but calling
methods are so gcc rightly complains.  Work around this by adding
explicit __builtin_unreachable() calls.

Reviewed by:	imp, markj
Fixes:		257e70f1d5 kyua: Add FreeBSD Jail execution environment support
Differential Revision:	https://reviews.freebsd.org/D46041
This commit is contained in:
Brooks Davis 2024-07-20 00:24:35 +01:00
parent e0649a35a6
commit 47fb5d2b13
3 changed files with 4 additions and 0 deletions

View File

@ -196,6 +196,7 @@ engine::atf_interface::exec_test(const model::test_program& test_program,
auto e = execenv::get(test_program, test_case_name);
e->init();
e->exec(args);
__builtin_unreachable();
}
@ -227,6 +228,7 @@ engine::atf_interface::exec_cleanup(
auto e = execenv::get(test_program, test_case_name);
e->exec(args);
__builtin_unreachable();
}

View File

@ -110,6 +110,7 @@ engine::plain_interface::exec_test(
auto e = execenv::get(test_program, test_case_name);
e->init();
e->exec(args);
__builtin_unreachable();
}

View File

@ -157,6 +157,7 @@ engine::tap_interface::exec_test(
auto e = execenv::get(test_program, test_case_name);
e->init();
e->exec(args);
__builtin_unreachable();
}