s3:client: fix compiler warning
authorStefan Metzmacher <metze@samba.org>
Wed, 14 Aug 2013 08:47:11 +0000 (10:47 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 15 Aug 2013 07:07:06 +0000 (09:07 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/client/client.c

index ebdcbad0b386e53470228b4e58e76e6584658198..d302d43925360941bf1815f97bebe38ed77014a0 100644 (file)
@@ -5338,6 +5338,7 @@ static int do_message_op(struct user_auth_info *a_info)
 
  int main(int argc,char *argv[])
 {
+       const char **const_argv = discard_const_p(const char *, argv);
        char *base_directory = NULL;
        int opt;
        char *query_host = NULL;
@@ -5388,7 +5389,7 @@ static int do_message_op(struct user_auth_info *a_info)
        popt_common_set_auth_info(auth_info);
 
        /* skip argv(0) */
-       pc = poptGetContext("smbclient", argc, (const char **) argv, long_options, 0);
+       pc = poptGetContext("smbclient", argc, const_argv, long_options, 0);
        poptSetOtherOptionHelp(pc, "service <password>");
 
        while ((opt = poptGetNextOpt(pc)) != -1) {