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:
Wim Taymans 2024-06-18 12:17:56 +02:00
parent 50870aac57
commit 1ae4374ccf
71 changed files with 286 additions and 284 deletions

View file

@ -279,7 +279,7 @@ static void put_double(struct data *d, const char *key, double val)
{
char buf[128];
put_fmt(d, key, "%s%s%s", NUMBER,
spa_json_format_float(buf, sizeof(buf), val), NORMAL);
spa_json_format_float(buf, sizeof(buf), (float)val), NORMAL);
}
static void put_value(struct data *d, const char *key, const char *val)