From 5400f4e128b01339b4ae50d8ec52b2182ffa6974 Mon Sep 17 00:00:00 2001 From: Luca Bacci Date: Thu, 12 Oct 2023 10:14:06 +0200 Subject: [PATCH] glib/gmessages.c: Remove unused function Fixes the follwing warning on CLang: ../glib/glib/gmessages.c:433:1: warning: unused function 'dowrite' [-Wunused-function] dowrite (int fd, ^ --- glib/gmessages.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/glib/gmessages.c b/glib/gmessages.c index 79183d04f..d0d38c925 100644 --- a/glib/gmessages.c +++ b/glib/gmessages.c @@ -426,27 +426,6 @@ static gboolean win32_keep_fatal_message = FALSE; * called with huge strings, is it? */ static gchar fatal_msg_buf[1000] = "Unspecified fatal error encountered, aborting."; -static gchar *fatal_msg_ptr = fatal_msg_buf; - -#undef write -static inline int -dowrite (int fd, - const void *buf, - unsigned int len) -{ - if (win32_keep_fatal_message) - { - memcpy (fatal_msg_ptr, buf, len); - fatal_msg_ptr += len; - *fatal_msg_ptr = 0; - return len; - } - - write (fd, buf, len); - - return len; -} -#define write(fd, buf, len) dowrite(fd, buf, len) #endif