[SCM] giada/master: Add patch to build with gcc6 (Closes: ##831183).

Jaromír Mikeš mira.mikes at gmail.com
Mon Jul 25 13:56:51 UTC 2016


2016-07-25 14:50 GMT+02:00 Fabian Greffrath <fabian at greffrath.com>:
>> src/glue/glue.cpp:727:57: error: format '%f' expects argument of type
>> 'double', but argument 3 has type 'int' [-Werror=format=]
>>    sprintf(buf, "%f R", abs((ch->panLeft * 100.0f) - 100));
>
> Hm, it seems that GCC5 is right and abs() returns and int. If you want a
> float value returned, use fabs() in your patch. That should satify both
> compilers. Make sure to include <math.h> then, though.

This works!

> http://www.gnu.org/software/libc/manual/html_node/Absolute-Value.html
>
> However, it is still questionable if the string representation of the
> [f]abs() value in float notation fits into a char buffer of size 8.

I will pass this question to upstream.

thank you

mira



More information about the pkg-multimedia-maintainers mailing list