summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-08-09 10:15:48 +0200
committerAndrew Bartlett <abartlet@samba.org>2013-08-12 17:25:43 +1200
commita560d1d485b0958e2ad49e5dcc50692f474ef757 (patch)
treef58310621151a64043d00a3c77da3a8901e63d5e /source3/libsmb
parent82e969b3c77fa62561c3ecbae2e3d0183e94b3e4 (diff)
downloadsamba-a560d1d485b0958e2ad49e5dcc50692f474ef757.tar.gz
samba-a560d1d485b0958e2ad49e5dcc50692f474ef757.tar.bz2
samba-a560d1d485b0958e2ad49e5dcc50692f474ef757.zip
s3:pylibsmb: remove compiler warnings
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/pylibsmb.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/libsmb/pylibsmb.c b/source3/libsmb/pylibsmb.c
index ae0d6943d0..533df67ebb 100644
--- a/source3/libsmb/pylibsmb.c
+++ b/source3/libsmb/pylibsmb.c
@@ -51,19 +51,20 @@ static PyTypeObject *get_pytype(const char *module, const char *type)
}
/*
- * We're using "const char **" for keywords,
+ * We're using "const char * const *" for keywords,
* PyArg_ParseTupleAndKeywords expects a "char **". Confine the
* inevitable warnings to just one place.
*/
static int ParseTupleAndKeywords(PyObject *args, PyObject *kw,
- const char *format, const char **keywords,
+ const char *format, const char * const *keywords,
...)
{
+ char **_keywords = discard_const_p(char *, keywords);
va_list a;
int ret;
va_start(a, keywords);
ret = PyArg_VaParseTupleAndKeywords(args, kw, format,
- (char **)keywords, a);
+ _keywords, a);
va_end(a);
return ret;
}
@@ -448,7 +449,7 @@ static int py_cli_state_init(struct py_cli_state *self, PyObject *args,
cli_credentials_get_password(cli_creds),
0, 0);
if (!py_tevent_req_wait_exc(self->ev, req)) {
- return NULL;
+ return -1;
}
status = cli_full_connection_recv(req, &self->cli);
TALLOC_FREE(req);