From 9222c4e00235dfe7914e9db0cc352da07e63d9f9 Mon Sep 17 00:00:00 2001 From: Martins Mozeiko Date: Sun, 15 Jul 2018 13:12:18 -0700 Subject: [PATCH] ignore warning with pragma in source code --- makefile | 2 +- pkg2zip.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/makefile b/makefile index 9058437..41e84a8 100644 --- a/makefile +++ b/makefile @@ -10,7 +10,7 @@ SRC=${wildcard pkg2zip*.c} miniz_tdef.c puff.c OBJ=${SRC:.c=.o} DEP=${SRC:.c=.d} -CFLAGS=-std=c99 -pipe -fvisibility=hidden -Wall -Wextra -Werror -Wno-format-truncation -DNDEBUG -D_GNU_SOURCE -O2 +CFLAGS=-std=c99 -pipe -fvisibility=hidden -Wall -Wextra -Werror -DNDEBUG -D_GNU_SOURCE -O2 LDFLAGS=-s .PHONY: all clean diff --git a/pkg2zip.c b/pkg2zip.c index ccec8ac..8116f5f 100644 --- a/pkg2zip.c +++ b/pkg2zip.c @@ -11,6 +11,12 @@ #include #include +#ifdef __GNUC__ +#pragma GCC diagnostic ignored "-Wpragmas" +#pragma GCC diagnostic ignored "-Wunknown-warning-option" +#pragma GCC diagnostic ignored "-Wformat-truncation" +#endif + #define PKG_HEADER_SIZE 192 #define PKG_HEADER_EXT_SIZE 64