This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix warning in misc/tst-mntent2.c.
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Torvald Riegel <triegel at redhat dot com>
- Cc: GLIBC Devel <libc-alpha at sourceware dot org>
- Date: Mon, 15 Dec 2014 23:45:28 +0100
- Subject: Re: [PATCH] Fix warning in misc/tst-mntent2.c.
- Authentication-results: sourceware.org; auth=none
- References: <1418678844 dot 7165 dot 9 dot camel at triegel dot csb>
On Mon, Dec 15, 2014 at 10:27:24PM +0100, Torvald Riegel wrote:
> This fixes a -Werror failure with a recent GCC build by adding
> parentheses. OK?
>
ok
> 2014-12-15 Torvald Riegel <triegel@redhat.com>
>
> * misc/tst-mntent2.c (do_test): Fix warning.
>
> commit 8df1db0d06065f114b15345430c2bb8c90c01bf7
> Author: Torvald Riegel <triegel@redhat.com>
> Date: Mon Dec 15 22:11:56 2014 +0100
>
> Fix warning in misc/tst-mntent2.c.
>
> diff --git a/misc/tst-mntent2.c b/misc/tst-mntent2.c
> index e61d506..ba1ee0a 100644
> --- a/misc/tst-mntent2.c
> +++ b/misc/tst-mntent2.c
> @@ -17,7 +17,7 @@ do_test (void)
> mef.mnt_passno = 2;
>
> #define TEST(opt, found) \
> - if (!!hasmntopt (&mef, (opt)) != (found)) \
> + if ((!!hasmntopt (&mef, (opt))) != (found)) \
> { \
> printf ("Option %s was %sfound\n", (opt), (found) ? "not " : ""); \
> result = 1; \
--
SCSI's too wide.