Merge pull request #3732 from firewave/cppcheck-style

enabled and fixed some cppcheck `style` checks
This commit is contained in:
matt335672
2026-02-20 13:53:57 +00:00
committed by GitHub
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -84,9 +84,10 @@ fi
# Supply default flags passed to cppcheck if necessary
if [ -z "$CPPCHECK_FLAGS" ]; then
CPPCHECK_FLAGS="--quiet --force --std=c11 --std=c++11 --inline-suppr \
--enable=warning,missingInclude --error-exitcode=1 \
--enable=warning,missingInclude,style --disable=portability --disable=performance --error-exitcode=1 \
-i third_party \
-i vrplayer \
--suppress=constParameterCallback --suppress=variableScope --suppress=constParameterPointer --suppress=constVariablePointer --suppress=duplicateCondition --suppress=redundantAssignment --suppress=knownConditionTrueFalse --suppress=unreadVariable --suppress=constParameter --suppress=constVariable --suppress=shadowFunction --suppress=unusedStructMember --suppress=duplicateExpression --suppress=unsignedLessThanZero --suppress=shadowVariable --suppress=unreachableCode --suppress=noExplicitConstructor --suppress=constParameterReference --suppress=functionStatic --suppress=shadowArgument --suppress=truncLongCastAssignment --suppress=cstyleCast --suppress=constVariableReference --suppress=badBitmaskCheck \
--suppress=missingIncludeSystem \
--suppress=uninitMemberVar:ulalaca/ulalaca.cpp \
--suppress=dangerousTypeCast:ulalaca/XrdpStream.template.cpp \
+2 -1
View File
@@ -375,9 +375,10 @@ xrdp_encoder_create(struct xrdp_mm *mm)
void
xrdp_encoder_delete(struct xrdp_encoder *self)
{
#if defined(XRDP_RFXCODEC) || defined(XRDP_X264) || defined(XRDP_OPENH264)
int index;
#endif
(void)index;
LOG_DEVEL(LOG_LEVEL_INFO, "xrdp_encoder_delete:");
if (self == 0)