fix printf format-security warning.

warning: format string is not a string literal (potentially insecure) [-Wformat-security]
This commit is contained in:
Robin Gareus 2015-01-27 14:04:19 +01:00
parent 302dc2bea3
commit bc7b5844a9

View file

@ -1195,7 +1195,7 @@ ARDOUR_UI::update_sample_rate (framecnt_t)
if (!AudioEngine::instance()->connected()) {
snprintf (buf, sizeof (buf), _("Audio: <span foreground=\"red\">none</span>"));
snprintf (buf, sizeof (buf), "%s", _("Audio: <span foreground=\"red\">none</span>"));
} else {
@ -1203,7 +1203,7 @@ ARDOUR_UI::update_sample_rate (framecnt_t)
if (rate == 0) {
/* no sample rate available */
snprintf (buf, sizeof (buf), _("Audio: <span foreground=\"red\">none</span>"));
snprintf (buf, sizeof (buf), "%s", _("Audio: <span foreground=\"red\">none</span>"));
} else {
if (fmod (rate, 1000.0) != 0.0) {