cc-1164 cc: WARNING File = rpcclient/cmd_shutdown.c, Line = 43 Argument of type "const char **" is incompatible with parameter of type "char *const *". while ((opt = getopt(argc, argv, "m:t:rf")) != EOF) cc-1164 cc: WARNING File = rpcclient/cmd_reg.c, Line = 910 Argument of type "const char **" is incompatible with parameter of type "char *const *". while ((opt = getopt(argc, argv, "m:t:rf")) != EOF) getopt expects argv to be 'char *const *' int getopt (int argc, char * const argv[], const char *optstring); An explicit type conversion in the two getop() calls will quiet the warning. A change in arguments to the functions cmd_shutdown_init() and cmd_reg_shutdown() means changes to arguments in lots of functions in rpcclient/, rpc_parse/ and rpc_client/ because (*ntfn) would have to change too.
Created attachment 807 [details] rpcclient patch
patch file (id=807) are all the changes to the rpcclient/ files necessary if the argument to cmd_shutdown_init() and cmd_reg_shutdown() is changed to be consistent with getopt(). This changed (*ntfn) in rpcclient/rpcclient.h, but not (*wfn). If the patch is a good idea, then (*wfn) and everything it affects should probably be changed also.
Created attachment 808 [details] rpcclient patch
It turned out that changing both functions in rpcclient/rpcclient.h only affected files in rpcclient/. Version 2 of this patch (id=808) only affects files in rpcclient/ after all files have been changed so that argv is of the same type is in getopt().
*** This bug has been marked as a duplicate of 2504 ***