查看: 1535|回复: 0
打印 上一主题 下一主题

晕。。。我哪里有递归

[复制链接]
跳转到指定楼层
沙发
发表于 2015-10-22 08:19:39 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

最近在改一些以前的代码,为了提高可读性和易用性,加了点东西,KEIL的linker就告状说我递归了,我愣是没看明白,大伙儿帮我瞧瞧
warning是:
linking...
*** WARNING L13: RECURSIVE CALL TO FUNCTION
    CALLED:  ?CO?MMC_SD
    CALLER:  _GETRESPONSEERR/MMC_SD

下面是新加的内容,只是个结构,还没写完呢

code u8 response_type_list[] =
{
0        
};

typedef u8 R1;

typedef union
{
        R1        r1;
}response;

typedef  void (*PTRGetResponse)(response* );

void GetResponseErr(response* p_res);
void GetResponseR1(response* p_res);
void GetResponseR2(response* p_res);
void GetResponseR3(response* p_res);
void GetResponseR4(response* p_res);
void GetResponseR5(response* p_res);
void GetResponseR6(response* p_res);
void GetResponseR7(response* p_res);

code const PTRGetResponse PTRGetResponseList[] =
{
        &GetResponseErr,
        &GetResponseR1,
        &GetResponseR2,
        &GetResponseR3,
        &GetResponseR4,
        &GetResponseR5,
        &GetResponseR6,
        &GetResponseR7
};

//说明:
//        对于没有的命令和 reserved 的命令的响应
void GetResponseErr(response* p_res)
{
        p_res = NULL;
        DB_SendString("\nError! Undefined CMD!\n");
}

void GetResponseR1(response* p_res)
{
}

void GetResponseR2(response* p_res)
{
}

void GetResponseR3(response* p_res)
{
}

void GetResponseR4(response* p_res)
{

}

void GetResponseR5(response* p_res)
{

}

void GetResponseR6(response* p_res)
{
}

void GetResponseR7(response* p_res)
{

}

这些代码是新添加的内容,删掉后正常转载

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 加入因仑

本版积分规则

快速回复 返回顶部 返回列表