aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-10-28 19:20:59 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-10-28 19:20:59 +0000
commitb8a6913e0965e5f492dfbe2b39b52ab5813bf08d (patch)
treef838bef30e2bf0a7db269749c3d7bf470e4c64ed
parent744d8c1006e5aeb3abe4f42949a148b2e8f9cea4 (diff)
prevent compiler warnings
-rw-r--r--lib/ftp.c4
-rw-r--r--lib/getinfo.c6
-rw-r--r--lib/memdebug.h1
-rw-r--r--lib/url.c4
4 files changed, 8 insertions, 7 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 5008d920e..9fe31b857 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -999,7 +999,6 @@ CURLcode ftp_use_port(struct connectdata *conn)
#endif
unsigned char *ap;
unsigned char *pp;
- int alen, plen;
char portmsgbuf[4096], tmp[4096];
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++) {
int lprtaf, eprtaf;
+ int alen=0, plen=0;
switch (sa->sa_family) {
case AF_INET:
@@ -1363,7 +1363,7 @@ CURLcode ftp_use_pasv(struct connectdata *conn,
#endif
int modeoff;
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
in the IPv6 case means 5*8-1 = 39 letters */
diff --git a/lib/getinfo.c b/lib/getinfo.c
index f2efbbaa6..01d6dda85 100644
--- a/lib/getinfo.c
+++ b/lib/getinfo.c
@@ -72,9 +72,9 @@ CURLcode Curl_initinfo(struct SessionHandle *data)
CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...)
{
va_list arg;
- long *param_longp;
- double *param_doublep;
- char **param_charp;
+ long *param_longp=NULL;
+ double *param_doublep=NULL;
+ char **param_charp=NULL;
va_start(arg, info);
switch(info&CURLINFO_TYPEMASK) {
diff --git a/lib/memdebug.h b/lib/memdebug.h
index b2399a269..3fa87ac9e 100644
--- a/lib/memdebug.h
+++ b/lib/memdebug.h
@@ -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);
/* Set this symbol on the command-line, recompile all lib-sources */
+#undef strdup
#define strdup(ptr) curl_dostrdup(ptr, __LINE__, __FILE__)
#define malloc(size) curl_domalloc(size, __LINE__, __FILE__)
#define realloc(ptr,size) curl_dorealloc(ptr, size, __LINE__, __FILE__)
diff --git a/lib/url.c b/lib/url.c
index eb4003b22..edd2b3a39 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1691,13 +1691,13 @@ static CURLcode CreateConnection(struct SessionHandle *data,
int urllen;
Curl_addrinfo *hostaddr;
#ifdef HAVE_ALARM
- unsigned int prev_alarm;
+ unsigned int prev_alarm=0;
#endif
char endbracket;
#ifdef HAVE_SIGACTION
struct sigaction keep_sigact; /* store the old struct here */
- bool keep_copysig; /* did copy it? */
+ bool keep_copysig=FALSE; /* did copy it? */
#else
#ifdef HAVE_SIGNAL
void *keep_sigact; /* store the old handler here */