Просмотр исходного кода

Remove warnings about typedefs in apidef.c.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2080 fd59a12c-fef9-0310-b244-a6a79926bd2f
Steven Dake 17 лет назад
Родитель
Сommit
f70605bec2
2 измененных файлов с 25 добавлено и 15 удалено
  1. 23 13
      exec/apidef.c
  2. 2 2
      include/corosync/engine/coroapi.h

+ 23 - 13
exec/apidef.c

@@ -57,20 +57,30 @@
 LOGSYS_DECLARE_SUBSYS ("APIDEF", LOG_INFO);
 LOGSYS_DECLARE_SUBSYS ("APIDEF", LOG_INFO);
 
 
 /*
 /*
- * Remove compile warnings about type name changes
+ * Remove compile warnings about type name changes in corosync_tpg_group
  */
  */
-typedef int (*typedef_tpg_join) (hdb_handle_t,
-				 const struct corosync_tpg_group *, size_t);
+typedef int (*typedef_tpg_join) (
+	hdb_handle_t,
+	const struct corosync_tpg_group *,
+	size_t);
+
 typedef int (*typedef_tpg_leave) (hdb_handle_t,
 typedef int (*typedef_tpg_leave) (hdb_handle_t,
-				  const struct corosync_tpg_group *, size_t);
-typedef int (*typedef_tpg_groups_mcast) (hdb_handle_t, int,
-					 const struct corosync_tpg_group *,
-					 size_t groups_cnt,
-					 struct iovec *, int);
-typedef int (*typedef_tpg_groups_send_ok) (hdb_handle_t,
-					   const struct corosync_tpg_group *,
-					   size_t groups_cnt,
-					   struct iovec *, int);
+	const struct corosync_tpg_group *,
+	size_t);
+
+typedef int (*typedef_tpg_groups_mcast_groups) (
+	hdb_handle_t, int,
+	const struct corosync_tpg_group *,
+	size_t groups_cnt,
+	const struct iovec *,
+	unsigned int);
+
+typedef int (*typedef_tpg_groups_send_ok) (
+	hdb_handle_t,
+	const struct corosync_tpg_group *,
+	size_t groups_cnt,
+	struct iovec *,
+	int);
 
 
 static inline void _corosync_public_exit_error (cs_fatal_error_t err,
 static inline void _corosync_public_exit_error (cs_fatal_error_t err,
 						const char *file,
 						const char *file,
@@ -112,7 +122,7 @@ static struct corosync_api_v1 apidef_corosync_api_v1 = {
 	.tpg_joined_mcast = totempg_groups_mcast_joined,
 	.tpg_joined_mcast = totempg_groups_mcast_joined,
 	.tpg_joined_reserve = totempg_groups_joined_reserve,
 	.tpg_joined_reserve = totempg_groups_joined_reserve,
 	.tpg_joined_release = totempg_groups_joined_release,
 	.tpg_joined_release = totempg_groups_joined_release,
-	.tpg_groups_mcast = (typedef_tpg_groups_mcast)totempg_groups_mcast_groups,
+	.tpg_groups_mcast = (typedef_tpg_groups_mcast_groups)totempg_groups_mcast_groups,
 	.tpg_groups_reserve = NULL,
 	.tpg_groups_reserve = NULL,
 	.tpg_groups_release = NULL,
 	.tpg_groups_release = NULL,
 	.sync_request = NULL, //sync_request,
 	.sync_request = NULL, //sync_request,

+ 2 - 2
include/corosync/engine/coroapi.h

@@ -465,12 +465,12 @@ struct corosync_api_v1 {
 
 
 	int (*tpg_join) (
 	int (*tpg_join) (
 		hdb_handle_t handle,
 		hdb_handle_t handle,
-		struct corosync_tpg_group *groups,
+		const struct corosync_tpg_group *groups,
 		size_t group_cnt);
 		size_t group_cnt);
 
 
 	int (*tpg_leave) (
 	int (*tpg_leave) (
 		hdb_handle_t handle,
 		hdb_handle_t handle,
-		struct corosync_tpg_group *groups,
+		const struct corosync_tpg_group *groups,
 		size_t group_cnt);
 		size_t group_cnt);
 
 
 	int (*tpg_joined_mcast) (
 	int (*tpg_joined_mcast) (