This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Testing build failure with latest GCC


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]