summaryrefslogtreecommitdiff
path: root/src/gs-auth-pam.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-02-27 22:38:43 +0100
committerraveit65 <[email protected]>2020-03-13 16:43:30 +0100
commit242b68ceddb217a42547d578898be841dca2f4a3 (patch)
tree6e661efc8f713cf00400e7526b4c20c3659c2c81 /src/gs-auth-pam.c
parentec8db2297fc1d435d26de2006b429b1e6ffdc8a3 (diff)
downloadmate-screensaver-242b68ceddb217a42547d578898be841dca2f4a3.tar.bz2
mate-screensaver-242b68ceddb217a42547d578898be841dca2f4a3.tar.xz
Remove warnings: cast between incompatible function types
Diffstat (limited to 'src/gs-auth-pam.c')
-rw-r--r--src/gs-auth-pam.c11
1 files changed, 7 insertions, 4 deletions
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)