-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ceventRun编译提示cevent.c(114): error: too many arguments to function call, expected 0, have 1怎么处理呢,只能识别不传参的函数 #13
Comments
用的是最新的 keil 吧 static void ceventRun(CEvent *cevent)
{
if (cevent->paramNum < 1)
{
return;
}
switch (cevent->paramNum)
{
case 1:
void (*function)() = (void (*)())(cevent->param[0]);
function();
break;
case 2:
void (*function)(void *) = (void (*)())(cevent->param[0]);
function(cevent->param[1]);
break;
case 3:
void (*function)(void *, void *) = (void (*)())(cevent->param[0]);
function(cevent->param[1], cevent->param[2]);
break;
case 4:
void (*function)(void *, void *, void*) = (void (*)())(cevent->param[0]);
function(cevent->param[1], cevent->param[2], cevent->param[3]);
break;
case 5:
void (*function)(void *, void *, void*, void*) = (void (*)())(cevent->param[0]);
function(cevent->param[1], cevent->param[2], cevent->param[3], cevent->param[4]);
break;
case 6:
void (*function)(void *, void *, void*, void*, void*) = (void (*)())(cevent->param[0]);
function(cevent->param[1], cevent->param[2], cevent->param[3], cevent->param[4],
cevent->param[5]);
break;
case 7:
void (*function)(void *, void *, void*, void*, void*, void*) = (void (*)())(cevent->param[0]);
function(cevent->param[1], cevent->param[2], cevent->param[3], cevent->param[4],
cevent->param[5], cevent->param[6]);
break;
case 8:
void (*function)(void *, void *, void*, void*, void*, void*, void*) = (void (*)())(cevent->param[0]);
function(cevent->param[1], cevent->param[2], cevent->param[3], cevent->param[4],
cevent->param[5], cevent->param[6], cevent->param[7]);
break;
default:
break;
}
} |
这是来自QQ邮箱的假期自动回复邮件。
您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
|
好滴,明白了谢谢大大。还有一个问题,就是使用cevent的时候,对event的请求数量和导出事件数量有限制吗?我看了一下好像没有说性能。有个地方提了一下事件缓存,这个事件缓存指导出的事件函数个数还是ceventpost的请求数呢?谢谢答疑 |
有个缓存的配置,主要是用来做效率提升的,属于用内存空间换速度,如果开了,就需要注意那个大小配置 |
好的,谢谢大大 |
大大,我的编译环境要这样才不会报错,贴出来给大家参考: |
老师,请教一下,ceventRun编译提示cevent.c(114): error: too many arguments to function call, expected 0, have 1怎么处理呢,只能识别不传参的函数,怎么解决呢。需要根据自己的函数情况做适配吗?能不能帮忙分析解决一下,谢谢
The text was updated successfully, but these errors were encountered: