]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2025] fix g++ warnings
authorAndrei Pavel <andrei@isc.org>
Tue, 10 Aug 2021 14:03:13 +0000 (17:03 +0300)
committerAndrei Pavel <andrei@isc.org>
Tue, 17 Aug 2021 06:31:05 +0000 (09:31 +0300)
src/bin/dhcp4/tests/config_parser_unittest.cc
src/lib/dhcpsrv/tests/d2_client_unittest.cc
src/lib/util/tests/csv_file_unittest.cc
src/lib/util/tests/io_utilities_unittest.cc

index da9fb9ee9dc8c9fac9e8c4b34112b1e50e062e67..668a9cd7491b9f45b335a3ef96eae5f5f55a37e5 100644 (file)
@@ -1966,8 +1966,8 @@ TEST_F(Dhcp4ParserTest, multiplePools) {
     EXPECT_EQ("type=V4, 192.0.3.128-192.0.3.255",
               pools2[1]->toText());
     // There shouldn't be any TA or PD pools
-    EXPECT_THROW((*subnet)->getPools(Lease::TYPE_TA).empty(), BadValue);
-    EXPECT_THROW((*subnet)->getPools(Lease::TYPE_PD).empty(), BadValue);
+    EXPECT_THROW((*subnet)->getPools(Lease::TYPE_TA), BadValue);
+    EXPECT_THROW((*subnet)->getPools(Lease::TYPE_PD), BadValue);
 }
 
 // Test verifies that a subnet with pool values that do not belong to that
index c21cbd68b41f745f3e8374b9f81788a8fbbca8b2..c15afc59fda26f7d0fb844069afbccaacb58b838 100644 (file)
@@ -669,7 +669,6 @@ TEST_F(D2ClientMgrParamsTest, qualifyName) {
 /// qualifying suffix.
 TEST_F(D2ClientMgrParamsTest, qualifyNameWithoutDuplicatingSuffix) {
     D2ClientMgr mgr;
-    bool do_not_dot = false;
     bool do_dot = true;
 
     // Create enabled configuration
index fbc75c961b2aeef54a68d4c801e21382a63ddd33..f55ec551b5f6ef5da361e992bb0e202e9d303b01 100644 (file)
@@ -642,7 +642,7 @@ TEST_F(CSVFileTest, parseContentWithoutTrailingBlankLine) {
 
 // Check that blank lines are skipped when reading from a file.
 TEST_F(CSVFileTest, parseContentWithBlankLines) {
-    for (std::string const& content : {
+    for (char const* const& content : {
         // Single intermediary blank line
         "animal,age,color\n"
         "cat,4,white\n"
index 8a527d46169fe8bf9a4015dadd148ba760e69348..6ecbf18ab16d07377e7e22b312e06a59d19fa211 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2011-2018 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011-2021 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
@@ -24,7 +24,7 @@ using namespace isc::util;
 TEST(asioutil, readUint16) {
 
     // Reference buffer
-    uint8_t data[2];
+    uint8_t data[2] = {0, 0};
     InputBuffer buffer(data, sizeof(data));
 
     // Avoid possible compiler warnings by only setting uint8_t variables to