diff options
author | Björn Gustavsson <[email protected]> | 2011-05-13 14:22:29 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2011-05-13 14:22:29 +0200 |
commit | 926795501b71ebf9ca4b22927021fa551549f9b0 (patch) | |
tree | c0ae4a4a483a858c0d26dbd763752ef7b038f71d /erts/emulator/beam/global.h | |
parent | e008b6385d038196f7d2c9db98339e311e48fa88 (diff) | |
parent | 54b677e80cdd1da685c69d349ca83e68dce5b991 (diff) | |
download | otp-926795501b71ebf9ca4b22927021fa551549f9b0.tar.gz otp-926795501b71ebf9ca4b22927021fa551549f9b0.tar.bz2 otp-926795501b71ebf9ca4b22927021fa551549f9b0.zip |
Merge branch 'bjorn/fix-warnings/OTP-9250' into dev
* bjorn/fix-warnings/OTP-9250:
Eliminate alias warning in gcc 4.5.2
erl_trace: Eliminate alias warning
Diffstat (limited to 'erts/emulator/beam/global.h')
-rw-r--r-- | erts/emulator/beam/global.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/erts/emulator/beam/global.h b/erts/emulator/beam/global.h index 7d5b1853e6..30b0a60611 100644 --- a/erts/emulator/beam/global.h +++ b/erts/emulator/beam/global.h @@ -1894,6 +1894,8 @@ erts_alloc_message_heap(Uint size, # if defined(DEBUG) # define DeclareTmpHeap(VariableName,Size,Process) \ Eterm *VariableName = erts_debug_allocate_tmp_heap(Size,Process) +# define DeclareTypedTmpHeap(Type,VariableName,Process) \ + Type *VariableName = (Type *) erts_debug_allocate_tmp_heap(sizeof(Type)/sizeof(Eterm),Process) # define DeclareTmpHeapNoproc(VariableName,Size) \ Eterm *VariableName = erts_debug_allocate_tmp_heap(Size,NULL) # define UseTmpHeap(Size,Proc) \ @@ -1915,6 +1917,8 @@ erts_alloc_message_heap(Uint size, # else # define DeclareTmpHeap(VariableName,Size,Process) \ Eterm *VariableName = (ERTS_PROC_GET_SCHDATA(Process)->tmp_heap)+(ERTS_PROC_GET_SCHDATA(Process)->num_tmp_heap_used) +# define DeclareTypedTmpHeap(Type,VariableName,Process) \ + Type *VariableName = (Type *) (ERTS_PROC_GET_SCHDATA(Process)->tmp_heap)+(ERTS_PROC_GET_SCHDATA(Process)->num_tmp_heap_used) # define DeclareTmpHeapNoproc(VariableName,Size) \ Eterm *VariableName = (erts_get_scheduler_data()->tmp_heap)+(erts_get_scheduler_data()->num_tmp_heap_used) # define UseTmpHeap(Size,Proc) \ @@ -1940,6 +1944,8 @@ erts_alloc_message_heap(Uint size, #else # define DeclareTmpHeap(VariableName,Size,Process) \ Eterm VariableName[Size] +# define DeclareTypedTmpHeap(Type,VariableName,Process) \ + Type VariableName[1] # define DeclareTmpHeapNoproc(VariableName,Size) \ Eterm VariableName[Size] # define UseTmpHeap(Size,Proc) /* Nothing */ |