From bf1f7dda7cea31dfdfd435dd6519ca694e15f93b Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Thu, 28 Jan 2016 19:32:31 +0100 Subject: [PATCH] Avoid warnings for printf usage without format --- cmdline/state.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmdline/state.c b/cmdline/state.c index 3e9b568d..6b56b5bb 100644 --- a/cmdline/state.c +++ b/cmdline/state.c @@ -4008,7 +4008,7 @@ static void state_progress_graph(struct snapraid_state* state, struct snapraid_i printf("\n"); printc(' ', 5 + pad + 1 + bar / 2 - strlen(legend) / 2); - printf(legend); + printf("%s", legend); printf("\n"); } @@ -4057,12 +4057,12 @@ static void state_progress_graph(struct snapraid_state* state, struct snapraid_i if (oldest == PROGRESS_MAX) { const char* legend = "wait time"; printc(' ', 5 + pad + 1 + bar / 2 - strlen(legend) / 2); - printf(legend); + printf("%s", legend); printf("\n"); } else { - const char* legend = "wait time (%d secs, lower is better)"; - printc(' ', 5 + pad + 1 + bar / 2 - strlen(legend) / 2); - printf(legend, PROGRESS_MAX); + const char* legend_d = "wait time (%d secs, lower is better)"; + printc(' ', 5 + pad + 1 + bar / 2 - strlen(legend_d) / 2); + printf(legend_d, PROGRESS_MAX); printf("\n"); } }