Testing build failure with latest GCC
Steve Ellcey
sellcey@cavium.com
Thu May 25 16:50:00 GMT 2017
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
More information about the Libc-alpha
mailing list