fix gcc4 warnings
Modified: trunk/reactos/apps/utils/net/ftp/domacro.c
Modified: trunk/reactos/apps/utils/net/ftp/fake.c
Modified: trunk/reactos/apps/utils/net/ftp/fake.h
Modified: trunk/reactos/apps/utils/net/ftp/ftp.c
Modified: trunk/reactos/apps/utils/net/ftp/ftp.xml
Modified: trunk/reactos/apps/utils/net/ftp/ftp_var.h
Modified: trunk/reactos/apps/utils/net/ftp/main.c
Modified: trunk/reactos/apps/utils/net/ftp/prototypes.h
Modified: trunk/reactos/apps/utils/net/ftp/ruserpass.c

Modified: trunk/reactos/apps/utils/net/ftp/domacro.c
--- trunk/reactos/apps/utils/net/ftp/domacro.c	2005-05-28 23:38:58 UTC (rev 15647)
+++ trunk/reactos/apps/utils/net/ftp/domacro.c	2005-05-29 00:04:41 UTC (rev 15648)
@@ -36,9 +36,8 @@
 	register char *cp1, *cp2;
 	int count = 2, loopflg = 0;
 	char line2[200];
-	extern char **glob(), *globerr;
+	extern char **glob();
 	struct cmd *getcmd(), *c;
-	extern struct cmd cmdtab[];
 
 	if (argc < 2) {
 		(void) strcat(line, " ");

Modified: trunk/reactos/apps/utils/net/ftp/fake.c
--- trunk/reactos/apps/utils/net/ftp/fake.c	2005-05-28 23:38:58 UTC (rev 15647)
+++ trunk/reactos/apps/utils/net/ftp/fake.c	2005-05-29 00:04:41 UTC (rev 15648)
@@ -1,6 +1,7 @@
 #include <stdio.h>
 #include <time.h>
 #include <winsock.h>
+#include "fake.h"
 #include "prototypes.h"
 
 #define MAX_ASCII 100
@@ -305,12 +306,7 @@
 #define EPOCHFILETIME (116444736000000000LL)
 #endif
 
-struct timezone {
-    int tz_minuteswest; /* minutes W of Greenwich */
-    int tz_dsttime;     /* type of dst correction */
-};
-
-__inline int gettimeofday(struct timeval *tv, struct timezone *tz)
+int gettimeofday(struct timeval *tv, struct timezone *tz)
 {
     FILETIME        ft;
     LARGE_INTEGER   li;

Modified: trunk/reactos/apps/utils/net/ftp/fake.h
--- trunk/reactos/apps/utils/net/ftp/fake.h	2005-05-28 23:38:58 UTC (rev 15647)
+++ trunk/reactos/apps/utils/net/ftp/fake.h	2005-05-29 00:04:41 UTC (rev 15648)
@@ -8,3 +8,10 @@
 
 #define strcasecmp strcmp
 #define strncasecmp strnicmp
+
+struct timezone {
+    int tz_minuteswest; /* minutes W of Greenwich */
+    int tz_dsttime;     /* type of dst correction */
+};
+
+int gettimeofday(struct timeval *tv, struct timezone *tz);

Modified: trunk/reactos/apps/utils/net/ftp/ftp.c
--- trunk/reactos/apps/utils/net/ftp/ftp.c	2005-05-28 23:38:58 UTC (rev 15647)
+++ trunk/reactos/apps/utils/net/ftp/ftp.c	2005-05-29 00:04:41 UTC (rev 15648)
@@ -320,6 +320,7 @@
 
 #include <ctype.h>
 
+int
 getreply(expecteof)
 	int expecteof;
 {
@@ -371,7 +372,7 @@
 			if (c != '\r' && (verbose > 0 ||
 			    (verbose > -1 && n == '5' && dig > 4))) {
 				if (proxflag &&
-				   (dig == 1 || dig == 5 && verbose == 0))
+				   ((dig == 1 || dig == 5) && verbose == 0))
 					printf("%s:",hostname);
 				(void) putchar(c);
 				(void) fflush(stdout);
@@ -400,7 +401,7 @@
 			if (cp < &reply_string[sizeof(reply_string) - 1])
 				*cp++ = c;
 		}
-		if (verbose > 0 || verbose > -1 && n == '5') {
+		if (verbose > 0 || (verbose > -1 && n == '5')) {
 			(void) putchar(c);
 			(void) fflush (stdout);
 		}
@@ -421,6 +422,7 @@
 	}
 }
 
+int
 empty(mask, sec)
 	struct fd_set *mask;
 	int sec;
@@ -995,7 +997,7 @@
 		}
 break2:
 		if (bare_lfs) {
-			printf("WARNING! %d bare linefeeds received in ASCII mode\n");
+			printf("WARNING! %d bare linefeeds received in ASCII mode\n", bare_lfs);
 			printf("File may not have transferred correctly.\n");
 			(void) fflush(stdout);
 		}
@@ -1134,6 +1136,7 @@
  */
 int sendport = -1;
 
