__attribute__ ((used)) means that the function has to be
emitted in assembly because it is referenced in ways the
compiler cannot detect (such as asm statements, or some
post-processing on the generated assembly).
The unused attribute needs to come first, otherwise it is
applied to the return type and not the function definition.
+2016-06-23 Florian Weimer <fweimer@redhat.com>
+
+ * test-skeleton.c (xmalloc, xcalloc, xrealloc): Mark as
+ potentially unused.
+
2016-06-22 Florian Weimer <fweimer@redhat.com>
* test-skeleton.c (write_message): New function.
}
/* Allocate N bytes of memory dynamically, with error checking. */
+__attribute__ ((unused))
static void *
-__attribute__ ((used))
xmalloc (size_t n)
{
void *p;
}
/* Allocate memory for N elements of S bytes, with error checking. */
+__attribute__ ((unused))
static void *
-__attribute__ ((used))
xcalloc (size_t n, size_t s)
{
void *p;
/* Change the size of an allocated block of memory P to N bytes,
with error checking. */
+__attribute__ ((unused))
static void *
-__attribute__ ((used))
xrealloc (void *p, size_t n)
{
p = realloc (p, n);