瀏覽代碼

* Fixed type-casting on function pointers

svn: 1330
Bryan Drewery 22 年之前
父節點
當前提交
13b48a75e9
共有 4 個文件被更改,包括 18 次插入18 次删除
  1. 1 1
      src/mod/channels.mod/channels.c
  2. 2 2
      src/mod/console.mod/console.c
  3. 14 14
      src/mod/ctcp.mod/ctcp.c
  4. 1 1
      src/mod/server.mod/server.c

+ 1 - 1
src/mod/channels.mod/channels.c

@@ -758,7 +758,7 @@ static int channels_chon(char *handle, int idx)
 
 static cmd_t my_chon[] =
 {
-  {"*",		"",	channels_chon,	"channels:chon"},
+  {"*",		"",	(Function) channels_chon,	"channels:chon"},
   {NULL,	NULL,	NULL,				NULL}
 };
 

+ 2 - 2
src/mod/console.mod/console.c

@@ -379,12 +379,12 @@ console_dostore(int idx)
 }
 
 static cmd_t mychon[] = {
-  {"*", "", console_chon, "console:chon"},
+  {"*", "", (Function) console_chon, "console:chon"},
   {NULL, NULL, NULL, NULL}
 };
 
 static cmd_t mydcc[] = {
-  {"store", "", console_store, NULL},
+  {"store", "", (Function) console_store, NULL},
   {NULL, NULL, NULL, NULL}
 };
 

+ 14 - 14
src/mod/ctcp.mod/ctcp.c

@@ -605,20 +605,20 @@ static int ctcp_CHAT(char *nick, char *uhost, struct userrec *u, char *object, c
 
 static cmd_t myctcp[] =
 {
-  {"CLIENTINFO", 	"", 	ctcp_CLIENTINFO, 	NULL},
-  {"FINGER", 		"", 	ctcp_FINGER, 		NULL},
-  {"WHOAMI", 		"", 	ctcp_WHOAMI, 		NULL},
-  {"OP", 		"", 	ctcp_OP, 		NULL},
-  {"OPS", 		"", 	ctcp_OP, 		NULL},
-  {"INVITE", 		"",	ctcp_INVITE_UNBAN, 	NULL},
-  {"UNBAN", 		"", 	ctcp_INVITE_UNBAN, 	NULL},
-  {"ERRMSG", 		"", 	ctcp_ECHO, 		NULL},
-  {"USERINFO", 		"", 	ctcp_USERINFO, 		NULL},
-  {"ECHO", 		"", 	ctcp_ECHO, 		NULL},
-  {"VERSION", 		"", 	ctcp_VERSION, 		NULL},
-  {"PING", 		"", 	ctcp_PING, 		NULL},
-  {"TIME", 		"", 	ctcp_TIME, 		NULL},
-  {"CHAT",		"",	ctcp_CHAT,		NULL},
+  {"CLIENTINFO", 	"", 	(Function) ctcp_CLIENTINFO, 	NULL},
+  {"FINGER", 		"", 	(Function) ctcp_FINGER, 		NULL},
+  {"WHOAMI", 		"", 	(Function) ctcp_WHOAMI, 		NULL},
+  {"OP", 		"", 	(Function) ctcp_OP, 		NULL},
+  {"OPS", 		"", 	(Function) ctcp_OP, 		NULL},
+  {"INVITE", 		"",	(Function) ctcp_INVITE_UNBAN, 	NULL},
+  {"UNBAN", 		"", 	(Function) ctcp_INVITE_UNBAN, 	NULL},
+  {"ERRMSG", 		"", 	(Function) ctcp_ECHO, 		NULL},
+  {"USERINFO", 		"", 	(Function) ctcp_USERINFO, 		NULL},
+  {"ECHO", 		"", 	(Function) ctcp_ECHO, 		NULL},
+  {"VERSION", 		"", 	(Function) ctcp_VERSION, 		NULL},
+  {"PING", 		"", 	(Function) ctcp_PING, 		NULL},
+  {"TIME", 		"", 	(Function) ctcp_TIME, 		NULL},
+  {"CHAT",		"",	(Function) ctcp_CHAT,		NULL},
   {NULL,		NULL,	NULL,			NULL}
 };
 #endif /* LEAF */

+ 1 - 1
src/mod/server.mod/server.c

@@ -1056,7 +1056,7 @@ static void msgq_clear(struct msgq_head *qh)
 
 static cmd_t my_ctcps[] =
 {
-  {"DCC",	"",	ctcp_DCC_CHAT,		"server:DCC"},
+  {"DCC",	"",	(Function) ctcp_DCC_CHAT,		"server:DCC"},
   {NULL,	NULL,	NULL,			NULL}
 };