From 7fa6f3c6ee7f9f62e09466d9f6e981c004bfbe61 Mon Sep 17 00:00:00 2001
From: Maxim Menshikov <maxim.menshikov@iopsys.eu>
Date: Tue, 26 Jul 2022 15:42:42 +0300
Subject: [PATCH] qosmngr: enable extended diagnostics

---
 Makefile          | 4 +++-
 Makefile.diag.inc | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)
 create mode 100644 Makefile.diag.inc

diff --git a/Makefile b/Makefile
index 60fa796..2a59058 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,8 @@
 # Makefile for qosmngr
 include common.mk
 
+-include Makefile.diag.inc
+
 QOSMNGR_LIB=libqosmngr.so
 
 GCOV=gcov
@@ -11,7 +13,7 @@ PROG = $(PROJECT_TOPLEVEL)/qosmngr
 SHARED_LIB = $(PROJECT_TOPLEVEL)/libqosmngr.so
 OBJS = $(addprefix $(SRC_DIR)/, main.o qosmngr.o )
 
-PROG_CFLAGS = $(CFLAGS) -I$(INCLUDE_DIR) -Wall -fstrict-aliasing
+PROG_CFLAGS = $(CFLAGS) -I$(INCLUDE_DIR) $(DIAG_CFLAGS) -Werror -fstrict-aliasing
 PROG_LDFLAGS = $(LDFLAGS)
 PROG_LIBS = $(COMMON_LDFLAGS) -lgcov
 
diff --git a/Makefile.diag.inc b/Makefile.diag.inc
new file mode 100644
index 0000000..7729cbb
--- /dev/null
+++ b/Makefile.diag.inc
@@ -0,0 +1 @@
+DIAG_CFLAGS = -Wall -Wshadow -Wdouble-promotion -Wformat=2 -Wundef -fno-common -Wconversion -Wstrict-prototypes -Wno-declaration-after-statement
-- 
GitLab