Added cppcheck-suppress for strcpy - I know strcpy is safe because I

check the length beforehand.
This commit is contained in:
2025-03-04 14:19:19 +01:00
parent 4ad842c097
commit 755ae42b3b
2 changed files with 2 additions and 11 deletions

View File

@ -24,16 +24,6 @@ formatting:
tags:
- sinq
# clangtidy:
# stage: lint
# script:
# - curl https://docker.psi.ch:5000/v2/_catalog
# # - dnf update -y
# # - dnf install -y clang-tools-extra
# # - clang-tidy sinqEPICSApp/src/*.cpp sinqEPICSApp/src/*.c sinqEPICSApp/src/*.h -checks=cppcoreguidelines-*,cert-*
# # tags:
# # - sinq
build_module:
stage: build
script:

View File

@ -43,6 +43,7 @@ void appendErrorMessage(char *fullMessage, size_t capacityFullMessage,
// The error message is empty -> Just copy the content of toBeAppended
// into fullMessage, if the formers capacity suffices
if (lenToBeAppended < capacityFullMessage) {
// cppcheck-suppress unsafeStrcpy
strcpy(fullMessage, toBeAppended);
}
} else {