From d5326bca33a7e64cd86f2a86a8b95591ed712a77 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 27 Feb 2014 09:38:39 +0100 Subject: [PATCH] nsswitch: avoid some compiler warnings Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- nsswitch/pam_winbind.c | 4 ++-- nsswitch/wbinfo.c | 7 ++++--- nsswitch/winbind_nss_linux.c | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c index 564f773ee44..f06f2b5ba83 100644 --- a/nsswitch/pam_winbind.c +++ b/nsswitch/pam_winbind.c @@ -663,7 +663,7 @@ static int converse(const pam_handle_t *pamh, retval = pam_get_item(pamh, PAM_CONV, (const void **) &conv); if (retval == PAM_SUCCESS) { retval = conv->conv(nargs, - (const struct pam_message **)message, + discard_const_p(const struct pam_message *, message), response, conv->appdata_ptr); } @@ -1998,7 +1998,7 @@ static int winbind_chauthtok_request(struct pwb_context *ctx, } /* FIXME: avoid to send multiple PAM messages after another */ - switch (reject_reason) { + switch ((int)reject_reason) { case -1: break; case WBC_PWD_CHANGE_NO_ERROR: diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c index a31fbdf283f..9e06fb222e1 100644 --- a/nsswitch/wbinfo.c +++ b/nsswitch/wbinfo.c @@ -1329,13 +1329,14 @@ static bool wbinfo_lookuprids(const char *domain, const char *arg) } wbc_status = wbcLookupRids(&dinfo->sid, num_rids, rids, - (const char **)&domain_name, &names, &types); + &p, &names, &types); if (!WBC_ERROR_IS_OK(wbc_status)) { d_printf("winbind_lookup_rids failed: %s\n", wbcErrorString(wbc_status)); goto done; } + domain_name = discard_const_p(char, p); d_printf("Domain: %s\n", domain_name); for (i=0; i