Dagobert Michelsen wrote: >> In case you'd like to test, here's a copy of the latest: >> >> http://meyering.net/grep/tmp/grep-2.6.7-64540.tar.xz > > This works, I get an almost-clean compile with the following warnings:
Thanks for testing that. >> CC main.o >> "main.c", line 1628: warning: argument #2 is incompatible with >> prototype: >> prototype: pointer to pointer to char : "../lib/getopt.h", >> line 241 >> argument : pointer to const pointer to char >> AR libgrep.a >> CC grep.o >> "grep.c", line 10: warning: void function cannot return value >> "grep.c", line 16: warning: void function cannot return value >> "grep.c", line 22: warning: void function cannot return value >> "egrep.c", line 7: warning: void function cannot return value These are easily addressed. Patch below. > I used -features=extensions as suggested in > <http://savannah.gnu.org/bugs/?24813> > > However, the test char-class-multibyte is failing: ... >> FAIL: char-class-multibyte (exit: 1) >> ==================================== >> >> out1-none exp1 differ: char 2, line 1 >> out2-none exp2 differ: char 2, line 1 You can help the test suite produce more/better information if you install gnu diff and rerun "make check". When a diff program is available that supports "-u", it uses that rather than "cmp", which prints what you see above. >> SKIP: euc-mb (exit: 77) >> ======================= >> >> ???? >> euc-mb: skipped test: EUC-JP locale seems not to work >> >> SKIP: fmbtest.sh (exit: 77) >> =========================== > > Is this a problem with the testsuite or a real problem? I doubt it's a testsuite problem, but that is a possibility. It may be due to a bug in grep, or in gnulib's emulation of some missing-in-solaris-8 function, or a bug in Solaris 8. Hard to tell without a debugger. Solaris 8 is old enough that it may well be a problem with their locale support. >From 480565bcb5a7ad7bc9b32cc8d53d1d2413f06cfb Mon Sep 17 00:00:00 2001 From: Jim Meyering <[email protected]> Date: Thu, 25 Mar 2010 11:36:50 +0100 Subject: [PATCH] build: avoid warnings about unnecessary use of "return" * src/grep.c (Gcompile, Ecompile, Acompile): Do not use "return X", not even when X is a function returning void, in a function returning void. This avoids warnings from Sun Studio 11, reported by Dagobert Michelsen. * src/egrep.c (Ecompile): Likewise. --- src/egrep.c | 2 +- src/grep.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/egrep.c b/src/egrep.c index 80595fe..f6a1d59 100644 --- a/src/egrep.c +++ b/src/egrep.c @@ -4,7 +4,7 @@ static void Ecompile (char const *pattern, size_t size) { - return GEAcompile (pattern, size, RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES); + GEAcompile (pattern, size, RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES); } struct matcher const matchers[] = { diff --git a/src/grep.c b/src/grep.c index 8ef4968..1a4166c 100644 --- a/src/grep.c +++ b/src/grep.c @@ -4,22 +4,22 @@ static void Gcompile (char const *pattern, size_t size) { - return GEAcompile (pattern, size, - RE_SYNTAX_GREP - | RE_HAT_LISTS_NOT_NEWLINE - | RE_NO_EMPTY_RANGES); + GEAcompile (pattern, size, + RE_SYNTAX_GREP + | RE_HAT_LISTS_NOT_NEWLINE + | RE_NO_EMPTY_RANGES); } static void Ecompile (char const *pattern, size_t size) { - return GEAcompile (pattern, size, RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES); + GEAcompile (pattern, size, RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES); } static void Acompile (char const *pattern, size_t size) { - return GEAcompile (pattern, size, RE_SYNTAX_AWK); + GEAcompile (pattern, size, RE_SYNTAX_AWK); } struct matcher const matchers[] = { -- 1.7.0.3.435.g097f4
