On Thu, 2025-07-10 at 14:10 -0400, Benjamin Marzinski wrote:
> When you change the reservation key of a registered multipath device,
> some of paths might be down or even deleted since you originally

[...]
> 
> Signed-off-by: Benjamin Marzinski <bmarz...@redhat.com>

This is not a full review, just feedback about a failing CI pipeline.

> ---
>  libmpathpersist/mpath_persist_int.c | 124 ++++++++++++++++++++------
> --
>  1 file changed, 90 insertions(+), 34 deletions(-)
> 
> diff --git a/libmpathpersist/mpath_persist_int.c
> b/libmpathpersist/mpath_persist_int.c
> index ad5a4ee7..ca972c2b 100644
> --- a/libmpathpersist/mpath_persist_int.c
> +++ b/libmpathpersist/mpath_persist_int.c
> 
> +void preempt_missing_path(struct multipath *mpp, uint8_t *key,
> uint8_t *sa_key,
> +                       int noisy)
> +{
> +     uint8_t zero[8] = {0};
> +     struct prin_resp resp = {0};

gcc 4.8 (Debian Jessie) dislikes this syntax.

> mpath_persist_int.c:272:9: error: missing braces around initializer 
> [-Werror=missing-braces]

The same issue appears in patch 7/15 and patch 15/15.
It seems to be a gcc bug
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119).
So we could use #pragma to silence the warning, but I'd like to avoid
that, especially because it occurs multiple times.

I don't think we should drop Jessie support just yet.

This works:

        struct prin_resp resp = {{{0}}};

> +     int rq_scope;
> +     unsigned int rq_type;
> +     struct prout_param_descriptor paramp = {0};

Likewise, gcc 4.8 warns about this:

> mpath_persist_int.c:275:9: error: missing initializer for field 'sa_key' of 
> 'struct prout_param_descriptor' [-Werror=missing-field-initializers]

It's not easy to find a syntax that this compiler accepts without
warning. {{0}} does _not_ work here.

The following did the trick for me:

        struct prout_param_descriptor paramp = {.sa_flags = 0};


Regards
Martin

Reply via email to