diff options
author | Timotej S <6674623+underhood@users.noreply.github.com> | 2020-07-16 11:56:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-16 11:56:20 +0200 |
commit | ee1eb0f9c510a9bea853d84e7ff6d9caa4a097b5 (patch) | |
tree | 3f029bc361882dbd66a6d63fa4a90f50d87da7cb /aclk/aclk_stats.c | |
parent | 9a0fa290d565a3ceae74d94c7121ba59ddd06620 (diff) |
Suppress warning -Wformat-truncation in ACLK (#9547)
* suppress some truncation warning in places we want truncation
Diffstat (limited to 'aclk/aclk_stats.c')
-rw-r--r-- | aclk/aclk_stats.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/aclk/aclk_stats.c b/aclk/aclk_stats.c index 59115b55d6..7cddbc2c48 100644 --- a/aclk/aclk_stats.c +++ b/aclk/aclk_stats.c @@ -167,7 +167,8 @@ static void aclk_stats_query_threads(uint32_t *queries_per_thread) "netdata", "stats", 200007, localhost->rrd_update_every, RRDSET_TYPE_STACKED); for (int i = 0; i < query_thread_count; i++) { - snprintf(dim_name, MAX_DIM_NAME, "Query %d", i); + if (snprintf(dim_name, MAX_DIM_NAME, "Query %d", i) < 0) + error("snprintf encoding error"); aclk_qt_data[i].dim = rrddim_add(st, dim_name, NULL, 1, localhost->rrd_update_every, RRD_ALGORITHM_ABSOLUTE); } } else |