mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Add CodeQL for GitHub code scanning (#1548)
* Create codeql.yml * Addressing codeql findings
This commit is contained in:
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user