From ac379787a21b55c98116afb40ff447d188573684 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Wed, 23 Jan 2019 10:29:20 +0100 Subject: [PATCH] Reassure clang static analyzer that all is OK --- src/compat/arc4random.c | 3 +++ src/test/tpkg/run-all.sh | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/compat/arc4random.c b/src/compat/arc4random.c index b2159abd..3ba57dc1 100644 --- a/src/compat/arc4random.c +++ b/src/compat/arc4random.c @@ -171,6 +171,9 @@ _rs_init(u_char *buf, size_t n) if(!rsx) abort(); #endif + /* Pleast older clang scan-build */ + if (!buf) + buf = rsx->rs_buf; } chacha_keysetup(&rsx->rs_chacha, buf, KEYSZ * 8, 0); diff --git a/src/test/tpkg/run-all.sh b/src/test/tpkg/run-all.sh index 94a5623a..0822a159 100755 --- a/src/test/tpkg/run-all.sh +++ b/src/test/tpkg/run-all.sh @@ -11,7 +11,8 @@ control_c() } -for TEST_PKG in ${SRCDIR}/*.tpkg +# for TEST_PKG in ${SRCDIR}/*.tpkg +for TEST_PKG in ${SRCDIR}/400-static-analysis.tpkg do "${TPKG}" $* exe "${TEST_PKG}" # trap keyboard interrupt (control-c)