test/libmallocintercept.c: fix write function unused return value

We should ignore the return value for logging function, to fix a new gcc ftbfs
libmallocintercept.c: In function ‘print_msg’:
libmallocintercept.c:27:9: error: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result]
   27 |         write(0, msg, strlen(msg));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
Gianfranco Costamagna
2025-01-22 12:22:37 +01:00
parent ba9ed5b289
commit 0516055224

View File

@@ -24,7 +24,9 @@
#include <unistd.h>
static void print_msg(const char *msg) {
write(0, msg, strlen(msg));
size_t out;
out = write(0, msg, strlen(msg));
(void) out; /* unused */
}
static void* actual_malloc(size_t size) {