public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Li Wang <liwang@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] rpc_svc_1: Fix incompatible pointer type error
Date: Mon, 17 Jun 2024 11:24:00 +0800	[thread overview]
Message-ID: <20240617032400.298906-1-liwang@redhat.com> (raw)

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

             reply	other threads:[~2024-06-17  3:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-17  3:24 Li Wang [this message]
2024-06-17 23:27 ` [LTP] [PATCH] rpc_svc_1: Fix incompatible pointer type error Wei Gao via ltp
2024-06-19 16:41   ` Petr Vorel

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=20240617032400.298906-1-liwang@redhat.com \
    --to=liwang@redhat.com \
    --cc=ltp@lists.linux.it \
    /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