From 5ca6d6a70bead00caf154b445755be94f3f68099 Mon Sep 17 00:00:00 2001 From: Gustavo Lima Chaves Date: Mon, 9 Jul 2018 22:41:14 -0700 Subject: [PATCH] flow/form: add missing warning ignoring pragma section This will help clean warnings on our build. Those truncations are intentional, as commented before. Signed-off-by: Gustavo Lima Chaves --- src/modules/flow/form/form.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/flow/form/form.c b/src/modules/flow/form/form.c index 93cf75c4e..0190dd660 100644 --- a/src/modules/flow/form/form.c +++ b/src/modules/flow/form/form.c @@ -1140,11 +1140,13 @@ integer_custom_open(struct sol_flow_node *node, mdata->blink_on = true; /* outputs truncated on purpose -- only the return value matters */ +#pragma GCC diagnostic ignored "-Wformat-truncation" n_max = snprintf(sbuf, 1, "%+" PRId32 "", mdata->base.state.max); SOL_INT_CHECK_GOTO(n_max, < 0, err); n_min = snprintf(sbuf, 1, "%+" PRId32 "", mdata->base.state.min); SOL_INT_CHECK_GOTO(n_min, < 0, err); +#pragma GCC diagnostic pop /* -1 to take away sign */ mdata->n_digits = sol_util_max(n_min, n_max) - 1;