1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-16 04:45:17 +03:00

Fix some bugs found by Sonar (#5392)

* Fix some bugs found by Sonar

* Different syntax for NOSONAR

* Switch Sonar badge to proper branch
This commit is contained in:
Damjan Adamic 2017-11-23 23:28:36 +01:00 committed by Bertrand Songis
parent 5b4dc4ee08
commit 49a63d43b3

View file

@ -113,7 +113,6 @@ ZoneOption * createOptionsArray(int reference, uint8_t maxOptions)
}
else if (option->type == ZoneOption::Source ||
option->type == ZoneOption::TextSize ||
option->type == ZoneOption::Source ||
option->type == ZoneOption::Color) {
luaL_checktype(lsWidgets, -1, LUA_TNUMBER); // value is number
option->deflt.unsignedValue = lua_tounsigned(lsWidgets, -1);
@ -243,7 +242,7 @@ void luaLoadThemeCallback()
LuaTheme * theme = new LuaTheme(name, options);
theme->loadFunction = loadFunction;
theme->drawBackgroundFunction = drawBackgroundFunction;
theme->drawTopbarBackgroundFunction = drawTopbarBackgroundFunction;
theme->drawTopbarBackgroundFunction = drawTopbarBackgroundFunction; // NOSONAR
TRACE("Loaded Lua theme %s", name);
}
}
@ -449,7 +448,7 @@ void luaLoadWidgetCallback()
LuaWidgetFactory * factory = new LuaWidgetFactory(name, options, createFunction);
factory->updateFunction = updateFunction;
factory->refreshFunction = refreshFunction;
factory->backgroundFunction = backgroundFunction;
factory->backgroundFunction = backgroundFunction; // NOSONAR
TRACE("Loaded Lua widget %s", name);
}
}