1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-27 22:50:26 +03:00

nsswitch: avoid some compiler warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Stefan Metzmacher 2014-02-27 09:38:39 +01:00 committed by Jeremy Allison
parent e36de873e9
commit d5326bca33
3 changed files with 7 additions and 6 deletions

View File

@ -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:

View File

@ -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 */

View File

@ -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;