Skip to content

Commit

Permalink
Fixed some compiler warnings with gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
dfandrich committed Oct 1, 2008
1 parent 91bc396 commit 88513d2
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 13 deletions.
5 changes: 2 additions & 3 deletions lib/hostip.c
Expand Up @@ -540,8 +540,7 @@ int Curl_resolv_timeout(struct connectdata *conn,
unsigned int prev_alarm=0;
struct SessionHandle *data = conn->data;
#endif /* USE_ALARM_TIMEOUT */

int rc = CURLRESOLV_ERROR; /* error by default */
int rc;

*entry = NULL;

Expand All @@ -562,7 +561,7 @@ int Curl_resolv_timeout(struct connectdata *conn,
if(sigsetjmp(curl_jmpenv, 1)) {
/* this is coming from a siglongjmp() after an alarm signal */
failf(data, "name lookup timed out");
return rc;
return CURLRESOLV_ERROR;
}

/*************************************************************
Expand Down
3 changes: 3 additions & 0 deletions lib/http.c
Expand Up @@ -591,6 +591,9 @@ http_output_auth(struct connectdata *conn,
if(result)
return result;
}
#else
(void)request;
(void)path;
#endif
if(auth) {
infof(data, "Proxy auth using %s with user '%s'\n",
Expand Down
2 changes: 1 addition & 1 deletion tests/libtest/lib553.c
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion tests/server/resolve.c
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions tests/server/sockfilt.c
Expand Up @@ -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 */
Expand Down
6 changes: 3 additions & 3 deletions tests/server/sws.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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];
Expand Down
4 changes: 2 additions & 2 deletions tests/server/util.c
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down

0 comments on commit 88513d2

Please sign in to comment.