Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Commit 5ca6d6a

Browse files
author
Gustavo Lima Chaves
committed
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 <[email protected]>
1 parent 2cb5f50 commit 5ca6d6a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/modules/flow/form/form.c

+2
Original file line numberDiff line numberDiff line change
@@ -1140,11 +1140,13 @@ integer_custom_open(struct sol_flow_node *node,
11401140
mdata->blink_on = true;
11411141

11421142
/* outputs truncated on purpose -- only the return value matters */
1143+
#pragma GCC diagnostic ignored "-Wformat-truncation"
11431144
n_max = snprintf(sbuf, 1, "%+" PRId32 "", mdata->base.state.max);
11441145
SOL_INT_CHECK_GOTO(n_max, < 0, err);
11451146

11461147
n_min = snprintf(sbuf, 1, "%+" PRId32 "", mdata->base.state.min);
11471148
SOL_INT_CHECK_GOTO(n_min, < 0, err);
1149+
#pragma GCC diagnostic pop
11481150

11491151
/* -1 to take away sign */
11501152
mdata->n_digits = sol_util_max(n_min, n_max) - 1;

0 commit comments

Comments
 (0)