From: Petr Vorel <pvorel@suse.cz>
To: Yang Xu <xuyang2018.jy@fujitsu.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/2] rpc/rpc-tirpc: Fix compile error on clang when using clnt_broadcast
Date: Tue, 25 Apr 2023 16:02:27 +0200 [thread overview]
Message-ID: <20230425140227.GB3014439@pevik> (raw)
In-Reply-To: <1682413930-19764-1-git-send-email-xuyang2018.jy@fujitsu.com>
Hi Xu,
> When clang upgrade to 16.0.0-2.fc38, these case will report
> incompatible-function-pointer-types error as below:
> rpc_clnt_broadcast_complex.c:81:46: error: incompatible function pointer types passing
> 'bool_t (char *, struct sockaddr_in *)' (aka 'int (char *, struct sockaddr_in *)') to
> parameter of type 'resultproc_t' (aka 'int (*)(char *, ...)') [-Wincompatible-function-pointer-types]
> (xdrproc_t) xdr_int, (char *)&varRec, eachResult);
> the clnt_broadcase declare as below:
> extern enum clnt_stat clnt_broadcast(u_long, u_long, u_long,
> xdrproc_t, void *,
> xdrproc_t, void *,
> resultproc_t);
> so we should add resultproc_t cast like tirpc_simple_rpc_broadcast[1] does.
> [1]https://github.com/linux-test-project/ltp/blob/master/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast/tirpc_rpc_broadcast_complex.c#L84
Thank you for fixing this!
nit: I'd just mention tirpc_rpc_broadcast_complex.c in rpc_broadcast() call
does. (there is only single file, link will sooner or later point to the
different place, ...)
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2023-04-25 14:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-25 9:12 [LTP] [PATCH 1/2] rpc/rpc-tirpc: Fix compile error on clang when using clnt_broadcast Yang Xu
2023-04-25 9:12 ` [LTP] [PATCH 2/2] rpc/rpc-tirpc: Fix compile error on clang when using registerrpc Yang Xu
2023-04-25 14:05 ` Petr Vorel
2023-04-26 1:59 ` Yang Xu (Fujitsu)
2023-04-25 14:02 ` Petr Vorel [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=20230425140227.GB3014439@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
--cc=xuyang2018.jy@fujitsu.com \
/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