summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-04-02 16:13:54 +0000
committerAlan Conway <aconway@apache.org>2008-04-02 16:13:54 +0000
commite2611af099984e1e2eea65cded8140a21136ddbf (patch)
treec5a69ef06cfb981623d51773b94eb57989cceaae /cpp
parentf7df8c47a16c72180fc709524bf6718862581327 (diff)
downloadqpid-python-e2611af099984e1e2eea65cded8140a21136ddbf.tar.gz
Fixed logger warning on F9.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@643957 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/qpid/sys/posix/Thread.h8
-rw-r--r--cpp/src/tests/logging.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/cpp/src/qpid/sys/posix/Thread.h b/cpp/src/qpid/sys/posix/Thread.h
index e199c0eef6..7d51ec73aa 100644
--- a/cpp/src/qpid/sys/posix/Thread.h
+++ b/cpp/src/qpid/sys/posix/Thread.h
@@ -38,7 +38,7 @@ class Thread
/** ID of current thread for logging.
* Workaround for broken Thread::current() in APR
*/
- static long logId() { return current().id(); }
+ static unsigned long logId() { return current().id(); }
inline static void yield();
@@ -48,7 +48,7 @@ class Thread
inline void join();
- inline long id();
+ inline unsigned long id();
private:
static void* runRunnable(void* runnable);
@@ -72,8 +72,8 @@ void Thread::join(){
QPID_POSIX_ASSERT_THROW_IF(pthread_join(thread, 0));
}
-long Thread::id() {
- return long(thread);
+unsigned long Thread::id() {
+ return thread;
}
Thread::Thread(pthread_t thr) : thread(thr) {}
diff --git a/cpp/src/tests/logging.cpp b/cpp/src/tests/logging.cpp
index 201c935319..718ab01d9a 100644
--- a/cpp/src/tests/logging.cpp
+++ b/cpp/src/tests/logging.cpp
@@ -172,7 +172,7 @@ BOOST_AUTO_TEST_CASE(testLoggerFormat) {
l.format(~0); // Everything
QPID_LOG(critical, "foo");
- string re=".* critical \\[[0-9a-f]*] "+string(__FILE__)+":\\d+:void .*testLoggerFormat.*\\(\\): foo\n";
+ string re=".* critical -?\\[[0-9a-f]*] "+string(__FILE__)+":\\d+:void .*testLoggerFormat.*\\(\\): foo\n";
BOOST_CHECK_REGEX(re, out->last());
}