Skip to content

Commit 6c569b7

Browse files
psychildkuba-moo
authored andcommitted
selftest: af_unix: Fix kselftest compilation warnings
Change expected_buf from (const void *) to (const char *) in function __recvpair(). This change fixes the below warnings during test compilation: ``` In file included from msg_oob.c:14: msg_oob.c: In function ‘__recvpair’: ../../kselftest_harness.h:106:40: warning: format ‘%s’ expects argument of type ‘char *’,but argument 6 has type ‘const void *’ [-Wformat=] ../../kselftest_harness.h:101:17: note: in expansion of macro ‘__TH_LOG’ msg_oob.c:235:17: note: in expansion of macro ‘TH_LOG’ ../../kselftest_harness.h:106:40: warning: format ‘%s’ expects argument of type ‘char *’,but argument 6 has type ‘const void *’ [-Wformat=] ../../kselftest_harness.h:101:17: note: in expansion of macro ‘__TH_LOG’ msg_oob.c:259:25: note: in expansion of macro ‘TH_LOG’ ``` Fixes: d098d77 ("selftest: af_unix: Add msg_oob.c.") Signed-off-by: Abhinav Jain <jain.abhinav177@gmail.com> Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com> Link: https://patch.msgid.link/20240814080743.1156166-1-jain.abhinav177@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent a2cbb16 commit 6c569b7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/testing/selftests/net/af_unix/msg_oob.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ static void __sendpair(struct __test_metadata *_metadata,
209209

210210
static void __recvpair(struct __test_metadata *_metadata,
211211
FIXTURE_DATA(msg_oob) *self,
212-
const void *expected_buf, int expected_len,
212+
const char *expected_buf, int expected_len,
213213
int buf_len, int flags)
214214
{
215215
int i, ret[2], recv_errno[2], expected_errno = 0;

0 commit comments

Comments
 (0)