From e8c3f1afdecfaf34f6d67ed31a5df91c855ddfdf Mon Sep 17 00:00:00 2001 From: Marcin Siodelski Date: Tue, 15 Sep 2020 18:17:15 +0200 Subject: [PATCH] [#1415] Initialize bools in tests To prevent warnings spit out by gcc. --- src/lib/dhcpsrv/tests/free_lease_queue_unittest.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/dhcpsrv/tests/free_lease_queue_unittest.cc b/src/lib/dhcpsrv/tests/free_lease_queue_unittest.cc index 139cd56aa2..21a4b50f0f 100644 --- a/src/lib/dhcpsrv/tests/free_lease_queue_unittest.cc +++ b/src/lib/dhcpsrv/tests/free_lease_queue_unittest.cc @@ -150,7 +150,7 @@ TEST(FreeLeaseQueueTest, removeRange) { ASSERT_NO_THROW(lq.addRange(range1)); ASSERT_NO_THROW(lq.addRange(range2)); - bool removed; + bool removed = false; // Expect true to be returned when the range is removed. ASSERT_NO_THROW(removed = lq.removeRange(range1)); @@ -182,7 +182,7 @@ TEST(FreeLeaseQueueTest, removePrefixRange) { ASSERT_NO_THROW(lq.addRange(range1)); ASSERT_NO_THROW(lq.addRange(range2)); - bool removed; + bool removed = false; // Expect true to be returned when the range is removed. ASSERT_NO_THROW(removed = lq.removeRange(range1));