summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Baryshkov <dbaryshkov@gmail.com>2020-04-15 18:49:26 +0300
committerDmitry Baryshkov <dbaryshkov@gmail.com>2020-04-15 18:49:26 +0300
commit389a25694b85750d7813d8fbe0ae8a4483889214 (patch)
tree140c999b49eaf1bc91306577bdcda34f20c6f311
parentd1f44454d6831aade6c8ee478da2da767a75dc63 (diff)
downloadgnutls-389a25694b85750d7813d8fbe0ae8a4483889214.tar.gz
gitlab CI: when calling cppcheck ignore lib/nettle/ecc rather than lib/nettle/curve448
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
-rw-r--r--.gitlab-ci.yml4
-rwxr-xr-xdevel/import-ecc-from-nettle.sh12
2 files changed, 12 insertions, 4 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 050d8cf19f..d42dfcffee 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -42,7 +42,7 @@ variables:
FEDORA_BUILD: buildenv-fedora31
MINGW_BUILD: buildenv-mingw
ALPINE_BASE_BUILD: buildenv-alpine-base
- CPPCHECK_OPTIONS: "--enable=warning --enable=style --enable=performance --enable=portability --std=c99 --suppressions-list=devel/cppcheck.suppressions -i lib/nettle/curve448 --template='{id}:{file}:{line},{severity},{message}'"
+ CPPCHECK_OPTIONS: "--enable=warning --enable=style --enable=performance --enable=portability --std=c99 --suppressions-list=devel/cppcheck.suppressions --template='{id}:{file}:{line},{severity},{message}'"
GET_SOURCES_ATTEMPTS: "3"
##################################################
@@ -290,7 +290,7 @@ static-analyzers.Fedora.x86_64:
- scan-build --status-bugs -o scan-build-lib make -j$BUILDJOBS -C libdane
- make -j$BUILDJOBS -C src/gl
- scan-build --status-bugs -o scan-build-lib make -j$BUILDJOBS -C src
- - cppcheck --force -q -Ilib/include -Igl/ -Ilib/ -I. --error-exitcode=1 lib/ -i lib/unistring -i lib/minitasn1 -i lib/nettle/backport -j2 $CPPCHECK_OPTIONS
+ - cppcheck --force -q -Ilib/include -Igl/ -Ilib/ -I. --error-exitcode=1 lib/ -i lib/unistring -i lib/minitasn1 -i lib/nettle/backport -i lib/nettle/ecc -j2 $CPPCHECK_OPTIONS
- cppcheck --force -q -Ilib/include -Igl/ -Ilibdane/ -I. --error-exitcode=1 libdane/ -j2 $CPPCHECK_OPTIONS
after_script:
- /bin/true
diff --git a/devel/import-ecc-from-nettle.sh b/devel/import-ecc-from-nettle.sh
index 99d56c5c17..9ed40f077a 100755
--- a/devel/import-ecc-from-nettle.sh
+++ b/devel/import-ecc-from-nettle.sh
@@ -191,8 +191,16 @@ for f in $IMPORTS; do
# Suppress whitespace errors in 'make syntax-check'.
sed 's/ * / /g' $dst > $dst-t && mv $dst-t $dst
;;
- */ecc-random.c|*/gostdsa-sign.c)
- sed 's/"nettle-internal\.h"/"nettle-alloca.h"/' $dst > $dst-t && mv $dst-t $dst
+ */ecc-random.c )
+ sed \
+ -e 's/"nettle-internal\.h"/"nettle-alloca.h"/' \
+ -e 's/^ & (mpn_sub_n/ \& (int)(mpn_sub_n/' \
+ $dst > $dst-t && mv $dst-t $dst
+ ;;
+ */gostdsa-sign.c)
+ sed \
+ -e 's/"nettle-internal\.h"/"nettle-alloca.h"/' \
+ $dst > $dst-t && mv $dst-t $dst
;;
esac
else