Patch "selftests: kselftest_harness: Fix compile warning" has been added to the 4.9-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
selftests: kselftest_harness: Fix compile warning
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
selftests-kselftest_harness-fix-compile-warning.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Mon Apr 9 17:09:24 CEST 2018
From: "Micka�l Sala�n" <[email protected]>
Date: Sun, 11 Jun 2017 14:32:58 +0200
Subject: selftests: kselftest_harness: Fix compile warning
From: "Micka�l Sala�n" <[email protected]>
[ Upstream commit 34a048cc06802556e5f96f325dc32cc2f6a11225 ]
Do not confuse the compiler with a semicolon preceding a block. Replace the semicolon with an empty block to avoid a warning:
gcc -Wl,-no-as-needed -Wall -lpthread seccomp_bpf.c -o /.../linux/tools/testing/selftests/seccomp/seccomp_bpf In file included from seccomp_bpf.c:40:0:
seccomp_bpf.c: In function ‘change_syscall’:
../kselftest_harness.h:558:2: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
for (; _metadata->trigger; _metadata->trigger = __bail(_assert))
^
../kselftest_harness.h:574:14: note: in expansion of macro ‘OPTIONAL_HANDLER’
} while (0); OPTIONAL_HANDLER(_assert)
^~~~~~~~~~~~~~~~
../kselftest_harness.h:440:2: note: in expansion of macro ‘__EXPECT’
__EXPECT(expected, seen, ==, 0)
^~~~~~~~
seccomp_bpf.c:1313:2: note: in expansion of macro ‘EXPECT_EQ’
EXPECT_EQ(0, ret);
^~~~~~~~~
seccomp_bpf.c:1317:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘for’
{
^--- tools/testing/selftests/seccomp/seccomp_bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/seccomp/seccomp_bpf.c +1 -1
@@ -1318,7 +1318,7 @@ void change_syscall(struct __test_metada iov.iov_len =sizeof (regs); ret =ptrace (PTRACE_GETREGSET , tracee,NT_PRSTATUS , &iov);#endif -EXPECT_EQ (0 , ret); + EXPECT_EQ(0, ret) {}#if defined(__x86_64__) || defined(__i386__) || defined(__powerpc__) || \ defined(__s390__) || defined(__hppa__)
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/selftests-kselftest_harness-fix-compile-warning.patch