summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-03-22 14:33:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:10 -0500
commit0dbdb7f662810d481d60309887fdcd322227a36a (patch)
tree67b71c8af696db8a28a4d88a0b5c263bf42aef7b /source3/rpcclient
parent43f4930ed3210910b2a1f1ff0c04d9c8ed9f238d (diff)
downloadsamba-0dbdb7f662810d481d60309887fdcd322227a36a.tar.gz
samba-0dbdb7f662810d481d60309887fdcd322227a36a.tar.bz2
samba-0dbdb7f662810d481d60309887fdcd322227a36a.zip
r5944: cleaning up compiler warnings reported by Jason Mader
(This used to be commit 8f87d9c5b66bfbbb1c2eb409bc424fa730b66ff0)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_spoolss.c13
-rw-r--r--source3/rpcclient/rpcclient.c2
2 files changed, 6 insertions, 9 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 60b1aaa6b8..ec9d304882 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -1283,7 +1283,7 @@ void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch)
wrapper for strtok to get the next parameter from a delimited list.
Needed to handle the empty parameter string denoted by "NULL"
*************************************************************************/
-static char* get_driver_3_param (const char* str, const char* delim, UNISTR* dest)
+static char* get_driver_3_param (char* str, const char* delim, UNISTR* dest)
{
char *ptr;
@@ -1310,11 +1310,8 @@ static char* get_driver_3_param (const char* str, const char* delim, UNISTR* des
<Config File Name>:<Help File Name>:<Language Monitor Name>:\
<Default Data Type>:<Comma Separated list of Files>
*******************************************************************************/
-static BOOL init_drv_info_3_members (
- TALLOC_CTX *mem_ctx,
- DRIVER_INFO_3 *info,
- const char *args
-)
+static BOOL init_drv_info_3_members ( TALLOC_CTX *mem_ctx, DRIVER_INFO_3 *info,
+ char *args )
{
char *str, *str2;
uint32 len, i;
@@ -1370,6 +1367,7 @@ static WERROR cmd_spoolss_addprinterdriver(struct cli_state *cli,
DRIVER_INFO_3 info3;
const char *arch;
fstring driver_name;
+ char *driver_args;
/* parse the command arguements */
if (argc != 3 && argc != 4)
@@ -1393,7 +1391,8 @@ static WERROR cmd_spoolss_addprinterdriver(struct cli_state *cli,
else
set_drv_info_3_env(&info3, arch);
- if (!init_drv_info_3_members(mem_ctx, &info3, argv[2]))
+ driver_args = talloc_strdup( mem_ctx, argv[2] );
+ if (!init_drv_info_3_members(mem_ctx, &info3, driver_args ))
{
printf ("Error Invalid parameter list - %s.\n", argv[2]);
return WERR_INVALID_PARAM;
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index acb65b7f7c..c02a279db9 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -24,7 +24,6 @@
#include "rpcclient.h"
DOM_SID domain_sid;
-static int pipe_idx;
/* List to hold groups of commands.
@@ -559,7 +558,6 @@ static NTSTATUS do_cmd(struct cli_state *cli,
/* Run command */
- pipe_idx = cmd_entry->pipe_idx;
if ( cmd_entry->returntype == RPC_RTYPE_NTSTATUS ) {
ntresult = cmd_entry->ntfn(cli, mem_ctx, argc, (const char **) argv);
if (!NT_STATUS_IS_OK(ntresult)) {