linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Latypov <dlatypov@google.com>
To: "Maíra Canal" <mairacanal@riseup.net>
Cc: Brendan Higgins <brendanhiggins@google.com>,
	Jonathan Corbet <corbet@lwn.net>,
	davidgow@google.com, linux-kselftest@vger.kernel.org,
	kunit-dev@googlegroups.com, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND v2] Documentation: KUnit: Fix example with compilation error
Date: Thu, 21 Jul 2022 11:27:17 -0700	[thread overview]
Message-ID: <CAGS_qxoY2ohLjcm3WnHXd-j1hyT43v=gUeqqm3S025ayMPw_eg@mail.gmail.com> (raw)
In-Reply-To: <20220720185719.273630-1-mairacanal@riseup.net>

On Wed, Jul 20, 2022 at 11:57 AM Maíra Canal <mairacanal@riseup.net> wrote:
>
> The Parameterized Testing example contains a compilation error, as the
> signature for the description helper function is void(*)(const struct
> sha1_test_case *, char *), and the struct is non-const. This is
> warned by Clang:
>
> error: initialization of ‘void (*)(struct sha1_test_case *, char *)’
> from incompatible pointer type ‘void (*)(const struct sha1_test_case *,
> char *)’ [-Werror=incompatible-pointer-types]
> 33 | KUNIT_ARRAY_PARAM(sha1, cases, case_to_desc);
>    |                                ^~~~~~~~~~~~
> ../include/kunit/test.h:1339:70: note: in definition of macro
> ‘KUNIT_ARRAY_PARAM’
> 1339 |                         void
>    (*__get_desc)(typeof(__next), char *) = get_desc; \
>
> Signed-off-by: Maíra Canal <mairacanal@riseup.net>

Reviewed-by: Daniel Latypov <dlatypov@google.com>

Thanks for fixing this!

  reply	other threads:[~2022-07-21 18:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-20 18:57 [PATCH RESEND v2] Documentation: KUnit: Fix example with compilation error Maíra Canal
2022-07-21 18:27 ` Daniel Latypov [this message]
2022-07-26  5:27 ` Brendan Higgins

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='CAGS_qxoY2ohLjcm3WnHXd-j1hyT43v=gUeqqm3S025ayMPw_eg@mail.gmail.com' \
    --to=dlatypov@google.com \
    --cc=brendanhiggins@google.com \
    --cc=corbet@lwn.net \
    --cc=davidgow@google.com \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mairacanal@riseup.net \
    /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;
as well as URLs for NNTP newsgroup(s).