diff options
| author | Alan Conway <aconway@apache.org> | 2008-04-02 16:13:54 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2008-04-02 16:13:54 +0000 |
| commit | 735fbf00f9ddae479c6a4e682fd3fa4224b6131f (patch) | |
| tree | dfabe52fc9e15003fb16d602397cd9f232872461 /qpid/cpp | |
| parent | f04ae76e755147e50a6e92564727de4af0221026 (diff) | |
| download | qpid-python-735fbf00f9ddae479c6a4e682fd3fa4224b6131f.tar.gz | |
Fixed logger warning on F9.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@643957 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
| -rw-r--r-- | qpid/cpp/src/qpid/sys/posix/Thread.h | 8 | ||||
| -rw-r--r-- | qpid/cpp/src/tests/logging.cpp | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/qpid/cpp/src/qpid/sys/posix/Thread.h b/qpid/cpp/src/qpid/sys/posix/Thread.h index e199c0eef6..7d51ec73aa 100644 --- a/qpid/cpp/src/qpid/sys/posix/Thread.h +++ b/qpid/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/qpid/cpp/src/tests/logging.cpp b/qpid/cpp/src/tests/logging.cpp index 201c935319..718ab01d9a 100644 --- a/qpid/cpp/src/tests/logging.cpp +++ b/qpid/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()); } |
