From 389a25694b85750d7813d8fbe0ae8a4483889214 Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Wed, 15 Apr 2020 18:49:26 +0300 Subject: gitlab CI: when calling cppcheck ignore lib/nettle/ecc rather than lib/nettle/curve448 Signed-off-by: Dmitry Baryshkov --- .gitlab-ci.yml | 4 ++-- devel/import-ecc-from-nettle.sh | 12 ++++++++++-- 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 -- cgit v1.2.1