Added cppcheck-suppress for strcpy - I know strcpy is safe because I
check the length beforehand.
This commit is contained in:
@ -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:
|
||||||
|
@ -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 {
|
||||||
|
Reference in New Issue
Block a user