audio/mixeng build failure using Clang 10

Bug #1878627 reported by Philippe Mathieu-Daudé
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned

Bug Description

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;
                                   ^~~~~~~~ ~
  /usr/lib64/clang/10.0.0/include/limits.h:56:37: note: expanded from macro 'UINT_MAX'
  #define UINT_MAX (__INT_MAX__ *2U +1U)
                     ~~~~~~~~~~~~~~~~~^~~

Revision history for this message
Philippe Mathieu-Daudé (philmd) wrote :

Discussion about fixing:

https://<email address hidden>/msg699807.html

Revision history for this message
Philippe Mathieu-Daudé (philmd) wrote :

Patch posted:
https://<email address hidden>/msg706322.html

Changed in qemu:
status: New → In Progress
Revision history for this message
Philippe Mathieu-Daudé (philmd) wrote :

Merged in commit 9c61fcc89a70256c19047d251aa44f666f06089c.

Changed in qemu:
status: In Progress → Fix Committed
Thomas Huth (th-huth)
Changed in qemu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.