Suppress strcpy-related errors on a global level

This commit is contained in:
2025-03-04 14:45:47 +01:00
parent 55aabb0468
commit d975af75a2
2 changed files with 1 additions and 3 deletions

View File

@ -9,7 +9,7 @@ stages:
cppcheck:
stage: lint
script:
- cppcheck --std=c++17 --addon=cert --addon=misc --error-exitcode=1 src/*.cpp
- cppcheck --std=c++17 --addon=cert --addon=misc --suppress=cert-STR07-C --error-exitcode=1 src/*.cpp
artifacts:
expire_in: 1 week
tags:

View File

@ -45,7 +45,6 @@ void appendErrorMessage(char *fullMessage, size_t capacityFullMessage,
if (lenToBeAppended < capacityFullMessage) {
// We check before that the capacity of fullMessage is sufficient
// cppcheck-suppress cert-STR07-C
strcpy(fullMessage, toBeAppended);
}
} else {
@ -58,7 +57,6 @@ void appendErrorMessage(char *fullMessage, size_t capacityFullMessage,
// fullMessage[lenFullMessage + 1] = '\0';
// We check before that the capacity of fullMessage is sufficient
// cppcheck-suppress cert-STR07-C
strcat(fullMessage, toBeAppended);
}
}