1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-19 22:35:12 +03:00

Bsongis/sonar (#5555)

Some sonar issues fixed
This commit is contained in:
Bertrand Songis 2017-12-21 18:25:27 +01:00 committed by GitHub
parent b7855cf14d
commit 7806c2096d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 77 additions and 73 deletions

View file

@ -62,17 +62,17 @@ TEST(Lua, testPanicProtection)
bool passed = false;
PROTECT_LUA() {
PROTECT_LUA() {
//simulate panic
// simulate panic
longjmp(global_lj->b, 1);
}
else {
//we should come here
// we should come here
passed = true;
}
UNPROTECT_LUA();
}
else {
// an not here
// and not here
// TRACE("testLuaProtection: test 1 FAILED");
FAIL() << "Failed test 1";
}
@ -85,15 +85,15 @@ TEST(Lua, testPanicProtection)
PROTECT_LUA() {
PROTECT_LUA() {
int a = 5;
a = a; // avoids the warning
UNUSED(a);
}
else {
//we should not come here
// we should not come here
// TRACE("testLuaProtection: test 2 FAILED");
FAIL() << "Failed test 2";
}
UNPROTECT_LUA()
//simulate panic
// simulate panic
longjmp(global_lj->b, 1);
}
else {