From: Tobias Brunner Date: Fri, 15 Jul 2022 11:01:29 +0000 (+0200) Subject: test-runner: Fix compiler warning X-Git-Tag: 5.9.7rc1~12 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=b37a3e249a85549483849b8d96d688e6f152b7f4;p=thirdparty%2Fstrongswan.git test-runner: Fix compiler warning 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. --- 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))