]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3166] fix compilation error in unit tests
authorAndrei Pavel <andrei@isc.org>
Thu, 23 Nov 2023 13:37:54 +0000 (15:37 +0200)
committerAndrei Pavel <andrei@isc.org>
Thu, 23 Nov 2023 16:38:09 +0000 (18:38 +0200)
src/lib/asiolink/tests/tls_unittest.cc
src/lib/cc/tests/stamped_value_unittest.cc
src/lib/dhcpsrv/mysql_host_data_source.cc
src/lib/dhcpsrv/parsers/dhcp_parsers.cc
src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.cc
src/lib/dns/tests/rdata_unittest.cc

index 59a3b3c8e8877ba1daaf1e19511c1264c28fbbe8..35fc8c4898abc8888eea5ad825f9b7df13cbd1ae 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2021-2022 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2021-2023 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -633,6 +633,8 @@ TEST(TLSTest, loadCertKeyFile) {
     exps.addThrow("no start line (PEM routines, CRYPTO_internal)");
     exps.addThrow("PEM lib");
     exps.addThrow("PEM lib (SSL routines)");
+    exps.addThrow("unsupported");
+    exps.addThrow("unsupported (DECODER routines)");
     // Another possible error.
     exps.addThrow("No such file or directory");
     exps.runCanThrow([] {
index 367382524c9a09f8b27aef91485d316ed9ef9812..d305a34520aa0d3f18b437f1b3f26141e94a9bb9 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018-2019 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2023 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -63,7 +63,7 @@ TEST(StampedValueTest, createFromInteger) {
     EXPECT_EQ(Element::integer, value->getType());
     EXPECT_EQ("bar", value->getName());
     EXPECT_EQ("5", value->getValue());
-    int64_t signed_integer;
+    int64_t signed_integer = 0;
     ASSERT_NO_THROW(signed_integer = value->getIntegerValue());
     EXPECT_EQ(5, signed_integer);
 
index effdc3791fdc368d8e5ced064dd594f00a527d5a..b070ec8033b30f3a295a779514d263d6101d9535 100644 (file)
@@ -1027,7 +1027,7 @@ private:
                     option = def->optionFactory(universe_, code_, buf.begin(),
                                                 value_null_ == MLM_FALSE ? buf.end() :
                                                 buf.begin());
-                 } else {
+                } else {
                     // Spit the value specified in comma separated values
                     // format.
                     std::vector<std::string> split_vec;
@@ -1789,9 +1789,6 @@ private:
     /// @brief Binary address data.
     std::vector<uint8_t> addr6_;
 
-    /// @brief Binary address buffer.
-    uint8_t addr6_buffer_[isc::asiolink::V6ADDRESS_LEN];
-
     /// @brief Binary address length.
     unsigned long addr6_length_;
 };
index 97a93a035ab692dea342d42430a86c0675a1f101..384369c1e42f53fbdaafb51d9f3f796ca0db47a8 100644 (file)
@@ -1093,7 +1093,7 @@ PdPoolParser::PdPoolParser() {
 }
 
 void
-PdPoolParser::parse(PoolStoragePtr pools, ConstElementPtr pd_pool_, 
+PdPoolParser::parse(PoolStoragePtr pools, ConstElementPtr pd_pool_,
                     bool encapsulate_options) {
     checkKeywords(SimpleParser6::PD_POOL6_PARAMETERS, pd_pool_);
 
index 0db51bf63eb7024141b4cb5f01e357ed6fad3dae..ad2f23f3709cea003a25adf804a744a65553760c 100644 (file)
@@ -1615,10 +1615,10 @@ GenericLeaseMgrTest::testLease6LeaseTypeCheck() {
     // Verify getting a collection of leases by type, DUID, and IAID.
     // Iterate over the lease types, asking for leases based on
     // lease type, DUID, and IAID.
-    for (int i = 0; i < 3; ++i) {
+    for (size_t i = 0; i < 3; ++i) {
         Lease6Collection returned = lmptr_->getLeases6(leasetype6_[i], *duid, 142);
 
-        auto compare = [](Lease6Ptr& left, Lease6Ptr& right) {
+        auto compare = [](const Lease6Ptr& left, const Lease6Ptr& right) {
             return (left->addr_ < right->addr_);
         };
         std::sort(returned.begin(), returned.end(), compare);
index e189d0f717c526d5ac6a9b626d145619a3bd36e3..afc16a19862ad23f806b46437646a28df0135aa0 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2010-2020 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2010-2023 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -7,6 +7,7 @@
 #include <config.h>
 
 #include <functional>
+#include <iomanip>
 #include <vector>
 #include <string>
 #include <sstream>