修正 gcc 6.2.1 下的编译警告

This commit is contained in:
大石头X2 2016-12-23 18:21:46 +08:00
parent 4a1ef26502
commit 87482cb10d
3 changed files with 6 additions and 3 deletions

View File

@ -478,7 +478,7 @@ bool Enc28j60::PhyWrite(byte addr, ushort data)
// 等待 PHY 写完成
int times = 100;
while((ReadReg(MISTAT) & MISTAT_BUSY) && --times > 0);
while((ReadReg(MISTAT) & MISTAT_BUSY) && --times > 0) { }
return times > 0;
}

View File

@ -132,6 +132,9 @@ void operator delete[](void* p) noexcept
}
}
void operator delete(void* p, uint size) noexcept { operator delete(p); }
void operator delete[](void* p, uint size) noexcept { operator delete[](p); }
#if !defined(TINY) && defined(STM32F0)
#if defined(__CC_ARM)
#pragma arm section code

View File

@ -89,7 +89,7 @@ void TinyClient::Close()
/******************************** 收发中心 ********************************/
bool TinyClient::Send(TinyMessage& msg)
{
assert(this, "令牌客户端未初始化");
//assert(this, "令牌客户端未初始化");
assert(Control, "令牌控制器未初始化");
// 未组网时,禁止发其它消息。组网消息通过广播发出,不经过这里
@ -103,7 +103,7 @@ bool TinyClient::Send(TinyMessage& msg)
bool TinyClient::Reply(TinyMessage& msg)
{
assert(this, "令牌客户端未初始化");
//assert(this, "令牌客户端未初始化");
assert(Control, "令牌控制器未初始化");
// 未组网时,禁止发其它消息。组网消息通过广播发出,不经过这里