spa: silence two -Wformat-nonliteral warnings

In one we can duplicate the spa_asprintf call without real drawbacks.

The second one can be split up without losing details. Note that there
is another one in backend-native.c where splitting it up will make the
code harder to understand. The warning for that one remains.
This commit is contained in:
Peter Hutterer 2021-09-06 15:13:05 +10:00
parent 6a18272fed
commit e55a5441b8
2 changed files with 8 additions and 6 deletions

View file

@ -408,13 +408,13 @@ static bool rfcomm_send_volume_cmd(struct spa_source *source, int id)
rfcomm->volumes[id].hw_volume = hw_volume;
if (id == SPA_BT_VOLUME_ID_TX)
format = "AT+VGM=%d";
format = "AT+VGM";
else if (id == SPA_BT_VOLUME_ID_RX)
format = "AT+VGS=%d";
format = "AT+VGS";
else
spa_assert_not_reached();
rfcomm_send_cmd(rfcomm, format, hw_volume);
rfcomm_send_cmd(rfcomm, "%s=%d", format, hw_volume);
return true;
}