[已解决]这几条编译警告什么意思?

软件和网站开发以及相关技术探讨
回复
早7点
帖子: 41
注册时间: 2007-06-21 11:00

[已解决]这几条编译警告什么意思?

#1

帖子 早7点 » 2007-06-29 14:52

test.c:52: warning: initialization from incompatible pointer type
test.c:53: warning: initialization from incompatible pointer type
test.c: In function 'Analyze':
test.c:210: warning: passing argument 1 of 'g_pMsdhCmdSys[0].DealFunc' makes intege
r from pointer without a cast
test.c:210: warning: passing argument 3 of 'g_pMsdhCmdSys[0].DealFunc' makes intege
r from pointer without a cast
test.c:215: warning: passing argument 1 of 'g_pMsdhCmdSys[1].DealFunc' makes intege
r from pointer without a cast
test.c:215: warning: passing argument 3 of 'g_pMsdhCmdSys[1].DealFunc' makes intege
r from pointer without a cast


原文那里只是使用了下函数指针,类型保证没问题。。。
上次由 早7点 在 2007-07-11 8:57,总共编辑 1 次。
yejianfei
帖子: 3
注册时间: 2007-06-01 20:39

#2

帖子 yejianfei » 2007-06-30 22:39

好象是数据类型的问题吧,整型跟指针
早7点
帖子: 41
注册时间: 2007-06-21 11:00

#3

帖子 早7点 » 2007-07-10 17:36

恩,是函数指针的问题,已经解决了
之前拷贝的一段代码不是标准C。。。
函数指针形参里的指针没加*,所以出了这些警告
回复