From 242b68ceddb217a42547d578898be841dca2f4a3 Mon Sep 17 00:00:00 2001 From: rbuj Date: Thu, 27 Feb 2020 22:38:43 +0100 Subject: Remove warnings: cast between incompatible function types --- src/gs-auth-pam.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/gs-auth-pam.c') diff --git a/src/gs-auth-pam.c b/src/gs-auth-pam.c index 3ca3e42..ae9cea0 100644 --- a/src/gs-auth-pam.c +++ b/src/gs-auth-pam.c @@ -509,9 +509,10 @@ set_pam_error (GError **error, } -static int -gs_auth_thread_func (int auth_operation_fd) +static gpointer +gs_auth_thread_func (gpointer data) { + int auth_operation_fd; static const int flags = 0; int status; int status2; @@ -519,6 +520,8 @@ gs_auth_thread_func (int auth_operation_fd) sigset_t set; const void *p; + auth_operation_fd = GPOINTER_TO_INT (data); + timeout.tv_sec = 0; timeout.tv_nsec = 1; @@ -602,7 +605,7 @@ done: */ close (auth_operation_fd); - return status; + return GINT_TO_POINTER (status); } static gboolean @@ -664,7 +667,7 @@ gs_auth_pam_verify_user (pam_handle_t *handle, (GIOFunc) gs_auth_loop_quit, &thread_done); auth_thread = g_thread_new ("auththread", - (GThreadFunc) gs_auth_thread_func, + gs_auth_thread_func, GINT_TO_POINTER (auth_operation_fds[1])); if (auth_thread == NULL) -- cgit v1.2.1