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)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A063515808E for ; Wed, 27 Apr 2022 21:09:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C0C26E08AD; Wed, 27 Apr 2022 21:09:41 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 99764E08AD for ; Wed, 27 Apr 2022 21:09:41 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7549334150B for ; Wed, 27 Apr 2022 21:09:40 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E2D063BE for ; Wed, 27 Apr 2022 21:09:38 +0000 (UTC) From: "Jakov Smolić" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jakov Smolić" Message-ID: <1651093768.32fd2d327a841841a0aa1440994fd072eb7973b1.jsmolic@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/bmake/, sys-devel/bmake/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-devel/bmake/bmake-20220418.ebuild sys-devel/bmake/files/bmake-20220418-warnings.patch X-VCS-Directories: sys-devel/bmake/files/ sys-devel/bmake/ X-VCS-Committer: jsmolic X-VCS-Committer-Name: Jakov Smolić X-VCS-Revision: 32fd2d327a841841a0aa1440994fd072eb7973b1 X-VCS-Branch: master Date: Wed, 27 Apr 2022 21:09:38 +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: c9cb106f-c6bc-46af-988c-063397de774d X-Archives-Hash: 90a3efd59d64b8cd1f182cb2f7da1090 commit: 32fd2d327a841841a0aa1440994fd072eb7973b1 Author: Jakov Smolić gentoo org> AuthorDate: Wed Apr 27 21:09:17 2022 +0000 Commit: Jakov Smolić gentoo org> CommitDate: Wed Apr 27 21:09:28 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32fd2d32 sys-devel/bmake: Fix compilation warnings Closes: https://bugs.gentoo.org/841362 Signed-off-by: Jakov Smolić gentoo.org> sys-devel/bmake/bmake-20220418.ebuild | 5 ++- .../bmake/files/bmake-20220418-warnings.patch | 38 ++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/sys-devel/bmake/bmake-20220418.ebuild b/sys-devel/bmake/bmake-20220418.ebuild index 7b11aa7cebf4..5505e007c65a 100644 --- a/sys-devel/bmake/bmake-20220418.ebuild +++ b/sys-devel/bmake/bmake-20220418.ebuild @@ -17,7 +17,10 @@ SLOT="0" KEYWORDS="~amd64 ~ppc ~x86" # Skip failing test (sandbox and csh) -PATCHES=( "${FILESDIR}"/${PN}-20210206-tests.patch ) +PATCHES=( + "${FILESDIR}"/${PN}-20210206-tests.patch + "${FILESDIR}"/${PN}-20220418-warnings.patch +) src_prepare() { default diff --git a/sys-devel/bmake/files/bmake-20220418-warnings.patch b/sys-devel/bmake/files/bmake-20220418-warnings.patch new file mode 100644 index 000000000000..1fccb91e95a3 --- /dev/null +++ b/sys-devel/bmake/files/bmake-20220418-warnings.patch @@ -0,0 +1,38 @@ +# https://bugs.gentoo.org/841362 +# +# Fix -Wimplicit-function-declaration and -Wunused-result warnings +# +# meta.c: In function ‘meta_name’: +# meta.c:262:21: warning: implicit declaration of function ‘strlcpy’; did you mean ‘strncpy’? [-Wimplicit-function-declaration] +# 262 | strlcpy(rp, tname_base, sizeof buf - (size_t)(rp - buf)); +# | ^~~~~~~ +# | strncpy +# +# meta.c: In function ‘meta_job_error’: +# meta.c:774:5: warning: ignoring return value of ‘getcwd’ declared with attribute ‘warn_unused_result’ [-Wunused-result] +# 774 | getcwd(cwd, sizeof cwd); +# | ^~~~~~~~~~~~~~~~~~~~~~~ + +--- a/meta.c ++++ b/meta.c +@@ -106,6 +106,10 @@ + char * stresep(char **, const char *, int); + #endif + ++#if !defined(HAVE_STRLCPY) ++size_t strlcpy(char *, const char *, size_t); ++#endif ++ + /* + * Filemon is a kernel module which snoops certain syscalls. + * +@@ -769,7 +773,8 @@ + } + if (gn != NULL) + Global_Set(".ERROR_TARGET", GNode_Path(gn)); +- getcwd(cwd, sizeof cwd); ++ if (getcwd(cwd, sizeof cwd) == NULL) ++ err(1, "Could not get current working directory"); + Global_Set(".ERROR_CWD", cwd); + if (pbm->meta_fname[0] != '\0') { + Global_Set(".ERROR_META_FILE", pbm->meta_fname);