Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jul 2019 16:03:08 +0000 (UTC)
From:      Brooks Davis <brooks@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r350049 - head/contrib/amd/amd
Message-ID:  <201907161603.x6GG38oZ020228@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brooks
Date: Tue Jul 16 16:03:08 2019
New Revision: 350049
URL: https://svnweb.freebsd.org/changeset/base/350049

Log:
  Fix two mismatches between function declaration and definition.
  
  In both cases, function pointer arguments were inconsistently declared
  and the result worked because of C's odd rules around function pointer
  (de)references.  With a stricter compiler these fail to compile.
  
  Reviewed by:	cem
  Obtained from:	CheriBSD
  Sponsored by:	DARPA, AFRL
  Differential Revision:	https://reviews.freebsd.org/D20964

Modified:
  head/contrib/amd/amd/amd.h
  head/contrib/amd/amd/rpc_fwd.c

Modified: head/contrib/amd/amd/amd.h
==============================================================================
--- head/contrib/amd/amd/amd.h	Tue Jul 16 16:02:20 2019	(r350048)
+++ head/contrib/amd/amd/amd.h	Tue Jul 16 16:03:08 2019	(r350049)
@@ -625,7 +625,7 @@ extern void map_flush_srvr(fserver *);
 extern void mapc_add_kv(mnt_map *, char *, char *);
 extern mnt_map *mapc_find(char *, char *, const char *, const char *);
 extern void mapc_free(opaque_t);
-extern int  mapc_keyiter(mnt_map *, key_fun, opaque_t);
+extern int  mapc_keyiter(mnt_map *, key_fun *, opaque_t);
 extern void mapc_reload(void);
 extern int  mapc_search(mnt_map *, char *, char **);
 extern void mapc_showtypes(char *buf, size_t l);

Modified: head/contrib/amd/amd/rpc_fwd.c
==============================================================================
--- head/contrib/amd/amd/rpc_fwd.c	Tue Jul 16 16:02:20 2019	(r350048)
+++ head/contrib/amd/amd/rpc_fwd.c	Tue Jul 16 16:03:08 2019	(r350049)
@@ -221,7 +221,7 @@ fwd_locate(u_int id)
  * different address.
  */
 int
-fwd_packet(int type_id, char *pkt, int len, struct sockaddr_in *fwdto, struct sockaddr_in *replyto, opaque_t cb_arg, fwd_fun cb)
+fwd_packet(int type_id, char *pkt, int len, struct sockaddr_in *fwdto, struct sockaddr_in *replyto, opaque_t cb_arg, fwd_fun *cb)
 {
   rpc_forward *p;
   u_int *pkt_int;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907161603.x6GG38oZ020228>