Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/librumpuser Fix incompatible function pointer casts



details:   https://anonhg.NetBSD.org/src/rev/7f150e5adf6c
branches:  trunk
changeset: 934517:7f150e5adf6c
user:      kamil <kamil%NetBSD.org@localhost>
date:      Sat Jun 13 16:51:59 2020 +0000

description:
Fix incompatible function pointer casts

diffstat:

 lib/librumpuser/sp_common.c |  20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 deletions(-)

diffs (50 lines):

diff -r 00239a961a98 -r 7f150e5adf6c lib/librumpuser/sp_common.c
--- a/lib/librumpuser/sp_common.c       Sat Jun 13 16:51:25 2020 +0000
+++ b/lib/librumpuser/sp_common.c       Sat Jun 13 16:51:59 2020 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: sp_common.c,v 1.41 2020/05/06 12:44:36 christos Exp $ */
+/*      $NetBSD: sp_common.c,v 1.42 2020/06/13 16:51:59 kamil Exp $    */
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -705,15 +705,21 @@
 
 /*ARGSUSED*/
 static int
-notsupp(void)
+addrparse_notsupp(const char *addr __unused, struct sockaddr **sa __unused,
+                 int allow_wildcard __unused)
 {
 
        fprintf(stderr, "rump_sp: support not yet implemented\n");
        return EOPNOTSUPP;
 }
 
+static void
+cleanup_success(struct sockaddr *sa __unused)
+{
+}
+
 static int
-success(void)
+connecthook_success(int s __unused)
 {
 
        return 0;
@@ -728,12 +734,12 @@
        cleanup_fn cleanup;
 } parsetab[] = {
        { "tcp", PF_INET, sizeof(struct sockaddr_in),
-           tcp_parse, tcp_connecthook, (cleanup_fn)success },
+           tcp_parse, tcp_connecthook, cleanup_success },
        { "unix", PF_LOCAL, sizeof(struct sockaddr_un),
-           unix_parse, (connecthook_fn)success, unix_cleanup },
+           unix_parse, connecthook_success, unix_cleanup },
        { "tcp6", PF_INET6, sizeof(struct sockaddr_in6),
-           (addrparse_fn)notsupp, (connecthook_fn)success,
-           (cleanup_fn)success },
+           addrparse_notsupp, connecthook_success,
+           cleanup_success },
 };
 #define NPARSE (sizeof(parsetab)/sizeof(parsetab[0]))
 



Home | Main Index | Thread Index | Old Index