diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-04-21 06:30:23 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-04-21 06:30:23 +0000 |
commit | bef71744f4685c36a2c2db1af2d9d97a1abca305 (patch) | |
tree | 32ef323c5510fa3321c859182f59030f2c675829 /codecs/gsm/inc | |
parent | 31e8dcf4fe91466bf35a3f6d4de2bd714c43b288 (diff) |
fix various compiler warnings
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5491 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'codecs/gsm/inc')
-rwxr-xr-x | codecs/gsm/inc/private.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/codecs/gsm/inc/private.h b/codecs/gsm/inc/private.h index 140aef1ae..b7115ae51 100755 --- a/codecs/gsm/inc/private.h +++ b/codecs/gsm/inc/private.h @@ -151,13 +151,18 @@ static __inline__ short GSM_SUB(short a, short b) */ /* Nonportable, but faster: */ -#define GSM_ADD(a, b) \ - ((ulongword)((ltmp = (longword)(a) + (longword)(b)) - MIN_WORD) > \ - MAX_WORD - MIN_WORD ? (ltmp > 0 ? MAX_WORD : MIN_WORD) : ltmp) - -# define GSM_SUB(a, b) \ - ((ltmp = (longword)(a) - (longword)(b)) >= MAX_WORD \ - ? MAX_WORD : ltmp <= MIN_WORD ? MIN_WORD : ltmp) +# define GSM_ADD(a, b) ({ \ + register longword ltmp; \ + ltmp = (longword) (a) + (longword) (b); \ + ((ulongword) (ltmp - MIN_WORD) > MAX_WORD - MIN_WORD ? \ + (ltmp > 0 ? MAX_WORD : MIN_WORD) : ltmp); \ + }) + +#define GSM_SUB(a, b) ({ \ + register longword ltmp; \ + ltmp = (longword) (a) - (longword) (b); \ + (ltmp >= MAX_WORD ? MAX_WORD : ltmp <= MIN_WORD ? MIN_WORD : ltmp); \ + }) #endif |