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
13 changed files with 77 additions and 73 deletions
+6 -6
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 {