previous declaration of XXX was here

../src/Main.c:402: error: conflicting types for '__exit'
../src/Main.h:508: error: previous declaration of '__exit' was here
../src/Main.c:416: error: conflicting types for '_reboot'
../src/Main.h:509: error: previous declaration of '_reboot' was here

原因是头文的函数声明与c文件的函数的定义的形参不一样


extern int _reboot(const char *pau1Tmp, char* ptrFile, const char* ptrFunctionName, int iLineNo);

int        _reboot(const char *pau1TmpcharptrFilecharptrFunctionNameint iLineNo)
{
	_FPR("系统重启 reboot %s File:%s , Function : %s , Line : %d "pau1TmpptrFileptrFunctionNameiLineNo);
	{
		char caStr[256];
		snprintf(caStr, sizeof(caStr), "echo '\"'`date`'\"' LINE:%d    FILE:%s    %s    %s    %s    %s >> /usr/bike/log/reboot.log"iLineNoptrFunctionNameptrFile, g_caApppName, pau1Tmp"reboot");
		PR("%s", caStr);
		_system(caStr);
	}
	return 0;
}






  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值