diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-02-27 09:38:39 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-11-14 23:27:05 +0100 |
commit | d5326bca33a7e64cd86f2a86a8b95591ed712a77 (patch) | |
tree | 62e9e85fb4d6a196c797c49295d03b9bc1d70a8a | |
parent | e36de873e9fff543aefa06ee046dabd3d9b03c72 (diff) | |
download | samba-d5326bca33a7e64cd86f2a86a8b95591ed712a77.tar.gz |
nsswitch: avoid some compiler warnings
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r-- | nsswitch/pam_winbind.c | 4 | ||||
-rw-r--r-- | nsswitch/wbinfo.c | 7 | ||||
-rw-r--r-- | 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<num_rids; i++) { @@ -2104,7 +2105,7 @@ enum { OPT_KRB5CCNAME }; -int main(int argc, char **argv, char **envp) +int main(int argc, const char **argv, char **envp) { int opt; TALLOC_CTX *frame = talloc_stackframe(); @@ -2219,7 +2220,7 @@ int main(int argc, char **argv, char **envp) /* Parse options */ - pc = poptGetContext("wbinfo", argc, (const char **)argv, + pc = poptGetContext("wbinfo", argc, argv, long_options, 0); /* Parse command line options */ diff --git a/nsswitch/winbind_nss_linux.c b/nsswitch/winbind_nss_linux.c index 70ede3edbd8..9afa9d42725 100644 --- a/nsswitch/winbind_nss_linux.c +++ b/nsswitch/winbind_nss_linux.c @@ -287,7 +287,7 @@ static NSS_STATUS fill_pwent(struct passwd *result, Return NSS_STATUS_TRYAGAIN if we run out of memory. */ static NSS_STATUS fill_grent(struct group *result, struct winbindd_gr *gr, - char *gr_mem, char **buffer, size_t *buflen) + const char *gr_mem, char **buffer, size_t *buflen) { char *name; int i; |