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

@ -1,6 +1,6 @@
default: default:
image: docker.psi.ch:5000/sinqdev/sinqepics:latest image: docker.psi.ch:5000/sinqdev/sinqepics:latest
stages: stages:
- lint - lint
- build - build
@ -24,16 +24,6 @@ formatting:
tags: tags:
- sinq - 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: build_module:
stage: build stage: build
script: 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 // The error message is empty -> Just copy the content of toBeAppended
// into fullMessage, if the formers capacity suffices // into fullMessage, if the formers capacity suffices
if (lenToBeAppended < capacityFullMessage) { if (lenToBeAppended < capacityFullMessage) {
// cppcheck-suppress unsafeStrcpy
strcpy(fullMessage, toBeAppended); strcpy(fullMessage, toBeAppended);
} }
} else { } else {