From 6b08659a690a8e9f50d5318ed72e072d0ddf8555 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 21 Apr 2022 11:50:47 +0200 Subject: [PATCH] disable -Wformat-truncation error --- thirdparty/libcsp/src/csp_iflist.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/thirdparty/libcsp/src/csp_iflist.c b/thirdparty/libcsp/src/csp_iflist.c index 2bfef422..b17dca44 100644 --- a/thirdparty/libcsp/src/csp_iflist.c +++ b/thirdparty/libcsp/src/csp_iflist.c @@ -77,7 +77,10 @@ static int csp_bytesize(char *buf, int len, unsigned long int n) { postfix = 'B'; } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-truncation" return snprintf(buf, len, "%.1f%c", size, postfix); +#pragma GCC diagnostic pop } void csp_iflist_print(void) {