lib/texpect: fix compiler warnings
authorStefan Metzmacher <metze@samba.org>
Fri, 26 Sep 2014 07:06:59 +0000 (09:06 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 14 Nov 2014 22:27:04 +0000 (23:27 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: G√ľnther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/texpect/texpect.c

index 2ce33a286cc48d47e977f731abdd4cd334a8e609..d78808188bbf0d490af66cbbcd5d210847a4e85f 100644 (file)
@@ -358,8 +358,9 @@ int main(int argc, const char **argv)
        pid_t pid;
        poptContext pc;
        const char *instruction_file;
+       const char **args;
        const char *program;
-       char* const *program_args;
+       char * const *program_args;
 
        pc = poptGetContext("texpect",
                            argc,
@@ -377,7 +378,8 @@ int main(int argc, const char **argv)
        }
 
        instruction_file = poptGetArg(pc);
-       program_args = poptGetArgs(pc);
+       args = poptGetArgs(pc);
+       program_args = (char * const *)discard_const_p(char *, args);
        program = program_args[0];
 
        if (opt_verbose) {