lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 21 Jul 2022 11:27:17 -0700
From:   Daniel Latypov <dlatypov@...gle.com>
To:     Maíra Canal <mairacanal@...eup.net>
Cc:     Brendan Higgins <brendanhiggins@...gle.com>,
        Jonathan Corbet <corbet@....net>, davidgow@...gle.com,
        linux-kselftest@...r.kernel.org, kunit-dev@...glegroups.com,
        linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND v2] Documentation: KUnit: Fix example with
 compilation error

On Wed, Jul 20, 2022 at 11:57 AM Maíra Canal <mairacanal@...eup.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@...eup.net>

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

Thanks for fixing this!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