public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Jakov Smolić" <jsmolic@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/bmake/, sys-devel/bmake/files/
Date: Wed, 27 Apr 2022 21:09:38 +0000 (UTC)	[thread overview]
Message-ID: <1651093768.32fd2d327a841841a0aa1440994fd072eb7973b1.jsmolic@gentoo> (raw)

commit:     32fd2d327a841841a0aa1440994fd072eb7973b1
Author:     Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 27 21:09:17 2022 +0000
Commit:     Jakov Smolić <jsmolic <AT> gentoo <DOT> 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ć <jsmolic <AT> 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);


             reply	other threads:[~2022-04-27 21:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-27 21:09 Jakov Smolić [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-03-23 14:44 [gentoo-commits] repo/gentoo:master commit in: sys-devel/bmake/, sys-devel/bmake/files/ David Seifert
2021-02-19 11:47 David Seifert
2021-02-19 11:29 David Seifert
2021-02-19 11:29 David Seifert
2021-01-24 19:24 David Seifert
2020-11-30 21:05 David Seifert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1651093768.32fd2d327a841841a0aa1440994fd072eb7973b1.jsmolic@gentoo \
    --to=jsmolic@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox