git: 47fb5d2b13c5 - main - kyua: fix gcc builds
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 19 Jul 2024 23:28:14 UTC
The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=47fb5d2b13c5ca8e1a3b05ed223d62ea4b43b3e8 commit 47fb5d2b13c5ca8e1a3b05ed223d62ea4b43b3e8 Author: Brooks Davis <brooks@FreeBSD.org> AuthorDate: 2024-07-19 23:24:35 +0000 Commit: Brooks Davis <brooks@FreeBSD.org> CommitDate: 2024-07-19 23:28:06 +0000 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: 257e70f1d5ee kyua: Add FreeBSD Jail execution environment support Differential Revision: https://reviews.freebsd.org/D46041 --- contrib/kyua/engine/atf.cpp | 2 ++ contrib/kyua/engine/plain.cpp | 1 + contrib/kyua/engine/tap.cpp | 1 + 3 files changed, 4 insertions(+) diff --git a/contrib/kyua/engine/atf.cpp b/contrib/kyua/engine/atf.cpp index f6746dd2f29f..47f3bd2a1903 100644 --- a/contrib/kyua/engine/atf.cpp +++ b/contrib/kyua/engine/atf.cpp @@ -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(); } diff --git a/contrib/kyua/engine/plain.cpp b/contrib/kyua/engine/plain.cpp index 9a2c63f8b663..0aba9b3fb6fa 100644 --- a/contrib/kyua/engine/plain.cpp +++ b/contrib/kyua/engine/plain.cpp @@ -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(); } diff --git a/contrib/kyua/engine/tap.cpp b/contrib/kyua/engine/tap.cpp index ed35ba40433f..716212d18d02 100644 --- a/contrib/kyua/engine/tap.cpp +++ b/contrib/kyua/engine/tap.cpp @@ -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(); }