summaryrefslogtreecommitdiff
path: root/source4/client
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-02-12 12:09:25 +0100
committerGünther Deschner <gd@samba.org>2014-02-13 11:54:13 +0100
commit83bd478c9bfe7a8a2970531ea05af8cca0bd7ca3 (patch)
tree59000e73eb8dec3177215b192db5737e17e297e1 /source4/client
parent6f527c8706c8c08be50106ac5625e8efa18aa1a9 (diff)
downloadsamba-83bd478c9bfe7a8a2970531ea05af8cca0bd7ca3.tar.gz
s4:client: fix some compiler warnings
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
Diffstat (limited to 'source4/client')
-rw-r--r--source4/client/client.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/source4/client/client.c b/source4/client/client.c
index cd7967ebc53..2779824f2ab 100644
--- a/source4/client/client.c
+++ b/source4/client/client.c
@@ -1077,7 +1077,8 @@ show 8.3 name of a file
****************************************************************************/
static int cmd_altname(struct smbclient_context *ctx, const char **args)
{
- const char *altname;
+ const char *p;
+ char *altname;
char *name;
if (!args[1]) {
@@ -1087,11 +1088,12 @@ static int cmd_altname(struct smbclient_context *ctx, const char **args)
name = talloc_asprintf(ctx, "%s%s", ctx->remote_cur_dir, args[1]);
- if (!NT_STATUS_IS_OK(smbcli_qpathinfo_alt_name(ctx->cli->tree, name, &altname))) {
+ if (!NT_STATUS_IS_OK(smbcli_qpathinfo_alt_name(ctx->cli->tree, name, &p))) {
d_printf("%s getting alt name for %s\n",
smbcli_errstr(ctx->cli->tree),name);
return(false);
}
+ altname = discard_const_p(char, p);
d_printf("%s\n", altname);
SAFE_FREE(altname);
@@ -3081,16 +3083,17 @@ static void readline_callback(void)
static int process_line(struct smbclient_context *ctx, const char *cline)
{
- const char **args;
+ char **args;
int i;
/* and get the first part of the command */
- args = (const char **) str_list_make_shell(ctx, cline, NULL);
+ args = str_list_make_shell(ctx, cline, NULL);
if (!args || !args[0])
return 0;
if ((i = process_tok(args[0])) >= 0) {
- i = commands[i].fn(ctx, args);
+ const char **a = discard_const_p(const char *, args);
+ i = commands[i].fn(ctx, a);
} else if (i == -2) {
d_printf("%s: command abbreviation ambiguous\n",args[0]);
} else {
@@ -3254,7 +3257,7 @@ static int do_message_op(const char *netbios_name, const char *desthost,
/****************************************************************************
main program
****************************************************************************/
- int main(int argc,char *argv[])
+ int main(int argc, const char *argv[])
{
char *base_directory = NULL;
const char *dest_ip = NULL;
@@ -3302,7 +3305,7 @@ static int do_message_op(const char *netbios_name, const char *desthost,
ctx = talloc_zero(mem_ctx, struct smbclient_context);
ctx->io_bufsize = 64512;
- pc = poptGetContext("smbclient", argc, (const char **) argv, long_options, 0);
+ pc = poptGetContext("smbclient", argc, argv, long_options, 0);
poptSetOtherOptionHelp(pc, "[OPTIONS] service <password>");
while ((opt = poptGetNextOpt(pc)) != -1) {