mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
fix gcc4 warnings
svn path=/trunk/; revision=15648
This commit is contained in:
parent
89f3ea02c7
commit
d1d04bc6c6
9 changed files with 32 additions and 26 deletions
|
@ -36,9 +36,8 @@ void domacro(argc, argv)
|
|||
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, " ");
|
||||
|
|
|
@ -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 @@ int access(const char *filename, int accessmethod)
|
|||
#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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -320,6 +320,7 @@ char reply_string[BUFSIZ]; /* last line of previous reply */
|
|||
|
||||
#include <ctype.h>
|
||||
|
||||
int
|
||||
getreply(expecteof)
|
||||
int expecteof;
|
||||
{
|
||||
|
@ -371,7 +372,7 @@ getreply(expecteof)
|
|||
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 @@ getreply(expecteof)
|
|||
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 @@ getreply(expecteof)
|
|||
}
|
||||
}
|
||||
|
||||
int
|
||||
empty(mask, sec)
|
||||
struct fd_set *mask;
|
||||
int sec;
|
||||
|
@ -995,7 +997,7 @@ done:
|
|||
}
|
||||
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 @@ null();// (void) signal(SIGINT,oldintr);
|
|||
*/
|
||||
int sendport = -1;
|
||||
|
||||
int
|
||||
initconn()
|
||||
{
|
||||
register char *p, *a;
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "fake.h"
|
||||
#include <winsock.h>
|
||||
#include "fake.h"
|
||||
#include <setjmp.h>
|
||||
|
||||
//typedef void (*Sig_t)(int);
|
||||
|
|
|
@ -127,7 +127,6 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
register char *cp;
|
||||
int top;
|
||||
struct passwd *pw = NULL;
|
||||
#if 0
|
||||
char homedir[MAXPATHLEN];
|
||||
#endif
|
||||
|
@ -369,7 +368,7 @@ getcmd(name)
|
|||
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 @@ void makeargv()
|
|||
stringbase = line; /* scan from first of buffer */
|
||||
argbase = argbuf; /* store from first of buffer */
|
||||
slrflag = 0;
|
||||
while (*argp++ = slurpstring())
|
||||
while ((*argp++ = slurpstring()))
|
||||
margc++;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,5 +28,4 @@ void recvrequest(char *cmd, char *local, char *remote, char *mode,
|
|||
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);
|
||||
|
|
|
@ -53,17 +53,18 @@ static struct toktab {
|
|||
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 @@ next:
|
|||
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 @@ next:
|
|||
if (strcmp(*aname, tokval))
|
||||
goto next;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case PASSWD:
|
||||
if (strcmp(*aname, "anonymous") &&
|
||||
|
@ -164,7 +166,7 @@ next:
|
|||
(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;
|
||||
|
|
Loading…
Reference in a new issue