Add CodeQL for GitHub code scanning (#1548)

* Create codeql.yml

* Addressing codeql findings
This commit is contained in:
LordGrey
2022-12-27 08:36:10 +01:00
committed by GitHub
parent 1189f86c1a
commit 6fa7bab6f7
83 changed files with 1984 additions and 2094 deletions

View File

@@ -94,8 +94,8 @@ void print_trace()
* handler and print_trace functions. */
for (int i = 2; i < size; ++i)
{
std::string line = "\t" + decipher_trace(symbols[i]);
Error(log, line.c_str());
const std::string line = "\t" + decipher_trace(symbols[i]);
Error(log, "%s", line.c_str());
}
free(symbols);
@@ -149,8 +149,6 @@ void signal_handler(int signum, siginfo_t * /*info*/, void * /*context*/)
default:
/* If the signal_handler is hit before the event loop is started,
* following call will do nothing. So we queue the call. */
// QCoreApplication::quit();
QMetaObject::invokeMethod(qApp, "quit", Qt::QueuedConnection);
// Reset signal handler to default (in case this handler is not capable of stopping)