commit 2d5fca2a39f97a2e6b0865ea9480ae0baa7e7b23
parent f9c2a443074f2c54f6fba1c54af6b53a8dc410aa
Author: Jonathan Boeing <jonathan@claws-mail.org>
Date: Fri, 5 Nov 2021 01:29:22 -0700
Fix -Wunused-function warnings for Windows
Diffstat:
4 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/src/common/socket.c b/src/common/socket.c
@@ -1428,6 +1428,7 @@ gint sock_write_all(SockInfo *sock, const gchar *buf, gint len)
return ret;
}
+#ifndef G_OS_WIN32
static gint fd_recv(gint fd, gchar *buf, gint len, gint flags)
{
if (fd_check_io(fd, G_IO_IN) < 0)
@@ -1435,6 +1436,7 @@ static gint fd_recv(gint fd, gchar *buf, gint len, gint flags)
return recv(fd, buf, len, flags);
}
+#endif
gint fd_gets(gint fd, gchar *buf, gint len)
{
diff --git a/src/common/utils.c b/src/common/utils.c
@@ -2695,6 +2695,7 @@ FILE *get_command_output_stream(const char* cmdline)
return fdopen(fd, "r");
}
+#ifndef G_OS_WIN32
static gint is_unchanged_uri_char(char c)
{
switch (c) {
@@ -2730,6 +2731,7 @@ static void encode_uri(gchar *encoded_uri, gint bufsize, const gchar *uri)
}
encoded_uri[k] = 0;
}
+#endif
gint open_uri(const gchar *uri, const gchar *cmdline)
{
diff --git a/src/main.c b/src/main.c
@@ -231,7 +231,9 @@ static void open_compose_new (const gchar *address,
static void send_queue (void);
static void initial_processing (FolderItem *item, gpointer data);
+#ifndef G_OS_WIN32
static void quit_signal_handler (int sig);
+#endif
static void install_basic_sighandlers (void);
#if (defined linux && defined SIGIO)
static void install_memory_sighandler (void);
@@ -725,13 +727,6 @@ static void win32_print_stdout(const gchar *string)
}
}
-static void win32_print_stderr(const gchar *string)
-{
- if (win32_debug_log) {
- win32_log_WriteFile(string);
- }
-}
-
GLogWriterOutput win32_log_writer(GLogLevelFlags log_level, const GLogField *fields, gsize n_fields, gpointer user_data)
{
gchar *formatted;
@@ -2932,12 +2927,14 @@ static void send_queue(void)
}
}
+#ifndef G_OS_WIN32
static void quit_signal_handler(int sig)
{
debug_print("Quitting on signal %d\n", sig);
g_timeout_add(0, clean_quit, NULL);
}
+#endif
static void install_basic_sighandlers()
{
diff --git a/src/procmime.c b/src/procmime.c
@@ -59,7 +59,9 @@
#define REG_MIME_TYPE_VALUE "Content Type"
#endif
+#ifndef G_OS_WIN32
static GHashTable *procmime_get_mime_type_table (void);
+#endif
static MimeInfo *procmime_scan_file_short(const gchar *filename);
static MimeInfo *procmime_scan_queue_file_short(const gchar *filename);
static MimeInfo *procmime_scan_queue_file_full(const gchar *filename, gboolean short_scan);
@@ -1152,6 +1154,7 @@ gchar *procmime_get_mime_type(const gchar *filename)
#endif
}
+#ifndef G_OS_WIN32
static guint procmime_str_hash(gconstpointer gptr)
{
guint hash_result = 0;
@@ -1208,6 +1211,7 @@ static GHashTable *procmime_get_mime_type_table(void)
return table;
}
+#endif
GList *procmime_get_mime_type_list(void)
{