* [LTP] [PATCH] rpc_svc_1: Fix incompatible pointer type error
@ 2024-06-17 3:24 Li Wang
2024-06-17 23:27 ` Wei Gao via ltp
0 siblings, 1 reply; 3+ messages in thread
From: Li Wang @ 2024-06-17 3:24 UTC (permalink / raw)
To: ltp
To get rid of the compile error with GCC-14:
rpc_svc_1.c:109:12: error: assignment to ‘struct sockaddr_in *’ from
incompatible pointer type ‘struct sockaddr_in6 *’
[-Wincompatible-pointer-types]
109 | sa = svc_getcaller(transp);
| ^
Signed-off-by: Li Wang <liwang@redhat.com>
---
.../network/rpc/rpc-tirpc/tests_pack/rpc_svc_1/rpc_svc_1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_svc_1/rpc_svc_1.c b/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_svc_1/rpc_svc_1.c
index d1c4df97f..d367691c4 100644
--- a/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_svc_1/rpc_svc_1.c
+++ b/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_svc_1/rpc_svc_1.c
@@ -106,7 +106,7 @@ char *svc_getcaller_test(union u_argument *inVar, SVCXPRT * transp)
struct sockaddr_in *sa = NULL;
static int result;
- sa = svc_getcaller(transp);
+ sa = (struct sockaddr_in *) svc_getcaller(transp);
//If the result is not NULL we consider that function call succeeds
//so returns 0 (PASS)
result = (sa != NULL) ? 0 : 1;
--
2.45.2
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH] rpc_svc_1: Fix incompatible pointer type error
2024-06-17 3:24 [LTP] [PATCH] rpc_svc_1: Fix incompatible pointer type error Li Wang
@ 2024-06-17 23:27 ` Wei Gao via ltp
2024-06-19 16:41 ` Petr Vorel
0 siblings, 1 reply; 3+ messages in thread
From: Wei Gao via ltp @ 2024-06-17 23:27 UTC (permalink / raw)
To: Li Wang; +Cc: ltp
On Mon, Jun 17, 2024 at 11:24:00AM +0800, Li Wang wrote:
> To get rid of the compile error with GCC-14:
>
> rpc_svc_1.c:109:12: error: assignment to ‘struct sockaddr_in *’ from
> incompatible pointer type ‘struct sockaddr_in6 *’
> [-Wincompatible-pointer-types]
> 109 | sa = svc_getcaller(transp);
> | ^
>
> Signed-off-by: Li Wang <liwang@redhat.com>
> ---
> .../network/rpc/rpc-tirpc/tests_pack/rpc_svc_1/rpc_svc_1.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_svc_1/rpc_svc_1.c b/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_svc_1/rpc_svc_1.c
> index d1c4df97f..d367691c4 100644
> --- a/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_svc_1/rpc_svc_1.c
> +++ b/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_svc_1/rpc_svc_1.c
> @@ -106,7 +106,7 @@ char *svc_getcaller_test(union u_argument *inVar, SVCXPRT * transp)
> struct sockaddr_in *sa = NULL;
> static int result;
>
> - sa = svc_getcaller(transp);
> + sa = (struct sockaddr_in *) svc_getcaller(transp);
> //If the result is not NULL we consider that function call succeeds
> //so returns 0 (PASS)
> result = (sa != NULL) ? 0 : 1;
> --
> 2.45.2
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
Reviewed-by: Wei Gao <wegao@suse.com>
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH] rpc_svc_1: Fix incompatible pointer type error
2024-06-17 23:27 ` Wei Gao via ltp
@ 2024-06-19 16:41 ` Petr Vorel
0 siblings, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2024-06-19 16:41 UTC (permalink / raw)
To: Wei Gao; +Cc: ltp
Hi Li, Wei,
Li, thanks for the fix, merged!
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-19 16:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-17 3:24 [LTP] [PATCH] rpc_svc_1: Fix incompatible pointer type error Li Wang
2024-06-17 23:27 ` Wei Gao via ltp
2024-06-19 16:41 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox