From cd5a418ec6e1f5448c955ec18a16f58b2e886ac1 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Mon, 7 Jan 2019 09:42:55 +0100 Subject: [PATCH] Fix maybe-unitialized warning while improving the test to use the return value of waitEvent. Beter fix than the one proposed in #6675 --- pdns/recursordist/test-mtasker.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pdns/recursordist/test-mtasker.cc b/pdns/recursordist/test-mtasker.cc index f6f1b5b465..e022a19f7b 100644 --- a/pdns/recursordist/test-mtasker.cc +++ b/pdns/recursordist/test-mtasker.cc @@ -16,9 +16,8 @@ static void doSomething(void* p) { MTasker<>* mt = reinterpret_cast*>(p); int i=12, o; - mt->waitEvent(i, &o); - g_result = o; - + if (mt->waitEvent(i, &o) == 1) + g_result = o; } BOOST_AUTO_TEST_CASE(test_Simple) { -- 2.47.2