[toolchain] fix warnings/errors in Keil compiler (#2286)

This commit is contained in:
Łukasz Duda
2017-10-25 17:54:17 +02:00
committed by Jonathan Hui
parent 28d08916a5
commit 7b084eca71
22 changed files with 125 additions and 46 deletions
+12 -6
View File
@@ -470,11 +470,13 @@ void Interpreter::ProcessChild(int argc, char *argv[])
otError error = OT_ERROR_NONE;
otChildInfo childInfo;
long value;
bool isTable = false;
bool isTable;
VerifyOrExit(argc > 0, error = OT_ERROR_PARSE);
if (strcmp(argv[0], "list") == 0 || (isTable = (strcmp(argv[0], "table") == 0)))
isTable = (strcmp(argv[0], "table") == 0);
if (isTable || strcmp(argv[0], "list") == 0)
{
if (isTable)
{
@@ -1412,12 +1414,14 @@ void Interpreter::ProcessNeighbor(int argc, char *argv[])
{
otError error = OT_ERROR_NONE;
otNeighborInfo neighborInfo;
bool isTable = false;
bool isTable;
otNeighborInfoIterator iterator = OT_NEIGHBOR_INFO_ITERATOR_INIT;
VerifyOrExit(argc > 0, error = OT_ERROR_PARSE);
if (strcmp(argv[0], "list") == 0 || (isTable = (strcmp(argv[0], "table") == 0)))
isTable = (strcmp(argv[0], "table") == 0);
if (isTable || strcmp(argv[0], "list") == 0)
{
if (isTable)
{
@@ -2224,11 +2228,13 @@ void Interpreter::ProcessRouter(int argc, char *argv[])
otError error = OT_ERROR_NONE;
otRouterInfo routerInfo;
long value;
bool isTable = false;
bool isTable;
VerifyOrExit(argc > 0, error = OT_ERROR_PARSE);
if (strcmp(argv[0], "list") == 0 || (isTable = (strcmp(argv[0], "table") == 0)))
isTable = (strcmp(argv[0], "table") == 0);
if (isTable || strcmp(argv[0], "list") == 0)
{
if (isTable)
{