From: Lidong Chen via Grub-devel <grub-devel@gnu.org>
To: grub-devel@gnu.org, daniel.kiper@oracle.com
Cc: Lidong Chen <lidong.chen@oracle.com>
Subject: [PATCH 1/2] gnulib: Bring back the fix for resolving unused variable
Date: Wed, 18 Jun 2025 19:12:15 +0000 [thread overview]
Message-ID: <20250618191215.735283-1-lidong.chen@oracle.com> (raw)
This patch resolved a minor issue spotted by Coverity:
a983d36bd917 gnulib/regexec: Resolve unused variable
But, it was removed by the gnulib update:
2b7902459803 Update gnulib version and drop most gnulib patches
It caused Coverity to continue to flag the issue. Daniel Kiper
sugguested to bring back the patch (sha-a983d36bd917).
Signed-off-by: Lidong Chen <lidong.chen@oracle.com>
---
bootstrap.conf | 3 ++-
| 1 +
.../lib/gnulib-patches/fix-unused-value.patch | 14 ++++++++++++++
3 files changed, 17 insertions(+), 1 deletion(-)
create mode 100644 grub-core/lib/gnulib-patches/fix-unused-value.patch
diff --git a/bootstrap.conf b/bootstrap.conf
index 7cd375ba9..7ec868740 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -86,7 +86,8 @@ bootstrap_post_import_hook () {
# add new patches here.
for patchname in fix-width \
fix-regcomp-resource-leak \
- fix-regexec-resource-leak; do
+ fix-regexec-resource-leak \
+ fix-unused-value; do
patch -d grub-core/lib/gnulib -p2 \
< "grub-core/lib/gnulib-patches/$patchname.patch"
done
--git a/conf/Makefile.extra-dist b/conf/Makefile.extra-dist
index f59b8d8b3..902162212 100644
--- a/conf/Makefile.extra-dist
+++ b/conf/Makefile.extra-dist
@@ -31,6 +31,7 @@ EXTRA_DIST += grub-core/genemuinitheader.sh
EXTRA_DIST += grub-core/lib/gnulib-patches/fix-width.patch
EXTRA_DIST += grub-core/lib/gnulib-patches/fix-regcomp-resource-leak.patch
EXTRA_DIST += grub-core/lib/gnulib-patches/fix-regexec-resource-leak.patch
+EXTRA_DIST += grub-core/lib/gnulib-patches/fix-unused-value.patch
EXTRA_DIST += grub-core/lib/libgcrypt
EXTRA_DIST += grub-core/lib/libgcrypt-grub/mpi/generic
diff --git a/grub-core/lib/gnulib-patches/fix-unused-value.patch b/grub-core/lib/gnulib-patches/fix-unused-value.patch
new file mode 100644
index 000000000..ba51f1bf2
--- /dev/null
+++ b/grub-core/lib/gnulib-patches/fix-unused-value.patch
@@ -0,0 +1,14 @@
+--- a/lib/regexec.c 2020-10-21 14:25:35.310195912 +0000
++++ b/lib/regexec.c 2020-10-21 14:32:07.961765604 +0000
+@@ -828,7 +828,11 @@
+ break;
+ if (__glibc_unlikely (err != REG_NOMATCH))
+ goto free_return;
++#ifdef DEBUG
++ /* Only used for assertion below when DEBUG is set, otherwise
++ it will be over-written when we loop around. */
+ match_last = -1;
++#endif
+ }
+ else
+ break; /* We found a match. */
--
2.43.5
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
next reply other threads:[~2025-06-18 19:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-18 19:12 Lidong Chen via Grub-devel [this message]
2025-06-23 17:15 ` [PATCH 1/2] gnulib: Bring back the fix for resolving unused variable Daniel Kiper via Grub-devel
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=20250618191215.735283-1-lidong.chen@oracle.com \
--to=grub-devel@gnu.org \
--cc=daniel.kiper@oracle.com \
--cc=lidong.chen@oracle.com \
/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;
as well as URLs for NNTP newsgroup(s).