Browse Source

[3736] Fixed the functionStatic cppcheck errors in multiple places.

Marcin Siodelski 10 years ago
parent
commit
69572795fd

+ 4 - 5
src/lib/cc/tests/session_unittests.cc

@@ -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) {

+ 3 - 3
src/lib/dns/messagerenderer.cc

@@ -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;

+ 2 - 2
src/lib/log/tests/logger_manager_unittest.cc

@@ -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