mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-03-27 07:58:16 -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
|
|
@ -388,7 +388,7 @@ static int cmd_set_volume(struct data *data, const struct command *cmd, int argc
|
|||
return -EINVAL;
|
||||
}
|
||||
dev_id = atoi(argv[1]);
|
||||
vol = atof(argv[2]);
|
||||
vol = (float)atof(argv[2]);
|
||||
|
||||
if (dev_id >= card->n_devices)
|
||||
return -EINVAL;
|
||||
|
|
@ -418,12 +418,12 @@ static int adjust_volume(struct data *data, const struct command *cmd, int argc,
|
|||
|
||||
static int cmd_inc_volume(struct data *data, const struct command *cmd, int argc, char *argv[])
|
||||
{
|
||||
return adjust_volume(data, cmd, argc, argv, 0.2);
|
||||
return adjust_volume(data, cmd, argc, argv, 0.2f);
|
||||
}
|
||||
|
||||
static int cmd_dec_volume(struct data *data, const struct command *cmd, int argc, char *argv[])
|
||||
{
|
||||
return adjust_volume(data, cmd, argc, argv, -0.2);
|
||||
return adjust_volume(data, cmd, argc, argv, -0.2f);
|
||||
}
|
||||
|
||||
static int cmd_get_mute(struct data *data, const struct command *cmd, int argc, char *argv[])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue