Skip to content

Commit b612b85

Browse files
committed
Allow coverity build of tests on develop
1 parent cf7e6d1 commit b612b85

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.github/workflows/coverity-scan-develop.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,22 @@ jobs:
1818
sudo apt-get update
1919
sudo apt-get install -y \
2020
docbook-xsl \
21+
google-mock \
22+
googletest \
2123
lcov \
2224
libc-ares-dev \
2325
libcjson-dev \
2426
libcjson1 \
2527
libcunit1-dev \
2628
libedit-dev \
29+
libgmock-dev \
2730
libmicrohttpd-dev \
2831
libssl-dev \
2932
libwrap0-dev \
3033
microsocks \
3134
python3-all \
3235
python3-paho-mqtt \
3336
python3-psutil \
34-
uthash-dev \
3537
xsltproc
3638
3739
- uses: vapier/coverity-scan-action@v1

deps/uthash.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,6 @@ do {
645645
} while (0)
646646

647647
#define HASH_JEN(key,keylen,hashv) \
648-
/* coverity[integer_overflow] - intentional wrapping in Jenkins hash */ \
649648
do { \
650649
unsigned _hj_i,_hj_j,_hj_k; \
651650
unsigned const char *_hj_key=(unsigned const char*)(key); \
@@ -656,6 +655,7 @@ do {
656655
_hj_i += (_hj_key[0] + ( (unsigned)_hj_key[1] << 8 ) \
657656
+ ( (unsigned)_hj_key[2] << 16 ) \
658657
+ ( (unsigned)_hj_key[3] << 24 ) ); \
658+
/* coverity[overflow_const] - intentional wrapping in Jenkins hash */ \
659659
_hj_j += (_hj_key[4] + ( (unsigned)_hj_key[5] << 8 ) \
660660
+ ( (unsigned)_hj_key[6] << 16 ) \
661661
+ ( (unsigned)_hj_key[7] << 24 ) ); \
@@ -673,9 +673,13 @@ do {
673673
case 11: hashv += ( (unsigned)_hj_key[10] << 24 ); /* FALLTHROUGH */ \
674674
case 10: hashv += ( (unsigned)_hj_key[9] << 16 ); /* FALLTHROUGH */ \
675675
case 9: hashv += ( (unsigned)_hj_key[8] << 8 ); /* FALLTHROUGH */ \
676+
/* coverity[overflow_const] - intentional wrapping in Jenkins hash */ \
676677
case 8: _hj_j += ( (unsigned)_hj_key[7] << 24 ); /* FALLTHROUGH */ \
678+
/* coverity[overflow_const] - intentional wrapping in Jenkins hash */ \
677679
case 7: _hj_j += ( (unsigned)_hj_key[6] << 16 ); /* FALLTHROUGH */ \
680+
/* coverity[overflow_const] - intentional wrapping in Jenkins hash */ \
678681
case 6: _hj_j += ( (unsigned)_hj_key[5] << 8 ); /* FALLTHROUGH */ \
682+
/* coverity[overflow_const] - intentional wrapping in Jenkins hash */ \
679683
case 5: _hj_j += _hj_key[4]; /* FALLTHROUGH */ \
680684
case 4: _hj_i += ( (unsigned)_hj_key[3] << 24 ); /* FALLTHROUGH */ \
681685
case 3: _hj_i += ( (unsigned)_hj_key[2] << 16 ); /* FALLTHROUGH */ \

0 commit comments

Comments
 (0)