This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Fix warning in posix/bug-regex31.c
- From: Joseph Myers <joseph at codesourcery dot com>
- To: <libc-alpha at sourceware dot org>
- Date: Tue, 25 Nov 2014 17:53:38 +0000
- Subject: Fix warning in posix/bug-regex31.c
- Authentication-results: sourceware.org; auth=none
This patch fixes a "set but not used" warning in posix/bug-regex31.c.
A variable res stored an indication of whether the test behaved as
expected, but was then ignored and the test returned 0 unconditionally
(as an mtrace test, the auxiliary test for leaks could still have
failed if that bug was present). This patch makes the test return
res.
Tested for x86_64.
2014-11-25 Joseph Myers <joseph@codesourcery.com>
* posix/bug-regex31.c (main): Return RES not 0.
diff --git a/posix/bug-regex31.c b/posix/bug-regex31.c
index fc48581..fd7e0c5 100644
--- a/posix/bug-regex31.c
+++ b/posix/bug-regex31.c
@@ -33,5 +33,5 @@ main (void)
free (buf);
- return 0;
+ return res;
}
--
Joseph S. Myers
joseph@codesourcery.com