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,
  ^
This commit is contained in:
Luca Bacci 2023-10-12 10:14:06 +02:00
parent f075db637a
commit 5400f4e128

View File

@ -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