]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3736] Fixed the functionStatic cppcheck errors in multiple places.
authorMarcin Siodelski <marcin@isc.org>
Fri, 6 Mar 2015 19:55:33 +0000 (20:55 +0100)
committerMarcin Siodelski <marcin@isc.org>
Fri, 6 Mar 2015 19:55:33 +0000 (20:55 +0100)
src/lib/cc/tests/session_unittests.cc
src/lib/dns/messagerenderer.cc
src/lib/log/tests/logger_manager_unittest.cc

index e3546d28462875c71b7dd3bc378f446889f4975b..81a3c8971ce033dd05e85a650887615785ea496f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2009  Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2009,2015  Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -77,9 +77,8 @@ public:
         acceptor_(io_service_, ep_),
         socket_(io_service_)
     {
-        acceptor_.async_accept(socket_,
-                               boost::bind(&TestDomainSocket::acceptHandler,
-                                           this, _1));
+        acceptor_.async_accept(socket_, boost::bind(&TestDomainSocket::acceptHandler,
+                                                    _1));
     }
 
     ~TestDomainSocket() {
@@ -87,7 +86,7 @@ public:
         unlink(BUNDY_TEST_SOCKET_FILE);
     }
 
-    void acceptHandler(const asio::error_code&) const {
+    static void acceptHandler(const asio::error_code&) {
     }
 
     void sendmsg(isc::data::ElementPtr& env, isc::data::ElementPtr& msg) {
index bc11cb4d83dad1be92a9047c2c96a94a7f2eafdb..2c73d657cd0a8a9ac457c2253adbf130f3ecda88 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2009  Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2009,2015  Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -117,8 +117,8 @@ struct NameCompare {
     }
 
 private:
-    uint16_t nextPosition(const OutputBuffer& buffer,
-                          uint16_t pos, uint16_t& llen) const
+    static uint16_t nextPosition(const OutputBuffer& buffer,
+                                 uint16_t pos, uint16_t& llen)
     {
         if (llen == 0) {
             size_t i = 0;
index 95e660ea9895ae75513ca40b97fe2421772a2f54..c5b036e437ef5fc3677117d2a7149ded833a4c70 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011,2015 Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -113,7 +113,7 @@ public:
     // does not exist, use /tmp.
     //
     // \return Temporary file name
-    std::string createTempFilename() {
+    static std::string createTempFilename() {
         string filename = TEMP_DIR + "/kea_logger_manager_test_XXXXXX";
 
         // Copy into writeable storage for the call to mkstemp