[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: the release of grep-2.9 is imminent
From: |
Jim Meyering |
Subject: |
Re: the release of grep-2.9 is imminent |
Date: |
Tue, 21 Jun 2011 18:12:37 +0200 |
Eric Blake wrote:
> On 06/17/2011 06:45 AM, Jim Meyering wrote:
>> I'm prepared to release grep-2.9.
>> There have been more than enough fixes since 2.8:
>> (from NEWS):
>
> When configured without pcre support, I see:
>
> cc1: warnings being treated as errors
> pcresearch.c: In function 'Pexecute':
> pcresearch.c:105:1: error: function might be possible candidate for
> attribute 'noreturn' [-Wmissing-noreturn]
>
> Of course, this is not fatal to the release (configuring with
> --enable-gcc-warnings is optional), but it might be nice to add the
> attribute to silence the warning.
Thanks.
This addressed it:
>From 27a937279e946ee97fd2fc4d26dabef3451f7c45 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Tue, 21 Jun 2011 18:12:04 +0200
Subject: [PATCH] build: avoid a warning when building with
--disable-perl-regexp...
and --enable-gcc-warnings.
* src/pcresearch.c (WITHOUT_PCRE_NORETURN): Define.
Remove the unreachable return statement.
Reported by Eric Blake.
---
src/pcresearch.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/pcresearch.c b/src/pcresearch.c
index e8c7f4b..f8581e0 100644
--- a/src/pcresearch.c
+++ b/src/pcresearch.c
@@ -101,13 +101,19 @@ Pcompile (char const *pattern, size_t size)
#endif
}
-size_t
+/* Pexecute is a no-return function when building --without-pcre. */
+#if !HAVE_LIBPCRE
+# define WITHOUT_PCRE_NORETURN _GL_ATTRIBUTE_NORETURN
+#else
+# define WITHOUT_PCRE_NORETURN /* empty */
+#endif
+
+size_t WITHOUT_PCRE_NORETURN
Pexecute (char const *buf, size_t size, size_t *match_size,
char const *start_ptr)
{
#if !HAVE_LIBPCRE
abort ();
- return -1;
#else
/* This array must have at least two elements; everything after that
is just for performance improvement in pcre_exec. */
--
1.7.6.rc2.295.gb63f3
- Re: the release of grep-2.9 is imminent, (continued)
Re: the release of grep-2.9 is imminent, Eric Blake, 2011/06/21
Re: the release of grep-2.9 is imminent, Eric Blake, 2011/06/21
- Re: the release of grep-2.9 is imminent,
Jim Meyering <=