Fix warning caused by unused-result in bug-atexit3-lib.cc
The test case dlfcn/bug-atexit3-lib.cc calls write and doesn't check the result. When building with GCC 6.2, this generates a warning in 'make check', which is treated as an error. This patch replaces the call to write with a call to write_message. Tested for powerpc64le.
This commit is contained in:
parent
f82a4bdb73
commit
1b16ff0b1e
|
@ -1,3 +1,9 @@
|
||||||
|
2016-10-28 Gabriel F. T. Gomes <gftg@linux.vnet.ibm.com>
|
||||||
|
|
||||||
|
* dlfcn/bug-atexit3-lib.cc (write_message): New function, copied
|
||||||
|
from test-skeleton.c.
|
||||||
|
(statclass): Replace calls to write with calls to write_message.
|
||||||
|
|
||||||
2016-10-28 Joseph Myers <joseph@codesourcery.com>
|
2016-10-28 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
* math/math.h
|
* math/math.h
|
||||||
|
|
|
@ -1,14 +1,22 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
static void
|
||||||
|
write_message (const char *message)
|
||||||
|
{
|
||||||
|
ssize_t unused __attribute__ ((unused));
|
||||||
|
unused = write (STDOUT_FILENO, message, strlen (message));
|
||||||
|
}
|
||||||
|
|
||||||
struct statclass
|
struct statclass
|
||||||
{
|
{
|
||||||
statclass()
|
statclass()
|
||||||
{
|
{
|
||||||
write (1, "statclass\n", 10);
|
write_message ("statclass\n");
|
||||||
}
|
}
|
||||||
~statclass()
|
~statclass()
|
||||||
{
|
{
|
||||||
write (1, "~statclass\n", 11);
|
write_message ("~statclass\n");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue