summaryrefslogtreecommitdiff
path: root/cpp/common/concurrent
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2006-10-11 15:50:15 +0000
committerAlan Conway <aconway@apache.org>2006-10-11 15:50:15 +0000
commit2bcadbb42a6fb2f096c1fc0a4b957d64a5024ef6 (patch)
tree886eb0659c6f28c2f1d26de7d5fd29fff0072dc5 /cpp/common/concurrent
parent9fc2b6c5f0848d65f1bf20e62279c055d12a1d40 (diff)
downloadqpid-python-2bcadbb42a6fb2f096c1fc0a4b957d64a5024ef6.tar.gz
Turned up gcc warnings, fixed warnings in code, enabled -Werror.
Note: #include "qpid_test_plugin.h" instead of <cppunit/TestPlugin.h> Works around warning from a cppunit macro. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@462834 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/common/concurrent')
-rw-r--r--cpp/common/concurrent/inc/Runnable.h1
-rw-r--r--cpp/common/concurrent/src/APRBase.cpp3
-rw-r--r--cpp/common/concurrent/src/APRThread.cpp2
-rw-r--r--cpp/common/concurrent/src/APRThreadPool.cpp6
-rw-r--r--cpp/common/concurrent/src/Runnable.cpp19
5 files changed, 24 insertions, 7 deletions
diff --git a/cpp/common/concurrent/inc/Runnable.h b/cpp/common/concurrent/inc/Runnable.h
index 523ad813f7..9753a1ad0a 100644
--- a/cpp/common/concurrent/inc/Runnable.h
+++ b/cpp/common/concurrent/inc/Runnable.h
@@ -24,6 +24,7 @@ namespace concurrent {
class Runnable
{
public:
+ virtual ~Runnable();
virtual void run() = 0;
};
diff --git a/cpp/common/concurrent/src/APRBase.cpp b/cpp/common/concurrent/src/APRBase.cpp
index f87ea9e25f..f9b34b9333 100644
--- a/cpp/common/concurrent/src/APRBase.cpp
+++ b/cpp/common/concurrent/src/APRBase.cpp
@@ -91,7 +91,6 @@ void qpid::concurrent::check(apr_status_t status, const std::string& file, const
std::string qpid::concurrent::get_desc(apr_status_t status){
const int size = 50;
char tmp[size];
- std::string msg(apr_strerror(status, tmp, size));
- return msg;
+ return std::string(apr_strerror(status, tmp, size));
}
diff --git a/cpp/common/concurrent/src/APRThread.cpp b/cpp/common/concurrent/src/APRThread.cpp
index 4202fe81b6..4167fb76ff 100644
--- a/cpp/common/concurrent/src/APRThread.cpp
+++ b/cpp/common/concurrent/src/APRThread.cpp
@@ -27,7 +27,7 @@ void* APR_THREAD_FUNC ExecRunnable(apr_thread_t* thread, void *data){
return NULL;
}
-APRThread::APRThread(apr_pool_t* _pool, Runnable* _runnable) : pool(_pool), runnable(_runnable){}
+APRThread::APRThread(apr_pool_t* _pool, Runnable* _runnable) : runnable(_runnable), pool(_pool) {}
APRThread::~APRThread(){
}
diff --git a/cpp/common/concurrent/src/APRThreadPool.cpp b/cpp/common/concurrent/src/APRThreadPool.cpp
index e0fcb804e6..8518d98b67 100644
--- a/cpp/common/concurrent/src/APRThreadPool.cpp
+++ b/cpp/common/concurrent/src/APRThreadPool.cpp
@@ -22,13 +22,11 @@
using namespace qpid::concurrent;
-APRThreadPool::APRThreadPool(int _size) : size(_size), factory(new APRThreadFactory()),
- deleteFactory(true), running(false){
+APRThreadPool::APRThreadPool(int _size) : deleteFactory(true), size(_size), factory(new APRThreadFactory()), running(false){
worker = new Worker(this);
}
-APRThreadPool::APRThreadPool(int _size, ThreadFactory* _factory) : size(_size), factory(_factory),
- deleteFactory(false), running(false){
+APRThreadPool::APRThreadPool(int _size, ThreadFactory* _factory) : deleteFactory(false), size(_size), factory(_factory), running(false){
worker = new Worker(this);
}
diff --git a/cpp/common/concurrent/src/Runnable.cpp b/cpp/common/concurrent/src/Runnable.cpp
new file mode 100644
index 0000000000..cf9b8d586f
--- /dev/null
+++ b/cpp/common/concurrent/src/Runnable.cpp
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include "Runnable.h"
+qpid::concurrent::Runnable::~Runnable() {}