diff options
author | Emmanuel Vasilakis <mrzammler@mm.st> | 2021-10-22 15:56:46 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-22 15:56:46 +0300 |
commit | 5377adb065af6d0e43973ff5f6b4344353dd1612 (patch) | |
tree | 63d19c7704d3019743478efde28208448dab85ce /web/api | |
parent | a97f06a6ebdcd4bf197cfb4249ed747a52ac9243 (diff) |
Fix warnings from -Wformat-truncation=2 (#11676)
* mark host as UNUSED
* use snprintfz instead of snprintf. removes warning: %s directive output between 0 and 4096 bytes may exceed minimum required size of 4095
* increase length to 22 to include full int length. stops warning %d directive output may be truncated writing between 1 and 11 bytes into a region of size 5
* increase buffers to stop warning %0.1f directive output may be truncated writing between 3 and 312 bytes into a region of size 100
* use sprintfz
Diffstat (limited to 'web/api')
-rw-r--r-- | web/api/web_api_v1.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/web/api/web_api_v1.c b/web/api/web_api_v1.c index 4822ca2cde..13fdfa7901 100644 --- a/web/api/web_api_v1.c +++ b/web/api/web_api_v1.c @@ -1109,6 +1109,7 @@ inline int web_client_api_request_v1_info(RRDHOST *host, struct web_client *w, c static int web_client_api_request_v1_aclk_state(RRDHOST *host, struct web_client *w, char *url) { UNUSED(url); + UNUSED(host); if (!netdata_ready) return HTTP_RESP_BACKEND_FETCH_FAILED; BUFFER *wb = w->response.data; |