From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4D925158020 for ; Thu, 27 Oct 2022 23:37:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5EEC9E0825; Thu, 27 Oct 2022 23:37:49 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 45AC2E0825 for ; Thu, 27 Oct 2022 23:37:49 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 46513340DBB for ; Thu, 27 Oct 2022 23:37:48 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7741761D for ; Thu, 27 Oct 2022 23:37:46 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1666913862.ebea8fa53bdd871deb841463f5fbd4f427b6ef3c.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/install-qa-check.d/ X-VCS-Repository: proj/portage X-VCS-Files: bin/install-qa-check.d/90gcc-warnings X-VCS-Directories: bin/install-qa-check.d/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: ebea8fa53bdd871deb841463f5fbd4f427b6ef3c X-VCS-Branch: master Date: Thu, 27 Oct 2022 23:37:46 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 0a45c2c2-03b9-446d-a1b6-55c41a31ac1a X-Archives-Hash: 303250f395f8fe77863dc3e4ee74f573 commit: ebea8fa53bdd871deb841463f5fbd4f427b6ef3c Author: Sam James gentoo org> AuthorDate: Thu Oct 27 23:37:42 2022 +0000 Commit: Sam James gentoo org> CommitDate: Thu Oct 27 23:37:42 2022 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=ebea8fa5 install-qa-check.d/90gcc-warnings: add -Wreturn-type Clang in particular optimises very aggressively based on this (if there's a missing return at the end, it'll end up performing mental gymnastics to deduce some other earlier case is taken). Signed-off-by: Sam James gentoo.org> bin/install-qa-check.d/90gcc-warnings | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/install-qa-check.d/90gcc-warnings b/bin/install-qa-check.d/90gcc-warnings index 662d2fd3a..7a506d357 100644 --- a/bin/install-qa-check.d/90gcc-warnings +++ b/bin/install-qa-check.d/90gcc-warnings @@ -56,6 +56,9 @@ gcc_warn_check() { 'warning: .*matching.*\[-Wformat=\]' # function returns address of local variable 'warning: .*\[-Wreturn-local-addr\]' + # missing return at end of function, or non-void return in a void function + # (clang at least aggressively optimises on this) + 'warning: .*\[-Wreturn-type\]' # argument to sizeof ... is the same expression as the source 'warning: .*\[-Wsizeof-pointer-memaccess\]' # iteration invokes undefined behavior