From 60b391e65e79c78fc67cf3354a324be30aac9300 Mon Sep 17 00:00:00 2001 From: Kim Holviala Date: Mon, 29 Jan 2018 12:15:15 +0200 Subject: [PATCH] Ignore useless snprintf() format truncation warnings on GCC 7+ --- gophernicus.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gophernicus.h b/gophernicus.h index 271e878..d987b09 100644 --- a/gophernicus.h +++ b/gophernicus.h @@ -26,6 +26,14 @@ #define _GOPHERNICUS_H +/* + * Ignore useless snprintf() format truncation warnings on GCC 7+ + */ +#if __GNUC__ >= 7 +#pragma GCC diagnostic ignored "-Wformat-truncation" +#endif + + /* * Features */