]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1568] Fixed warnings
authorFrancis Dupont <fdupont@isc.org>
Tue, 8 Dec 2020 22:33:02 +0000 (23:33 +0100)
committerFrancis Dupont <fdupont@isc.org>
Tue, 8 Dec 2020 22:33:02 +0000 (23:33 +0100)
configure.ac
src/bin/agent/tests/Makefile.am
src/bin/agent/tests/basic_auth_library.cc
src/bin/agent/tests/ca_cfg_mgr_unittests.cc
src/bin/agent/tests/ca_response_creator_unittests.cc
src/bin/agent/tests/get_config_unittest.cc
src/bin/agent/tests/test_basic_auth_libraries.h.in [new file with mode: 0644]
src/bin/agent/tests/test_callout_libraries.h.in [moved from src/bin/agent/tests/test_libraries.h.in with 80% similarity]

index 4220c277d42ce930972bc9df9b985aa7710be822..852cb79a753cd7571dcb71cd0bf91fe48b8f1cbf 100755 (executable)
@@ -1589,8 +1589,9 @@ AC_CONFIG_FILES([Makefile
                  src/bin/agent/Makefile
                  src/bin/agent/tests/Makefile
                  src/bin/agent/tests/ca_process_tests.sh
+                 src/bin/agent/tests/test_basic_auth_libraries.h
+                 src/bin/agent/tests/test_callout_libraries.h
                  src/bin/agent/tests/test_data_files_config.h
-                 src/bin/agent/tests/test_libraries.h
                  src/bin/d2/Makefile
                  src/bin/d2/tests/Makefile
                  src/bin/d2/tests/d2_process_tests.sh
index 834b776db8710b2f3de6c45e0773d4501b2dfe88..be15846bc7772016343d6f0cfd525bc175a6c4fa 100644 (file)
@@ -27,7 +27,8 @@ AM_CPPFLAGS += -DSYNTAX_FILE=\"$(abs_srcdir)/../agent_parser.yy\"
 
 CLEANFILES = $(builddir)/interfaces.txt $(builddir)/logger_lockfile
 
-DISTCLEANFILES = ca_process_tests.sh test_data_files_config.h test_libraries.h
+DISTCLEANFILES  = ca_process_tests.sh test_data_files_config.h
+DISTCLEANFILES += test_basic_auth_libraries.h test_callout_libraries.h
 
 AM_CXXFLAGS = $(KEA_CXXFLAGS)
 
@@ -104,7 +105,9 @@ libbasicauth_la_LIBADD  += $(top_builddir)/src/lib/exceptions/libkea-exceptions.
 libbasicauth_la_LIBADD  += $(LOG4CPLUS_LIBS) $(BOOST_LIBS)
 libbasicauth_la_LDFLAGS  = -avoid-version -export-dynamic -module -rpath /nowhere
 
-nodist_ca_unittests_SOURCES = test_data_files_config.h test_libraries.h
+nodist_ca_unittests_SOURCES  = test_data_files_config.h
+nodist_ca_unittests_SOURCES += test_basic_auth_libraries.h
+nodist_ca_unittests_SOURCES += test_callout_libraries.h
 
 endif
 
index 9731d557f0fa7c79da0e7c0ce866f93ae354a647..924d656bc543f29c4dad6d3bec142bc68f43ab93 100644 (file)
@@ -60,7 +60,7 @@ ResponseCreator::createNewHttpRequest() const {
 }
 
 HttpResponsePtr
-ResponseCreator::createStockHttpResponse(const HttpRequestPtr& request,
+ResponseCreator::createStockHttpResponse(const HttpRequestPtr& /*request*/,
                                          const HttpStatusCode& status_code) const {
     HttpVersion http_version(1, 1);
     HttpResponsePtr response(new HttpResponseJson(http_version, status_code));
@@ -69,7 +69,7 @@ ResponseCreator::createStockHttpResponse(const HttpRequestPtr& request,
 }
 
 HttpResponsePtr
-ResponseCreator::createDynamicHttpResponse(HttpRequestPtr request) {
+ResponseCreator::createDynamicHttpResponse(HttpRequestPtr /*request*/) {
     isc_throw(NotImplemented, "createDynamicHttpResponse should not be called");
 }
 
index 4ae7f91fda84ecb848d41781e3f3d7e740c2eedd..65c739825af99eb2dbcd29695b4c284d8b89c794 100644 (file)
@@ -11,7 +11,7 @@
 #include <process/testutils/d_test_stubs.h>
 #include <process/d_cfg_mgr.h>
 #include <http/basic_auth_config.h>
-#include <agent/tests/test_libraries.h>
+#include <agent/tests/test_callout_libraries.h>
 #include <boost/pointer_cast.hpp>
 #include <boost/scoped_ptr.hpp>
 #include <gtest/gtest.h>
index 38ae18e9f223c942281307bbcaca0f1bfe017f8a..a50a15c49b7bb582338732ce64dee19895cf46cb 100644 (file)
@@ -17,7 +17,7 @@
 #include <http/post_request_json.h>
 #include <http/response_json.h>
 #include <process/testutils/d_test_stubs.h>
-#include <agent/tests/test_libraries.h>
+#include <agent/tests/test_basic_auth_libraries.h>
 #include <gtest/gtest.h>
 #include <boost/pointer_cast.hpp>
 #include <functional>
index b9227bea1ad1bfbd1ae48faf992e1cd87b9e8281..45396ecaf13bf6505209a1322442666e9f0dc7cc 100644 (file)
@@ -21,7 +21,7 @@
 #include <sstream>
 
 #include "test_data_files_config.h"
-#include "test_libraries.h"
+#include "test_callout_libraries.h"
 
 using namespace isc::agent;
 using namespace isc::config;
diff --git a/src/bin/agent/tests/test_basic_auth_libraries.h.in b/src/bin/agent/tests/test_basic_auth_libraries.h.in
new file mode 100644 (file)
index 0000000..fb6dbe6
--- /dev/null
@@ -0,0 +1,24 @@
+// Copyright (C) 2017-2020 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
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef AGENT_TEST_BASIC_AUTH_LIBRARIES_H
+#define AGENT_TEST_BASIC_AUTH_LIBRARIES_H
+
+#include <config.h>
+
+namespace {
+
+// Names of the libraries used in these tests.  These libraries are built using
+// libtool, so we need to look in the hidden ".libs" directory to locate the
+// .so file.  Note that we access the .so file - libtool creates this as a
+// like to the real shared library.
+
+// Basic HTTP authentication as a callout library.
+static const char* BASIC_AUTH_LIBRARY = "@abs_builddir@/.libs/libbasicauth.so";
+
+} // anonymous namespace
+
+#endif // TEST_BASIC_AUTH_LIBRARIES_H
similarity index 80%
rename from src/bin/agent/tests/test_libraries.h.in
rename to src/bin/agent/tests/test_callout_libraries.h.in
index 77cee3522cd619285f316f3d750a4a4fd6bdec34..78f51c8815eb0649d96d05b65e9795f9de78e1a1 100644 (file)
@@ -4,8 +4,8 @@
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-#ifndef AGENT_TEST_LIBRARIES_H
-#define AGENT_TEST_LIBRARIES_H
+#ifndef AGENT_TEST_CALLOUT_LIBRARIES_H
+#define AGENT_TEST_CALLOUT_LIBRARIES_H
 
 #include <config.h>
 
@@ -19,9 +19,6 @@ namespace {
 // Basic callout library with context_create and three "standard" callouts.
 static const char* CALLOUT_LIBRARY = "@abs_builddir@/.libs/libcallout.so";
 
-// Basic HTTP authentication as a callout library.
-static const char* BASIC_AUTH_LIBRARY = "@abs_builddir@/.libs/libbasicauth.so";
-
 } // anonymous namespace
 
 #endif // TEST_LIBRARIES_H