中科因仑“3+1”工程特种兵精英论坛

标题: 晕。。。我哪里有递归 [打印本页]

作者: 张衍波    时间: 2015-10-22 08:19
标题: 晕。。。我哪里有递归

最近在改一些以前的代码,为了提高可读性和易用性,加了点东西,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)
{

}

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






欢迎光临 中科因仑“3+1”工程特种兵精英论坛 (http://bbs.enlern.com/) Powered by Discuz! X3.4