summaryrefslogtreecommitdiff
path: root/cppu
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2011-12-01 21:24:01 +0100
committerStephan Bergmann <sbergman@redhat.com>2011-12-01 21:24:50 +0100
commitbeebf578ed20771495d2eda9e7fb898767f49d7c (patch)
tree214a11dcadf9edac17c2ea01f2608ce745aa0be0 /cppu
parentdb4017cb710b254ccc4e1980fdf419134afab252 (diff)
-Wstrict-aliasing fix
Diffstat (limited to 'cppu')
-rw-r--r--cppu/source/threadpool/threadident.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/cppu/source/threadpool/threadident.cxx b/cppu/source/threadpool/threadident.cxx
index b218c202da50..a4e76c4b91e7 100644
--- a/cppu/source/threadpool/threadident.cxx
+++ b/cppu/source/threadpool/threadident.cxx
@@ -51,8 +51,11 @@ using namespace ::cppu;
static inline void createLocalId( sal_Sequence **ppThreadId )
{
rtl_byte_sequence_constructNoDefault( ppThreadId , 4 + 16 );
- *((sal_Int32*) ((*ppThreadId)->elements)) = osl_getThreadIdentifier(0);
-
+ sal_uInt32 id = osl_getThreadIdentifier(0);
+ (*ppThreadId)->elements[0] = id & 0xFF;
+ (*ppThreadId)->elements[1] = (id >> 8) & 0xFF;
+ (*ppThreadId)->elements[2] = (id >> 16) & 0xFF;
+ (*ppThreadId)->elements[3] = (id >> 24) & 0xFF;
rtl_getGlobalProcessId( (sal_uInt8 * ) &( (*ppThreadId)->elements[4]) );
}