public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* Testing build failure with latest GCC
@ 2017-05-25 16:50 Steve Ellcey
  2017-05-25 16:56 ` Florian Weimer
  0 siblings, 1 reply; 5+ messages in thread
From: Steve Ellcey @ 2017-05-25 16:50 UTC (permalink / raw)
  To: libc-alpha

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-05-29 14:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-25 16:50 Testing build failure with latest GCC Steve Ellcey
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

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).