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

Fabian Greffrath fabian at greffrath.com
Mon Jul 25 12:50:31 UTC 2016


> 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.

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.

 - Fabian





More information about the pkg-multimedia-maintainers mailing list