修正GCC编译警告

This commit is contained in:
大石头 2017-09-10 19:40:30 +08:00
parent ff99cc98b9
commit b1c5b979e4
6 changed files with 27 additions and 7 deletions

View File

@ -18,7 +18,7 @@ IOK0612::IOK0612()
Current = this;
}
static bool ledstat2 = false;
//static bool ledstat2 = false;
//重写指示灯默认倒置
void IOK0612::InitLeds()

View File

@ -164,7 +164,8 @@ bool SHT30::Open()
if (Pwr) *Pwr = true;
bool rs = CheckStatus();
//bool rs = CheckStatus();
CheckStatus();
/*
SHT30三种采集数据方式

View File

@ -18,7 +18,7 @@ JsonType Json::Type() const
// 快速判断对象、数组和字符串
auto s = _str.Trim();
auto p = s.GetBuffer();
//auto p = s.GetBuffer();
int len = s.Length();
switch (s[0])
{
@ -328,7 +328,7 @@ Json& Json::Add(cstring key, const String& value) {
char left = value[0];
char right = value[value.Length() - 1];
if (left == '{'&&right == '}' || left == '['&&right == ']' || left == '\"'&&right == '\"') flag = false;
if ((left == '{' && right == '}') || (left == '[' && right == ']') || (left == '\"' && right == '\"')) flag = false;
}
if (flag) _str += "\"";

View File

@ -172,7 +172,7 @@ bool Flash::ReadOutProtection(bool set)
// 取消读保护会清空 Flash 内容注意要上电复位才可以使用IC
FLASH_Unlock();
FLASH_ReadOutProtection(DISABLE);
}return set;
}
#endif
#if defined(STM32F0)
bool isProt = FLASH_OB_GetRDP() == SET ? true : false;
@ -197,6 +197,7 @@ bool Flash::ReadOutProtection(bool set)
FLASH_Unlock();
FLASH_OB_RDPConfig(OB_RDP_Level_0);
FLASH_OB_Lock();
}return set;
}
#endif
return set;
}

View File

@ -1014,7 +1014,7 @@ void TokenClient::OnWrite(const TokenMessage& msg, TokenController* ctrl)
// 拦截给同步方法
auto handle = (WaitHandle*)_Expect;
if (handle) {
auto start = (int)handle->State;
auto start = (uint)handle->State;
if (start == dm.Start) {
// 设置事件,通知等待任务退出循环
handle->State = (void*)dm.Size;

18
Tool/_Files.cs Normal file
View File

@ -0,0 +1,18 @@
build.AddIncludes("..\\", false);
build.AddFiles("..\\Core");
build.AddFiles("..\\Kernel");
build.AddFiles("..\\Device");
build.AddFiles("..\\", "*.c;*.cpp", false);
build.AddFiles("..\\Net");
build.AddFiles("..\\Message");
build.AddFiles("..\\Security", "*.cpp");
build.AddFiles("..\\Board");
build.AddFiles("..\\Storage");
build.AddFiles("..\\App");
build.AddFiles("..\\Drivers");
build.AddFiles("..\\Test");
build.AddFiles("..\\TinyIP", "*.c;*.cpp", false, "HttpClient");
build.AddFiles("..\\TinyNet");
build.AddFiles("..\\TokenNet");
build.AddFiles("..\\Link");
build.AlwaysBuild = "Sys.cpp";