+int
 initconn()
 {
 	register char *p, *a;

Modified: trunk/reactos/apps/utils/net/ftp/ftp.xml
--- trunk/reactos/apps/utils/net/ftp/ftp.xml	2005-05-28 23:38:58 UTC (rev 15647)
+++ trunk/reactos/apps/utils/net/ftp/ftp.xml	2005-05-29 00:04:41 UTC (rev 15648)
@@ -1,6 +1,7 @@
 <module name="ftp" type="win32cui" installbase="system32" installname="ftp.exe" warnings="true">
 	<include base="ftp">.</include>
 	<define name="__USE_W32API" />
+	<define name="lint" />
 	<library>kernel32</library>
 	<library>ws2_32</library>
 	<library>iphlpapi</library>

Modified: trunk/reactos/apps/utils/net/ftp/ftp_var.h
--- trunk/reactos/apps/utils/net/ftp/ftp_var.h	2005-05-28 23:38:58 UTC (rev 15647)
+++ trunk/reactos/apps/utils/net/ftp/ftp_var.h	2005-05-29 00:04:41 UTC (rev 15648)
@@ -1,5 +1,5 @@
+#include <winsock.h>
 #include "fake.h"
-#include <winsock.h>
 #include <setjmp.h>
 
 //typedef void (*Sig_t)(int);

Modified: trunk/reactos/apps/utils/net/ftp/main.c
--- trunk/reactos/apps/utils/net/ftp/main.c	2005-05-28 23:38:58 UTC (rev 15647)
+++ trunk/reactos/apps/utils/net/ftp/main.c	2005-05-29 00:04:41 UTC (rev 15648)
@@ -127,7 +127,6 @@
 {
 	register char *cp;
 	int top;
-	struct passwd *pw = NULL;
 #if 0
 	char homedir[MAXPATHLEN];
 #endif
@@ -369,7 +368,7 @@
 	longest = 0;
 	nmatches = 0;
 	found = 0;
-	for (c = cmdtab; p = c->c_name; c++) {
+	for (c = cmdtab; (p = c->c_name); c++) {
 		for (q = name; *q == *p++; q++)
 			if (*q == 0)		/* exact match? */
 				return (c);
@@ -403,7 +402,7 @@
 	stringbase = line;		/* scan from first of buffer */
 	argbase = argbuf;		/* store from first of buffer */
 	slrflag = 0;
-	while (*argp++ = slurpstring())
+	while ((*argp++ = slurpstring()))
 		margc++;
 }
 

Modified: trunk/reactos/apps/utils/net/ftp/prototypes.h
--- trunk/reactos/apps/utils/net/ftp/prototypes.h	2005-05-28 23:38:58 UTC (rev 15647)
+++ trunk/reactos/apps/utils/net/ftp/prototypes.h	2005-05-29 00:04:41 UTC (rev 15648)
@@ -28,5 +28,4 @@
 int confirm(char *cmd, char *file);
 void blkfree(char **av0);
 int getit(int argc, char *argv[], int restartit, char *mode);
-static int token(void);
 int sleep(int time);

Modified: trunk/reactos/apps/utils/net/ftp/ruserpass.c
--- trunk/reactos/apps/utils/net/ftp/ruserpass.c	2005-05-28 23:38:58 UTC (rev 15647)
+++ trunk/reactos/apps/utils/net/ftp/ruserpass.c	2005-05-29 00:04:41 UTC (rev 15648)
@@ -53,17 +53,18 @@
 	char *tokstr;
 	int tval;
 } toktab[]= {
-	"default",	DEFAULT,
-	"login",	LOGIN,
-	"password",	PASSWD,
-	"passwd",	PASSWD,
-	"account",	ACCOUNT,
-	"machine",	MACH,
-	"macdef",	MACDEF,
-	0,		0
+	{"default",	DEFAULT},
+	{"login",	LOGIN},
+	{"password",	PASSWD},
+	{"passwd",	PASSWD},
+	{"account",	ACCOUNT},
+	{"machine",	MACH},
+	{"macdef",	MACDEF},
+	{0,		0}
 };
 
 extern char *hostname;
+static int token(void);
 
 int ruserpass(char *host, char **aname, char **apass, char **aacct)
 {
@@ -125,7 +126,7 @@
 		while ((t = token()) && t != MACH && t != DEFAULT) switch(t) {
 
 		case LOGIN:
-			if (token())
+			if (token()) {
 				if (*aname == 0) {
 					*aname = malloc((unsigned) strlen(tokval) + 1);
 					(void) strcpy(*aname, tokval);
@@ -133,6 +134,7 @@
 					if (strcmp(*aname, tokval))
 						goto next;
 				}
+			}
 			break;
 		case PASSWD:
 			if (strcmp(*aname, "anonymous") &&
@@ -164,7 +166,7 @@
 				(void) fclose(cfile);
 				return(0);
 			}
-			while ((c=getc(cfile)) != EOF && c == ' ' || c == '\t');
+			while ((c=getc(cfile)) != EOF && (c == ' ' || c == '\t'));
 			if (c == EOF || c == '\n') {
 				printf("Missing macdef name argument.\n");
 				goto bad;