From 0c7a39d171f1c9d60de705be9a8b0c2cd8b695a2 Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Tue, 8 May 2007 01:26:28 +0000 Subject: [PATCH] Fixed compiler warning "dereferencing type-punned pointer will break strict-aliasing rules" --- pam_usb/src/pam.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pam_usb/src/pam.c b/pam_usb/src/pam.c index 534d0a9..ada4e3e 100644 --- a/pam_usb/src/pam.c +++ b/pam_usb/src/pam.c @@ -36,7 +36,8 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags, char *conf_file = PUSB_CONF_FILE; int retval; - retval = pam_get_item(pamh, PAM_SERVICE, (const void **)&service); + retval = pam_get_item(pamh, PAM_SERVICE, + (const void **)(const void *)&service); if (retval != PAM_SUCCESS) { log_error("Unable to retrieve the PAM service name.\n"); @@ -67,7 +68,8 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags, log_info("Authentication request for user \"%s\" (%s)\n", user, service); - if (pam_get_item(pamh, PAM_TTY, (const void **)&tty) == PAM_SUCCESS) + if (pam_get_item(pamh, PAM_TTY, + (const void **)(const void *)&tty) == PAM_SUCCESS) { if (tty && !strcmp(tty, "ssh")) {