标题:[求助]assignment makes integer from pointer without a cast
只看楼主
Rexfield
Rank: 6Rank: 6
来 自:幻想乡
等 级:侠之大者
威 望:1
帖 子:240
专家分:484
注 册:2010-7-28
结帖率:100%
 问题点数:0 回复次数:2 
[求助]assignment makes integer from pointer without a cast
程序代码:
extern unsigned int *regs[8];
extern void *mm;

int gdata(char type, int para)
{
    int db = 0;
    if(type == 0 || type == 1)
    {
        // 寄存器直接
        db = *(regs + para);
        if(type == 1)db = gdata(3, db);   // 寄存器间接
    }
    else if(type == 2 || type == 3)
    {
        // 立即数直接
        db = para;
        if(type == 3)db = (int*)(mm + db);
    }
    return db;
}

D:\ldbg\vpb.c||In function 'gdata':|
D:\ldbg\vpb.c|10|warning: assignment makes integer from pointer without a cast|
D:\ldbg\vpb.c|17|warning: assignment makes integer from pointer without a cast|
搜索更多相关主题的帖子: without 
2011-01-23 15:28
Rexfield
Rank: 6Rank: 6
来 自:幻想乡
等 级:侠之大者
威 望:1
帖 子:240
专家分:484
注 册:2010-7-28
得分:0 
自己解决了,是我太疏忽了

If you're not failing every now and again, it's a sign you're not doing anything very innovative.
2011-01-23 16:01
creativewang
Rank: 1
来 自:changchun
等 级:新手上路
帖 子:8
专家分:2
注 册:2010-1-12
得分:0 
既然解决了,我就不翻译了。。。

To be the best!
2011-01-23 16:31



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-331468-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.683433 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved