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

@@ -223,13 +223,11 @@ void EncoderThread::processImageMjpeg()
{
_xform->options = TJXOPT_CROP;
_xform->r = tjregion {_cropLeft,_cropTop,transformedWidth,transformedHeight};
//qDebug() << "processImageMjpeg() | _doTransform - Image cropped: transformedWidth: " << transformedWidth << " transformedHeight: " << transformedHeight;
}
else
{
_xform->options = 0;
_xform->r = tjregion {0,0,_width,_height};
//qDebug() << "processImageMjpeg() | _doTransform - Image not cropped: _width: " << _width << " _height: " << _height;
}
_xform->options |= TJXOPT_TRIM;
@@ -344,11 +342,9 @@ bool EncoderThread::onError(const QString context) const
#if LIBJPEG_TURBO_VERSION_NUMBER > 2000000
if (tjGetErrorCode(_tjInstance) == TJERR_FATAL)
{
//qDebug() << context << "Error: " << QString(tjGetErrorStr2(_tjInstance));
treatAsError = true;
}
#else
//qDebug() << context << "Error: " << QString(tjGetErrorStr());
treatAsError = true;
#endif