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

@@ -122,7 +122,7 @@ namespace NetUtils {
{
if (hostAddress.setAddress(hostname))
{
//Debug(log, "IP-address (%s) not required to be resolved.", QSTRING_CSTR(hostAddress.toString()));
// An IP-address is not required to be resolved
isHostAddressOK = true;
}
else

View File

@@ -44,7 +44,7 @@ public:
int getBacklightThreshold() const;
/// @param backlightThreshold New lower brightness
void setBacklightThreshold(int backlightThreshold);
void setBacklightThreshold(double backlightThreshold);
/// @return The current state
bool getBacklightColored() const;

View File

@@ -140,13 +140,12 @@ namespace hyperion {
{
// Special case for indices '*' => all leds
adjustment->setAdjustmentForLed(colorAdjustment->_id, 0, ledCnt-1);
//Info(Logger::getInstance("HYPERION"), "ColorAdjustment '%s' => [0-%d]", QSTRING_CSTR(colorAdjustment->_id), ledCnt-1);
continue;
}
if (!overallExp.match(ledIndicesStr).hasMatch())
{
//Error(Logger::getInstance("HYPERION"), "Given led indices %d not correct format: %s", i, QSTRING_CSTR(ledIndicesStr));
// Given LED indices are not correctly formatted
continue;
}
@@ -173,7 +172,6 @@ namespace hyperion {
ss << index;
}
}
//Info(Logger::getInstance("HYPERION"), "ColorAdjustment '%s' => [%s]", QSTRING_CSTR(colorAdjustment->_id), ss.str().c_str());
}
return adjustment;

View File

@@ -174,9 +174,9 @@ private:
if (!path.isEmpty())
{
QJsonObject obj;
modifyValue(subValue, obj, path, newValue, property);
subValue = obj;
QJsonObject tempObj;
modifyValue(subValue, tempObj, path, newValue, property);
subValue = tempObj;
}
else if (newValue != QJsonValue::Null)
subValue = newValue;