1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

prevent compiler warnings

This commit is contained in:
Daniel Stenberg 2002-10-28 19:20:59 +00:00
parent 744d8c1006
commit b8a6913e09
4 changed files with 8 additions and 7 deletions

View File

@ -999,7 +999,6 @@ CURLcode ftp_use_port(struct connectdata *conn)
#endif #endif
unsigned char *ap; unsigned char *ap;
unsigned char *pp; unsigned char *pp;
int alen, plen;
char portmsgbuf[4096], tmp[4096]; char portmsgbuf[4096], tmp[4096];
const char *mode[] = { "EPRT", "LPRT", "PORT", NULL }; const char *mode[] = { "EPRT", "LPRT", "PORT", NULL };
@ -1062,6 +1061,7 @@ CURLcode ftp_use_port(struct connectdata *conn)
for (modep = (char **)mode; modep && *modep; modep++) { for (modep = (char **)mode; modep && *modep; modep++) {
int lprtaf, eprtaf; int lprtaf, eprtaf;
int alen=0, plen=0;
switch (sa->sa_family) { switch (sa->sa_family) {
case AF_INET: case AF_INET:
@ -1363,7 +1363,7 @@ CURLcode ftp_use_pasv(struct connectdata *conn,
#endif #endif
int modeoff; int modeoff;
unsigned short connectport; /* the local port connect() should use! */ unsigned short connectport; /* the local port connect() should use! */
unsigned short newport; /* remote port, not necessary the local one */ unsigned short newport=0; /* remote port, not necessary the local one */
/* newhost must be able to hold a full IP-style address in ASCII, which /* newhost must be able to hold a full IP-style address in ASCII, which
in the IPv6 case means 5*8-1 = 39 letters */ in the IPv6 case means 5*8-1 = 39 letters */

View File

@ -72,9 +72,9 @@ CURLcode Curl_initinfo(struct SessionHandle *data)
CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...) CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...)
{ {
va_list arg; va_list arg;
long *param_longp; long *param_longp=NULL;
double *param_doublep; double *param_doublep=NULL;
char **param_charp; char **param_charp=NULL;
va_start(arg, info); va_start(arg, info);
switch(info&CURLINFO_TYPEMASK) { switch(info&CURLINFO_TYPEMASK) {

View File

@ -57,6 +57,7 @@ FILE *curl_fopen(const char *file, const char *mode, int line,
int curl_fclose(FILE *file, int line, const char *source); int curl_fclose(FILE *file, int line, const char *source);
/* Set this symbol on the command-line, recompile all lib-sources */ /* Set this symbol on the command-line, recompile all lib-sources */
#undef strdup
#define strdup(ptr) curl_dostrdup(ptr, __LINE__, __FILE__) #define strdup(ptr) curl_dostrdup(ptr, __LINE__, __FILE__)
#define malloc(size) curl_domalloc(size, __LINE__, __FILE__) #define malloc(size) curl_domalloc(size, __LINE__, __FILE__)
#define realloc(ptr,size) curl_dorealloc(ptr, size, __LINE__, __FILE__) #define realloc(ptr,size) curl_dorealloc(ptr, size, __LINE__, __FILE__)

View File

@ -1691,13 +1691,13 @@ static CURLcode CreateConnection(struct SessionHandle *data,
int urllen; int urllen;
Curl_addrinfo *hostaddr; Curl_addrinfo *hostaddr;
#ifdef HAVE_ALARM #ifdef HAVE_ALARM
unsigned int prev_alarm; unsigned int prev_alarm=0;
#endif #endif
char endbracket; char endbracket;
#ifdef HAVE_SIGACTION #ifdef HAVE_SIGACTION
struct sigaction keep_sigact; /* store the old struct here */ struct sigaction keep_sigact; /* store the old struct here */
bool keep_copysig; /* did copy it? */ bool keep_copysig=FALSE; /* did copy it? */
#else #else
#ifdef HAVE_SIGNAL #ifdef HAVE_SIGNAL
void *keep_sigact; /* store the old handler here */ void *keep_sigact; /* store the old handler here */