]> granicus.if.org Git - libatomic_ops/commit
Fix ARM char/short fetch_and_add and double-CAS operands width (GCC/Clang)
authorIvan Maidanski <ivmai@mail.ru>
Sat, 17 Aug 2013 09:58:59 +0000 (13:58 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Sat, 17 Aug 2013 10:03:20 +0000 (14:03 +0400)
commita81940c26cf3b66a5ea251b04a90db16161c5bbc
tree1c18a1e67be2cd42efcb6c9a9adfe2c565706ff6
parentdb2eef2f6e44c06e3a50b50a494dc242e4669d68
Fix ARM char/short fetch_and_add and double-CAS operands width (GCC/Clang)

* src/atomic_ops/sysdeps/gcc/arm.h (AO_char_fetch_and_add,
AO_short_fetch_and_add): Use 32-bit int type for "tmp" and "result"
local variables instead of char/short type (resolve Clang3.3 warning
"size being stored is truncated, use a modifier to specify the size"
enabled by -Wasm-operand-widths compiler option); cast "incr"
argument to int to prevent Clang3.2 warning about value
truncation.
* src/atomic_ops/sysdeps/gcc/arm.h (AO_double_compare_and_swap): Swap
assembly code operands ("new_val.AO_whole" and "addr") to prevent
Clang3.3 warning about operand truncation.
src/atomic_ops/sysdeps/gcc/arm.h