Re: [RFC PATCH 1/2] audio/mixeng: Fix Clang 'int-conversion' warning

2020-05-03 Thread Philippe Mathieu-Daudé
On 5/4/20 7:49 AM, Volker Rümelin wrote: Fix by using a 64-bit float for the conversion, before casting back to 32-bit float. Signed-off-by: Philippe Mathieu-Daudé --- audio/mixeng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/mixeng.c b/audio/mixeng.c index 7

Re: [RFC PATCH 1/2] audio/mixeng: Fix Clang 'int-conversion' warning

2020-05-03 Thread Volker Rümelin
> Fix by using a 64-bit float for the conversion, before casting > back to 32-bit float. > > Signed-off-by: Philippe Mathieu-Daudé > --- > audio/mixeng.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/audio/mixeng.c b/audio/mixeng.c > index 739a500449..9946bfeaec 10064

Re: [RFC PATCH 1/2] audio/mixeng: Fix Clang 'int-conversion' warning

2020-05-03 Thread Richard Henderson
On 5/3/20 4:32 AM, Philippe Mathieu-Daudé wrote: > When building with Clang 10 on Fedora 32, we get: > > CC audio/mixeng.o > audio/mixeng.c:274:34: error: implicit conversion from 'unsigned int' to > 'float' changes value from 4294967295 to 4294967296 > [-Werror,-Wimplicit-int-float-c

Re: [RFC PATCH 1/2] audio/mixeng: Fix Clang 'int-conversion' warning

2020-05-03 Thread BALATON Zoltan
On Sun, 3 May 2020, Philippe Mathieu-Daudé wrote: When building with Clang 10 on Fedora 32, we get: CC audio/mixeng.o audio/mixeng.c:274:34: error: implicit conversion from 'unsigned int' to 'float' changes value from 4294967295 to 4294967296 [-Werror,-Wimplicit-int-float-conversion]

[RFC PATCH 1/2] audio/mixeng: Fix Clang 'int-conversion' warning

2020-05-03 Thread Philippe Mathieu-Daudé
When building with Clang 10 on Fedora 32, we get: CC audio/mixeng.o audio/mixeng.c:274:34: error: implicit conversion from 'unsigned int' to 'float' changes value from 4294967295 to 4294967296 [-Werror,-Wimplicit-int-float-conversion] static const float float_scale = UINT_MAX / 2.f;