public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Steve Ellcey <sellcey@cavium.com>
To: libc-alpha <libc-alpha@sourceware.org>
Subject: Testing build failure with latest GCC
Date: Thu, 25 May 2017 16:50:00 -0000	[thread overview]
Message-ID: <1495731053.18342.13.camel@cavium.com> (raw)

I am building the top-of-tree glibc with top-of-tree gcc and getting
these messages when running 'make check'.  Should we explicitly ignore
the return value of fgets in these tests or check it and set 'failed'
if it is not the expected value?  Or do we think GCC is at fault?  It
seems like a legimate warning and we do compile with -Wall -Werror.

Steve Ellcey
sellcey@cavium.com

test-assert.c: In function ‘main’:
test-assert.c:75:3: error: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Werror=unused-result]
   fgets (buf, 160, stderr);
   ^
test-assert.c:79:3: error: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Werror=unused-result]
   fgets (buf, 160, stderr);
   ^
test-assert.c:83:3: error: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Werror=unused-result]
   fgets (buf, 160, stderr);
test-assert-perr.c: In function ‘main’:
test-assert-perr.c:73:3: error: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Werror=unused-result]
   fgets (buf, 160, stderr);
   ^
test-assert-perr.c:77:3: error: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Werror=unused-result]
   fgets (buf, 160, stderr);
   ^
test-assert-perr.c:81:3: error: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Werror=unused-result]
   fgets (buf, 160, stderr);
   ^
cc1: all warnings being treated as errors

             reply	other threads:[~2017-05-25 16:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-25 16:50 Steve Ellcey [this message]
2017-05-25 16:56 ` Florian Weimer
2017-05-25 17:05   ` Steve Ellcey
2017-05-29 14:27     ` Cyril Hrubis
2017-05-25 17:14   ` Steve Ellcey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1495731053.18342.13.camel@cavium.com \
    --to=sellcey@cavium.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).