summaryrefslogtreecommitdiff
path: root/.travis.sh
diff options
context:
space:
mode:
authorSebastian Pipping <sebastian@pipping.org>2021-04-05 18:32:03 +0200
committerSebastian Pipping <sebastian@pipping.org>2021-04-05 18:52:16 +0200
commit2f051a681b17b903808fb53ab9ab0e498c8af354 (patch)
tree1df46f626800f584201988874baeae7f400721a9 /.travis.sh
parentbfe4b25b8019ceb962698df0078402a33c215410 (diff)
downloadlibexpat-git-2f051a681b17b903808fb53ab9ab0e498c8af354.tar.gz
cppcheck: Suprocess warnings of type "objectIndex"
Report from Cppcheck 2.4.1 was: lib/xmlparse.c:729:26: warning: The address of local variable 'entropy' might be accessed at non-zero index. [objectIndex] ((uint8_t *)target)[bytesWrittenTotal] = random8; ^ lib/xmlparse.c:820:39: note: Address of variable taken here. writeRandomBytes_arc4random((void *)&entropy, sizeof(entropy)); ^ lib/xmlparse.c:820:31: note: Calling function 'writeRandomBytes_arc4random', 1st argument '(void*)&entropy' value is lifetime=entropy writeRandomBytes_arc4random((void *)&entropy, sizeof(entropy)); ^ lib/xmlparse.c:729:26: note: The address of local variable 'entropy' might be accessed at non-zero index. ((uint8_t *)target)[bytesWrittenTotal] = random8; ^ lib/xmltok.c:318:54: error: The address of local variable 'fromLim' is accessed at non-zero index. [objectIndex] const unsigned char prev = (unsigned char)fromLim[-1]; ^ lib/xmltok.c:369:56: note: Address of variable taken here. _INTERNAL_trim_to_complete_utf8_characters(*fromP, &fromLim); ^ lib/xmltok.c:369:56: note: Calling function '_INTERNAL_trim_to_complete_utf8_characters', 2nd argument '&fromLim' value is lifetime=fromLim _INTERNAL_trim_to_complete_utf8_characters(*fromP, &fromLim); ^ lib/xmltok.c:318:54: note: The address of local variable 'fromLim' is accessed at non-zero index. const unsigned char prev = (unsigned char)fromLim[-1]; ^
Diffstat (limited to '.travis.sh')
-rwxr-xr-x.travis.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/.travis.sh b/.travis.sh
index 06d98d09..c9e57d01 100755
--- a/.travis.sh
+++ b/.travis.sh
@@ -70,7 +70,7 @@ elif [[ ${MODE} = cppcheck ]]; then
-name xmltok_ns.c
-o -name xmltok_impl.c
\)
- -exec cppcheck --quiet --error-exitcode=1 --force {} +
+ -exec cppcheck --quiet --error-exitcode=1 --force --suppress=objectIndex {} +
)
find "${find_args[@]}"
elif [[ ${MODE} = clang-format ]]; then