From 88513d2d1ad60767b2d4e41a0e3a7b42894ff973 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Wed, 1 Oct 2008 17:34:24 +0000 Subject: Fixed some compiler warnings with gcc --- tests/libtest/lib553.c | 2 +- tests/server/resolve.c | 2 +- tests/server/sockfilt.c | 6 +++--- tests/server/sws.c | 6 +++--- tests/server/util.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) (limited to 'tests') diff --git a/tests/libtest/lib553.c b/tests/libtest/lib553.c index b9372b347..0a6fdcbdb 100644 --- a/tests/libtest/lib553.c +++ b/tests/libtest/lib553.c @@ -45,7 +45,7 @@ static char buf[SIZE_HEADERS + 100]; int test(char *URL) { CURL *curl; - CURLcode res; + CURLcode res = CURLE_FAILED_INIT; int i; struct curl_slist *headerlist=NULL, *hl; diff --git a/tests/server/resolve.c b/tests/server/resolve.c index 27723942c..dbe0d7308 100644 --- a/tests/server/resolve.c +++ b/tests/server/resolve.c @@ -71,7 +71,7 @@ const char *serverlogfile=""; /* for a util.c function we don't use */ int main(int argc, char *argv[]) { int arg=1; - char *host; + const char *host = NULL; int rc; while(argc>arg) { diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c index 271499184..c8c59b3d1 100644 --- a/tests/server/sockfilt.c +++ b/tests/server/sockfilt.c @@ -406,13 +406,13 @@ static bool juggle(curl_socket_t *sockfdp, fd_set fds_read; fd_set fds_write; fd_set fds_err; - curl_socket_t sockfd; - curl_socket_t maxfd; + curl_socket_t sockfd = CURL_SOCKET_BAD; + curl_socket_t maxfd = CURL_SOCKET_BAD; ssize_t rc; ssize_t nread_socket; ssize_t bytes_written; ssize_t buffer_len; - int error; + int error = 0; /* 'buffer' is this excessively large only to be able to support things like test 1003 which tests exceedingly large server response lines */ diff --git a/tests/server/sws.c b/tests/server/sws.c index af2f94ad1..3f11b3b0c 100644 --- a/tests/server/sws.c +++ b/tests/server/sws.c @@ -490,7 +490,7 @@ static int ProcessRequest(struct httprequest *req) static void storerequest(char *reqbuf, ssize_t totalsize) { int res; - int error; + int error = 0; ssize_t written; ssize_t writeleft; FILE *dump; @@ -550,7 +550,7 @@ static int get_request(curl_socket_t sock, struct httprequest *req) char *reqbuf = req->reqbuf; ssize_t got = 0; - char *pipereq; + char *pipereq = NULL; int pipereq_length = 0; if(req->pipelining) { @@ -655,7 +655,7 @@ static int send_doc(curl_socket_t sock, struct httprequest *req) bool persistant = TRUE; bool sendfailure = FALSE; size_t responsesize; - int error; + int error = 0; int res; static char weare[256]; diff --git a/tests/server/util.c b/tests/server/util.c index 8c4398183..646e52bcf 100644 --- a/tests/server/util.c +++ b/tests/server/util.c @@ -235,7 +235,7 @@ int write_pidfile(const char *filename) void set_advisor_read_lock(const char *filename) { FILE *lockfile; - int error; + int error = 0; int res; do { @@ -257,7 +257,7 @@ void set_advisor_read_lock(const char *filename) void clear_advisor_read_lock(const char *filename) { - int error; + int error = 0; int res; do { -- cgit v1.2.3