summaryrefslogtreecommitdiff
path: root/src/grep.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-03-25 11:36:50 +0100
committerJim Meyering <meyering@redhat.com>2010-03-25 13:54:17 +0100
commita0e3040fd80528163565779a85a95b80469b7dfa (patch)
treeaf8b54c1d86cd9e8801cefaeec83b5f5798c0a76 /src/grep.c
parent8f08d8e282bf3d4917e94135e67ba17d738313ce (diff)
downloadgrep-a0e3040fd80528163565779a85a95b80469b7dfa.tar.gz
build: avoid warnings about unnecessary use of "return"
* src/grep.c (Gcompile, Ecompile, Acompile): Do not "return X" from a function returning void, not even when X itself is a function returning void. This avoids warnings from Sun Studio 11 reported by Dagobert Michelsen. * src/egrep.c (Ecompile): Likewise.
Diffstat (limited to 'src/grep.c')
-rw-r--r--src/grep.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/grep.c b/src/grep.c
index 8ef49683..1a4166c1 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[] = {