aboutsummaryrefslogtreecommitdiff
path: root/src/test/util_tests.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-05-14 10:45:04 -0400
committerMarcoFalke <falke.marco@gmail.com>2018-05-14 10:45:24 -0400
commitc5870ab689995e7dc1ada530e9db27cfae9bb448 (patch)
tree1d253eefe93c879191305cb32b07fd5202924f42 /src/test/util_tests.cpp
parent682698970d453410fb2f7bd7eac060c0e63056f9 (diff)
parent159c32d1f111e6bad490bd23ae215462e8ba4374 (diff)
downloadbitcoin-c5870ab689995e7dc1ada530e9db27cfae9bb448.tar.xz
Merge #12963: Fix Clang Static Analyzer warnings
159c32d1f1 Add assertion to guide static analyzers. Clang Static Analyzer needs this guidance. (practicalswift) fd447a6efe Fix dead stores. Values were stored but never read. Limit scope. (practicalswift) Pull request description: Fix Clang Static Analyzer warnings reported by @kallewoof in #12961: * Fix dead stores. Values were stored but never read. * Add assertion to guide static analyzers. See #12961 for details. Tree-SHA512: 83dbec821f45217637316bee978e7543f2d2caeb7f7b0b3aec107fede0fff8baa756da8f6b761ae0d38537740839ac9752f6689109c38a4b05c0c041aaa3a1fb
Diffstat (limited to 'src/test/util_tests.cpp')
-rw-r--r--src/test/util_tests.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index 1c3acfb1a5..2af6d9e0f3 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -1065,6 +1065,7 @@ static void TestOtherProcess(fs::path dirname, std::string lockname, int fd)
ReleaseDirectoryLocks();
ch = true; // Always succeeds
rv = write(fd, &ch, 1);
+ assert(rv == 1);
break;
case ExitCommand:
close(fd);