mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
Fix compilation with -Werror=float-conversion
Better make the conversions explicit so that we don't get any surprises. Fixes #4065
This commit is contained in:
parent
50870aac57
commit
1ae4374ccf
71 changed files with 286 additions and 284 deletions
|
|
@ -1206,7 +1206,7 @@ static unsigned devset_playback_priority(pa_idxset *devices, bool invert) {
|
|||
}
|
||||
|
||||
if (priority > 0 && invert)
|
||||
return 1.0 / priority;
|
||||
return (unsigned)(1.0 / priority);
|
||||
|
||||
return (unsigned) priority;
|
||||
}
|
||||
|
|
@ -1224,7 +1224,7 @@ static unsigned devset_capture_priority(pa_idxset *devices, bool invert) {
|
|||
}
|
||||
|
||||
if (priority > 0 && invert)
|
||||
return 1.0 / priority;
|
||||
return (unsigned)(1.0 / priority);
|
||||
|
||||
return (unsigned) priority;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue