From b39bdfbf6e88352ebf14b4c46162dfdb7375881a Mon Sep 17 00:00:00 2001 From: Marc Hartmayer Date: Mon, 7 Mar 2022 11:11:03 +0000 Subject: [PATCH] common.mak: W=1: add multiple compiler warning options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add multiple compiler warning options if `W=1` is set. Signed-off-by: Marc Hartmayer Acked-by: Jan Höppner Signed-off-by: Jan Höppner --- common.mak | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/common.mak b/common.mak index af600e0b..79f12a8d 100644 --- a/common.mak +++ b/common.mak @@ -91,10 +91,9 @@ ifneq ("${V}","1") else echocmd= endif +DEFAULT_CFLAGS = -g -rdynamic -fstack-protector-all -W -Wall -Wformat-security ifeq ("${W}","1") - DEFAULT_CFLAGS = -g -rdynamic -fstack-protector-all -W -Wall -Wformat-security -Wextra -else - DEFAULT_CFLAGS = -g -rdynamic -fstack-protector-all -W -Wall -Wformat-security + DEFAULT_CFLAGS += -Wextra -Wshadow -Wundef -Wuninitialized -Wdouble-promotion -Wconversion endif ifeq ("${D}","1") DEFAULT_CFLAGS += -Og