diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2008-04-24 15:30:02 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2008-04-24 15:30:02 +0000 |
commit | 776589651a6eea5a638c17d2c40d826c4d33bbe1 (patch) | |
tree | 3a01d784bf4185b56c9f2a4288ae25ddb4459a61 | |
parent | 7add83b3762c8c362728b351d01bf3be81a108f3 (diff) |
INTEGRATION: CWS sb85 (1.5.6); FILE MERGED
2008/03/18 14:31:43 sb 1.5.6.1: #i86955#, #i65788# in GetAtAddress, try harder to make the compiler emit suitable code
-rw-r--r-- | sal/typesconfig/typesconfig.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/sal/typesconfig/typesconfig.c b/sal/typesconfig/typesconfig.c index 051452943f9f..1077df4e3b54 100644 --- a/sal/typesconfig/typesconfig.c +++ b/sal/typesconfig/typesconfig.c @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: typesconfig.c,v $ - * $Revision: 1.6 $ + * $Revision: 1.7 $ * * This file is part of OpenOffice.org. * @@ -207,6 +207,8 @@ int check( TestFunc func, Type eT, void* p ) |* Letzte Aenderung |* *************************************************************************/ +static int dummy(void* unused); + int GetAtAddress( Type eT, void* p ) { #if defined(IA64) || defined(ARM32) @@ -221,16 +223,22 @@ int GetAtAddress( Type eT, void* p ) #else switch ( eT ) { - case t_char: return *((char*)p); - case t_short: return *((short*)p); - case t_int: return *((int*)p); - case t_long: return *((long*)p); - case t_double: return *((double*)p); + case t_char: { char x = *(char*)p; return dummy(&x); } + case t_short: { short x = *(short*)p; return dummy(&x); } + case t_int: { int x = *(int*)p; return dummy(&x); } + case t_long: { long x = *(long*)p; return dummy(&x); } + case t_double: { double x = *(double*)p; return dummy(&x); } } #endif abort(); } +int dummy(void* unused) +{ + (void)unused; + return 0; +} + /************************************************************************* |* |* SetAtAddress() |