From: Shuah Khan <shuah@kernel.org>
To: Shuah Khan <shuahkh@osg.samsung.com>,
keescook@chromium.org, luto@amacapital.net, wad@chromium.org
Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
Shuah Khan <shuah@kernel.org>,
Shuah Khan <shuahkh@osg.samsung.com>
Subject: Re: [PATCH] selftests: kselftest_harness: fix compile warnings
Date: Fri, 9 Jun 2017 09:42:48 -0600 [thread overview]
Message-ID: <045e092f-f912-967d-0ba4-d0a9f3a89919@kernel.org> (raw)
In-Reply-To: <20170607175731.18147-1-shuahkh@osg.samsung.com>
On 06/07/2017 11:57 AM, Shuah Khan wrote:
> Fix the following compile warns. checkpatch wants trailing statements
> on next line.
>
> gcc -Wl,-no-as-needed -Wall -lpthread seccomp_bpf.c -o
> /lkml/linux-kselftest/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’
> {
> ^
> make: Leaving directory
> '/lkml/linux-kselftest/tools/testing/selftests/seccomp'
>
> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Applied to linux-kselftest next for 4.13-rc1
thanks,
-- Shuah
> ---
> tools/testing/selftests/kselftest_harness.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/kselftest_harness.h b/tools/testing/selftests/kselftest_harness.h
> index c56f72e07cd7..432245faeab3 100644
> --- a/tools/testing/selftests/kselftest_harness.h
> +++ b/tools/testing/selftests/kselftest_harness.h
> @@ -555,7 +555,8 @@
> * return while still providing an optional block to the API consumer.
> */
> #define OPTIONAL_HANDLER(_assert) \
> - for (; _metadata->trigger; _metadata->trigger = __bail(_assert))
> + for (; _metadata->trigger; _metadata->trigger = __bail(_assert)) \
> + ;
>
> #define __EXPECT(_expected, _seen, _t, _assert) do { \
> /* Avoid multiple evaluation of the cases */ \
>
prev parent reply other threads:[~2017-06-09 15:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-07 17:57 Shuah Khan
2017-06-09 15:42 ` Shuah Khan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=045e092f-f912-967d-0ba4-d0a9f3a89919@kernel.org \
--to=shuah@kernel.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=shuahkh@osg.samsung.com \
--cc=wad@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®