From b37a3e249a85549483849b8d96d688e6f152b7f4 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Fri, 15 Jul 2022 13:01:29 +0200 Subject: [PATCH] test-runner: Fix compiler warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Making the variable volatile avoids a "variable ‘failure’ might be clobbered by ‘longjmp’" warning (or error when compiling with -Werror) that's triggered via -Wextra. --- src/libstrongswan/tests/test_runner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstrongswan/tests/test_runner.c b/src/libstrongswan/tests/test_runner.c index 6d83d83a8e..71da513f0f 100644 --- a/src/libstrongswan/tests/test_runner.c +++ b/src/libstrongswan/tests/test_runner.c @@ -289,7 +289,7 @@ static bool call_fixture(test_case_t *tcase, bool up, int i) { enumerator_t *enumerator; test_fixture_t *fixture; - bool failure = FALSE; + volatile bool failure = FALSE; enumerator = array_create_enumerator(tcase->fixtures); while (enumerator->enumerate(enumerator, &fixture))