summaryrefslogtreecommitdiff
path: root/source3/client
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-09-23 00:57:34 +0000
committerJeremy Allison <jra@samba.org>1998-09-23 00:57:34 +0000
commit242d068297b79af46c00a94d0e737c79e908a498 (patch)
treeb3520289cce67032e40066c769b909cc43bb7286 /source3/client
parentac39ce3eba28eed97942e915f7b4cd77cdfd9e2d (diff)
downloadsamba-242d068297b79af46c00a94d0e737c79e908a498.tar.gz
samba-242d068297b79af46c00a94d0e737c79e908a498.tar.bz2
samba-242d068297b79af46c00a94d0e737c79e908a498.zip
Fixed up warnings in new client code.
Note to coders. If using gcc please use the compiler flags : -Wall -Werror -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual *before* checking anything in to ensure a clean compile. Jeremy. (This used to be commit 1daf424da6c5a346f672121d4b6fe5753250f464)
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/client.c86
-rw-r--r--source3/client/clitar.c8
2 files changed, 47 insertions, 47 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index b9b146fc94..1d3623aef2 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -3267,49 +3267,49 @@ struct
char compl_args[2]; /* Completion argument info */
} commands[] =
{
- {"ls",cmd_dir,"<mask> list the contents of the current directory",COMPL_REMOTE},
- {"dir",cmd_dir,"<mask> list the contents of the current directory",COMPL_REMOTE},
- {"du",cmd_du,"<mask> computes the total size of the current directory",COMPL_REMOTE},
- {"lcd",cmd_lcd,"[directory] change/report the local current working directory",COMPL_LOCAL},
- {"cd",cmd_cd,"[directory] change/report the remote directory",COMPL_REMOTE},
- {"pwd",cmd_pwd,"show current remote directory (same as 'cd' with no args)"},
- {"get",cmd_get,"<remote name> [local name] get a file",COMPL_REMOTE,COMPL_LOCAL},
- {"mget",cmd_mget,"<mask> get all the matching files",COMPL_REMOTE},
- {"put",cmd_put,"<local name> [remote name] put a file",COMPL_LOCAL,COMPL_REMOTE},
- {"mput",cmd_mput,"<mask> put all matching files",COMPL_REMOTE},
- {"rename",cmd_rename,"<src> <dest> rename some files",COMPL_REMOTE,COMPL_REMOTE},
- {"more",cmd_more,"<remote name> view a remote file with your pager",COMPL_REMOTE},
- {"mask",cmd_select,"<mask> mask all filenames against this",COMPL_REMOTE},
- {"del",cmd_del,"<mask> delete all matching files",COMPL_REMOTE},
- {"rm",cmd_del,"<mask> delete all matching files",COMPL_REMOTE},
- {"mkdir",cmd_mkdir,"<directory> make a directory"},
- {"md",cmd_mkdir,"<directory> make a directory"},
- {"rmdir",cmd_rmdir,"<directory> remove a directory"},
- {"rd",cmd_rmdir,"<directory> remove a directory"},
- {"pq",cmd_p_queue_4,"enumerate the print queue"},
- {"prompt",cmd_prompt,"toggle prompting for filenames for mget and mput"},
- {"recurse",cmd_recurse,"toggle directory recursion for mget and mput"},
- {"translate",cmd_translate,"toggle text translation for printing"},
- {"lowercase",cmd_lowercase,"toggle lowercasing of filenames for get"},
- {"print",cmd_print,"<file name> print a file"},
- {"printmode",cmd_printmode,"<graphics or text> set the print mode"},
- {"queue",cmd_queue,"show the print queue"},
- {"qinfo",cmd_qinfo,"show print queue information"},
- {"cancel",cmd_cancel,"<jobid> cancel a print queue entry"},
- {"quit",cli_send_logout,"logoff the server"},
- {"q",cli_send_logout,"logoff the server"},
- {"exit",cli_send_logout,"logoff the server"},
- {"newer",cmd_newer,"<file> only mget files newer than the specified local file",COMPL_LOCAL},
- {"archive",cmd_archive,"<level>\n0=ignore archive bit\n1=only get archive files\n2=only get archive files and reset archive bit\n3=get all files and reset archive bit"},
- {"tar",cmd_tar,"tar <c|x>[IXbgNan] current directory to/from <file name>" },
- {"blocksize",cmd_block,"blocksize <number> (default 20)" },
+ {"ls",cmd_dir,"<mask> list the contents of the current directory",{COMPL_REMOTE,COMPL_NONE}},
+ {"dir",cmd_dir,"<mask> list the contents of the current directory",{COMPL_REMOTE,COMPL_NONE}},
+ {"du",cmd_du,"<mask> computes the total size of the current directory",{COMPL_REMOTE,COMPL_NONE}},
+ {"lcd",cmd_lcd,"[directory] change/report the local current working directory",{COMPL_LOCAL,COMPL_NONE}},
+ {"cd",cmd_cd,"[directory] change/report the remote directory",{COMPL_REMOTE,COMPL_NONE}},
+ {"pwd",cmd_pwd,"show current remote directory (same as 'cd' with no args)",{COMPL_NONE,COMPL_NONE}},
+ {"get",cmd_get,"<remote name> [local name] get a file",{COMPL_REMOTE,COMPL_LOCAL}},
+ {"mget",cmd_mget,"<mask> get all the matching files",{COMPL_REMOTE,COMPL_NONE}},
+ {"put",cmd_put,"<local name> [remote name] put a file",{COMPL_LOCAL,COMPL_REMOTE}},
+ {"mput",cmd_mput,"<mask> put all matching files",{COMPL_REMOTE,COMPL_NONE}},
+ {"rename",cmd_rename,"<src> <dest> rename some files",{COMPL_REMOTE,COMPL_REMOTE}},
+ {"more",cmd_more,"<remote name> view a remote file with your pager",{COMPL_REMOTE,COMPL_NONE}},
+ {"mask",cmd_select,"<mask> mask all filenames against this",{COMPL_REMOTE,COMPL_NONE}},
+ {"del",cmd_del,"<mask> delete all matching files",{COMPL_REMOTE,COMPL_NONE}},
+ {"rm",cmd_del,"<mask> delete all matching files",{COMPL_REMOTE,COMPL_NONE}},
+ {"mkdir",cmd_mkdir,"<directory> make a directory",{COMPL_NONE,COMPL_NONE}},
+ {"md",cmd_mkdir,"<directory> make a directory",{COMPL_NONE,COMPL_NONE}},
+ {"rmdir",cmd_rmdir,"<directory> remove a directory",{COMPL_NONE,COMPL_NONE}},
+ {"rd",cmd_rmdir,"<directory> remove a directory",{COMPL_NONE,COMPL_NONE}},
+ {"pq",cmd_p_queue_4,"enumerate the print queue",{COMPL_NONE,COMPL_NONE}},
+ {"prompt",cmd_prompt,"toggle prompting for filenames for mget and mput",{COMPL_NONE,COMPL_NONE}},
+ {"recurse",cmd_recurse,"toggle directory recursion for mget and mput",{COMPL_NONE,COMPL_NONE}},
+ {"translate",cmd_translate,"toggle text translation for printing",{COMPL_NONE,COMPL_NONE}},
+ {"lowercase",cmd_lowercase,"toggle lowercasing of filenames for get",{COMPL_NONE,COMPL_NONE}},
+ {"print",cmd_print,"<file name> print a file",{COMPL_NONE,COMPL_NONE}},
+ {"printmode",cmd_printmode,"<graphics or text> set the print mode",{COMPL_NONE,COMPL_NONE}},
+ {"queue",cmd_queue,"show the print queue",{COMPL_NONE,COMPL_NONE}},
+ {"qinfo",cmd_qinfo,"show print queue information",{COMPL_NONE,COMPL_NONE}},
+ {"cancel",cmd_cancel,"<jobid> cancel a print queue entry",{COMPL_NONE,COMPL_NONE}},
+ {"quit",cli_send_logout,"logoff the server",{COMPL_NONE,COMPL_NONE}},
+ {"q",cli_send_logout,"logoff the server",{COMPL_NONE,COMPL_NONE}},
+ {"exit",cli_send_logout,"logoff the server",{COMPL_NONE,COMPL_NONE}},
+ {"newer",cmd_newer,"<file> only mget files newer than the specified local file",{COMPL_LOCAL,COMPL_NONE}},
+ {"archive",cmd_archive,"<level>\n0=ignore archive bit\n1=only get archive files\n2=only get archive files and reset archive bit\n3=get all files and reset archive bit",{COMPL_NONE,COMPL_NONE}},
+ {"tar",cmd_tar,"tar <c|x>[IXbgNan] current directory to/from <file name>",{COMPL_NONE,COMPL_NONE}},
+ {"blocksize",cmd_block,"blocksize <number> (default 20)",{COMPL_NONE,COMPL_NONE}},
{"tarmode",cmd_tarmode,
- "<full|inc|reset|noreset> tar's behaviour towards archive bits" },
- {"setmode",cmd_setmode,"filename <setmode string> change modes of file",COMPL_REMOTE},
- {"help",cmd_help,"[command] give help on a command"},
- {"?",cmd_help,"[command] give help on a command"},
- {"!",NULL,"run a shell command on the local system"},
- {"",NULL,NULL}
+ "<full|inc|reset|noreset> tar's behaviour towards archive bits",{COMPL_NONE,COMPL_NONE}},
+ {"setmode",cmd_setmode,"filename <setmode string> change modes of file",{COMPL_REMOTE,COMPL_NONE}},
+ {"help",cmd_help,"[command] give help on a command",{COMPL_NONE,COMPL_NONE}},
+ {"?",cmd_help,"[command] give help on a command",{COMPL_NONE,COMPL_NONE}},
+ {"!",NULL,"run a shell command on the local system",{COMPL_NONE,COMPL_NONE}},
+ {"",NULL,NULL,{COMPL_NONE,COMPL_NONE}}
};
@@ -3840,7 +3840,7 @@ static void usage(char *pname)
BOOL close_it;
pstring spec;
char pass[128];
- char *p;
+
if ((p = getenv("PASSWD_FD")) != NULL) {
pstrcpy(spec, "descriptor ");
pstrcat(spec, p);
diff --git a/source3/client/clitar.c b/source3/client/clitar.c
index 0ce5c205fa..7df6417ae1 100644
--- a/source3/client/clitar.c
+++ b/source3/client/clitar.c
@@ -1586,7 +1586,7 @@ static int next_block(char *ltarbuf, char **bufferp, int bufsiz)
{
int bufread, total = 0;
- DEBUG(5, ("Advancing to next block: %0X\n", *bufferp));
+ DEBUG(5, ("Advancing to next block: %0x\n", (unsigned int)*bufferp));
*bufferp += TBLOCK;
total = TBLOCK;
@@ -1643,7 +1643,7 @@ static int skip_file(int skipsize)
static int get_file(file_info2 finfo, char * inbuf, char * outbuf)
{
int fsize = finfo.size;
- int fnum, pos = 0, dsize = 0, wsize = 0, rsize = 0;
+ int fnum, pos = 0, dsize = 0, rsize = 0;
DEBUG(5, ("get_file: file: %s, size %i\n", finfo.name, fsize));
@@ -1745,7 +1745,6 @@ static char * get_longfilename(file_info2 finfo)
{
int namesize = finfo.size + strlen(cur_dir) + 2;
char *longname = malloc(namesize);
- char *xxx;
int offset = 0, left = finfo.size;
BOOL first = True;
@@ -1792,7 +1791,7 @@ static char * get_longfilename(file_info2 finfo)
static void do_tarput(void)
{
- file_info2 finfo, *finfo2;
+ file_info2 finfo;
struct timeval tp_start;
char *inbuf, *outbuf, *longfilename = NULL;
int skip = False;
@@ -1805,6 +1804,7 @@ static void do_tarput(void)
#if 0 /* Fix later ... */
if (push_dir(&dir_stack, &finfo)) {
+ file_info2 *finfo2;
finfo2 = pop_dir(&dir_stack);
inbuf = top_dir_name(&dir_stack); /* FIXME */