From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Wed, 24 Mar 2021 13:26:06 +0100 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1lP2aM-0006Zo-Gu for lore@lore.pengutronix.de; Wed, 24 Mar 2021 13:26:06 +0100 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lP2aL-0007Vx-Ma for lore@pengutronix.de; Wed, 24 Mar 2021 13:26:06 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=yOG+V2U/qq31c2BqTc38CO7AA5dNTPS0sRcEvBnBVYs=; b=N5ndBaPL8Wn1rNJDgFiFZVYEi 8jQNdnRcmlXr+Uxicn2wnvI3QZ8WKB3CKXSrnV0+Hq3upwx3qN0h2XBtAJVoNzAO+PuO46/kAo+1l xvdrTm/jM8Eh4b+U9+XT/hxe2roCIoG8dsAH13YrEtScDERUb7KC5dK3vrASbzttsCgDLaRlBBs6L 6dT34bsMH15OYPJjcABN0uZORXhF8BNbvdUPekiuIb7qkzKK/NaTKxt7/8uET8CXxzY59NNZdM5dP vbM0rBQNM7NJ+NxIY3wAc7PTPsLhi1+G2URzqxx77z3YSovoMccBL8EA4YsckzMK9iKDWxmcV0DKJ S8QcKVNaA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lP2ZK-00H496-T3; Wed, 24 Mar 2021 12:25:03 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lP2XB-00H3El-La for barebox@lists.infradead.org; Wed, 24 Mar 2021 12:22:52 +0000 Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lP2XB-0006mr-93; Wed, 24 Mar 2021 13:22:49 +0100 Received: from afa by dude.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lP2XA-0002nN-Vy; Wed, 24 Mar 2021 13:22:49 +0100 From: Ahmad Fatoum To: barebox@lists.infradead.org Cc: bst@pengutronix.de, Ahmad Fatoum Date: Wed, 24 Mar 2021 13:22:46 +0100 Message-Id: <20210324122247.10683-3-a.fatoum@pengutronix.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210324122247.10683-1-a.fatoum@pengutronix.de> References: <20210324122247.10683-1-a.fatoum@pengutronix.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210324_122249_934180_04745562 X-CRM114-Status: UNSURE ( 9.26 ) X-CRM114-Notice: Please train this message. X-BeenThere: barebox@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" X-SA-Exim-Connect-IP: 2001:8b0:10b:1:d65d:64ff:fe57:4e05 X-SA-Exim-Mail-From: barebox-bounces+lore=pengutronix.de@lists.infradead.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.ext.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-3.3 required=4.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Subject: [PATCH 3/4] kbuild: add -Wtype-limits to compile flags X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on metis.ext.pengutronix.de) Not warning about e.g. comparisons of unsigned integers with 0 can introduce nasty bugs around error handling especially. Enable the warning to be able to identify these issues in future. Signed-off-by: Ahmad Fatoum --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 6d78d1f58eca..81ceedafeb0c 100644 --- a/Makefile +++ b/Makefile @@ -650,6 +650,9 @@ CHECKFLAGS += $(NOSTDINC_FLAGS) # warn about C99 declaration after statement KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) +# warn about e.g. (unsigned)x < 0 +KBUILD_CFLAGS += $(call cc-option,-Wtype-limits) + # disable pointer signed / unsigned warnings in gcc 4.0 KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,) -- 2.29.2 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox