From: Shuah Khan <shuah@kernel.org>
To: "Kees Cook" <keescook@chromium.org>, "Mickaël Salaün" <mic@digikod.net>
Cc: LKML <linux-kernel@vger.kernel.org>,
Andy Lutomirski <luto@amacapital.net>,
Will Drewry <wad@chromium.org>,
linux-kselftest@vger.kernel.org,
Linux-Next <linux-next@vger.kernel.org>,
Shuah Khan <shuahkh@osg.samsung.com>,
Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH v1 2/2] selftests: kselftest_harness: Fix compile warning
Date: Mon, 12 Jun 2017 14:31:20 -0600 [thread overview]
Message-ID: <cc8ca030-be45-e65c-c84a-62f8ab50b476@kernel.org> (raw)
In-Reply-To: <CAGXu5jJEQ_sg_5Y1gzhnQd3qW+LdKwqNRAAznZwYwNd8JVj5-A@mail.gmail.com>
On 06/11/2017 08:22 PM, Kees Cook wrote:
> On Sun, Jun 11, 2017 at 5:32 AM, Mickaël Salaün <mic@digikod.net> wrote:
>> 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’
>> {
>> ^
>>
>> Signed-off-by: Mickaël Salaün <mic@digikod.net>
>> Cc: Andy Lutomirski <luto@amacapital.net>
>> Cc: Kees Cook <keescook@chromium.org>
>> Cc: Shuah Khan <shuahkh@osg.samsung.com>
>> Cc: Will Drewry <wad@chromium.org>
>
> Eek, thanks for catching that. :)
>
> Acked-by: Kees Cook <keescook@chromium.org>
>
> -Kees
Thanks. Ths fix is now in linux-kselftest next.
-- Shuah
prev parent reply other threads:[~2017-06-12 20:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-11 12:32 [PATCH v1 0/2] Fix kselftest_harness regression Mickaël Salaün
2017-06-11 12:32 ` [PATCH v1 1/2] Revert "selftests: kselftest_harness: fix compile warnings" Mickaël Salaün
2017-06-11 12:32 ` [PATCH v1 2/2] selftests: kselftest_harness: Fix compile warning Mickaël Salaün
2017-06-12 2:22 ` Kees Cook
2017-06-12 20:31 ` 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=cc8ca030-be45-e65c-c84a-62f8ab50b476@kernel.org \
--to=shuah@kernel.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mic@digikod.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