Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Fri, 14 Dec 2012 13:49:57 +0400
From: ojab <ojab@...b.ru>
To: musl@...ts.openwall.com
Subject: spandsp build, lrint/sqrt/pow issue

Hi list,

spandsp library (which is used in FreeSWITCH/Asterisk/Yate/many 
commercial solutions/etc) build fails with (first error):

> In file included from awgn.c:59:0:
> spandsp/saturated.h: In function 'fsaturate':
> spandsp/saturated.h:184:22: warning: cast to pointer from integer of different size
> spandsp/saturated.h:184:22: warning: cast to pointer from integer of different size
> spandsp/saturated.h:184:5: error: invalid use of void expression

line 184 is return statement in
> static __inline__ int16_t fsaturate(double damp)
> {
>     if (damp > (double) INT16_MAX)
>         return INT16_MAX;
>     if (damp < (double) INT16_MIN)
>         return INT16_MIN;
>     return (int16_t) lrint(damp);
> }

awgn.i can be found in the attached file. The same errors happens with 
pow() and sqrt() functions.

Unfortunately my knowledge is insufficient to debug further (because I 
don't quite understand how lrint() can unfold to that), please assist.

I'm using sabotage-0.9.7 x86_64 image with musl updated to 0.9.8 (you 
can download it http://ojab.ru/sabotage-0.9.7-x86_64_spandsp.img.xz and 
`cd ~/spandsp && make`), please drop me a private mail if the ssh access 
to qemu instance is needed.

//wbr ojab



View attachment "awgn.i" of type "text/plain" (62900 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.