diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-03-20 18:22:20 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-03-20 19:16:01 -0400 |
commit | fd4a5ec6fa834eb299b8e0ba6ab3e348d00d61b6 (patch) | |
tree | 5328a03b3b3cb497d6a4a5bb23b6f5b164658379 /src/analyze/systemd-analyze.c | |
parent | d5a3f0eac7cd28ad28fb5239b0dca14c7ba11eeb (diff) |
systemd-analyze: do not format timestamp when not printing it
../src/analyze/systemd-analyze.c:530:88: warning: data argument not used by format string [-Wformat-extra-args]
...svg_text(false, u->ixt, y, u->time? "%s (%s)" : "%s", u->name, format_timespan(ts, sizeof(ts), u->time));
~~~~ ^
Diffstat (limited to 'src/analyze/systemd-analyze.c')
-rw-r--r-- | src/analyze/systemd-analyze.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/analyze/systemd-analyze.c b/src/analyze/systemd-analyze.c index 49484a83bc..01bf55eda5 100644 --- a/src/analyze/systemd-analyze.c +++ b/src/analyze/systemd-analyze.c @@ -518,6 +518,7 @@ static int analyze_plot(DBusConnection *bus) { for (u = times; u < times + n; u++) { char ts[FORMAT_TIMESPAN_MAX]; + bool b; if (!u->name) continue; @@ -526,10 +527,12 @@ static int analyze_plot(DBusConnection *bus) { svg_bar("active", u->aet, u->axt, y); svg_bar("deactivating", u->axt, u->iet, y); - if (u->ixt * SCALE_X > width * 2 / 3) - svg_text(false, u->ixt, y, u->time? "%s (%s)" : "%s", u->name, format_timespan(ts, sizeof(ts), u->time)); + b = u->ixt * SCALE_X > width * 2 / 3; + if (u->time) + svg_text(b, u->ixt, y, "%s (%s)", + u->name, format_timespan(ts, sizeof(ts), u->time)); else - svg_text(true, u->ixt, y, u->time? "%s (%s)" : "%s", u->name, format_timespan(ts, sizeof(ts), u->time)); + svg_text(b, u->ixt, y, "%s", u->name); y++; } svg("</g>\n\n"); |