aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2007-09-27 01:45:22 +0000
committerDan Fandrich <dan@coneharvesters.com>2007-09-27 01:45:22 +0000
commit16b95fc77316fdd3866f7de4ebb5d14bd136ac11 (patch)
treeb30e7469d7d0c15d766747c9405ded68894718d5 /tests
parent9c5cd6c4137e2c0f238b6f767fe40fdacb9b6ede (diff)
Enabled a few more gcc warnings with --enable-debug. Renamed a few
variables to avoid shadowing global declarations.
Diffstat (limited to 'tests')
-rw-r--r--tests/libtest/lib506.c4
-rw-r--r--tests/server/sockfilt.c16
-rw-r--r--tests/server/tftpd.c16
3 files changed, 18 insertions, 18 deletions
diff --git a/tests/libtest/lib506.c b/tests/libtest/lib506.c
index 0a2a0d163..eaf96d2e9 100644
--- a/tests/libtest/lib506.c
+++ b/tests/libtest/lib506.c
@@ -31,14 +31,14 @@ struct userdata {
};
/* lock callback */
-static void my_lock(CURL *handle, curl_lock_data data, curl_lock_access access,
+static void my_lock(CURL *handle, curl_lock_data data, curl_lock_access laccess,
void *useptr )
{
const char *what;
struct userdata *user = (struct userdata *)useptr;
(void)handle;
- (void)access;
+ (void)laccess;
switch ( data ) {
case CURL_LOCK_DATA_SHARE:
diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c
index 2cca0b37b..ae576237e 100644
--- a/tests/server/sockfilt.c
+++ b/tests/server/sockfilt.c
@@ -411,7 +411,7 @@ static int juggle(curl_socket_t *sockfdp,
}
static curl_socket_t sockdaemon(curl_socket_t sock,
- unsigned short *port)
+ unsigned short *listenport)
{
/* passive daemon style */
struct sockaddr_in me;
@@ -441,7 +441,7 @@ static curl_socket_t sockdaemon(curl_socket_t sock,
#endif
me.sin_family = AF_INET;
me.sin_addr.s_addr = INADDR_ANY;
- me.sin_port = htons(*port);
+ me.sin_port = htons(*listenport);
rc = bind(sock, (struct sockaddr *) &me, sizeof(me));
#ifdef ENABLE_IPV6
}
@@ -449,7 +449,7 @@ static curl_socket_t sockdaemon(curl_socket_t sock,
memset(&me6, 0, sizeof(struct sockaddr_in6));
me6.sin6_family = AF_INET6;
me6.sin6_addr = in6addr_any;
- me6.sin6_port = htons(*port);
+ me6.sin6_port = htons(*listenport);
rc = bind(sock, (struct sockaddr *) &me6, sizeof(me6));
}
#endif /* ENABLE_IPV6 */
@@ -459,7 +459,7 @@ static curl_socket_t sockdaemon(curl_socket_t sock,
return CURL_SOCKET_BAD;
}
- if(!*port) {
+ if(!*listenport) {
/* The system picked a port number, now figure out which port we actually
got */
/* we succeeded to bind */
@@ -471,7 +471,7 @@ static curl_socket_t sockdaemon(curl_socket_t sock,
logmsg("getsockname() failed with error: %d", SOCKERRNO);
return CURL_SOCKET_BAD;
}
- *port = ntohs(add.sin_port);
+ *listenport = ntohs(add.sin_port);
}
/* start accepting connections */
@@ -485,13 +485,13 @@ static curl_socket_t sockdaemon(curl_socket_t sock,
return sock;
}
-static curl_socket_t mksock(bool use_ipv6)
+static curl_socket_t mksock(bool ipv6)
{
curl_socket_t sock;
#ifdef ENABLE_IPV6
- if(!use_ipv6)
+ if(!ipv6)
#else
- (void)use_ipv6;
+ (void)ipv6;
#endif
sock = socket(AF_INET, SOCK_STREAM, 0);
#ifdef ENABLE_IPV6
diff --git a/tests/server/tftpd.c b/tests/server/tftpd.c
index e7fae0d47..416317eac 100644
--- a/tests/server/tftpd.c
+++ b/tests/server/tftpd.c
@@ -286,7 +286,7 @@ static int writeit(struct testcase *test, struct tftphdr **dpp,
*/
static ssize_t write_behind(struct testcase *test, int convert)
{
- char *buf;
+ char *writebuf;
int count;
int ct;
char *p;
@@ -312,15 +312,15 @@ static ssize_t write_behind(struct testcase *test, int convert)
b->counter = BF_FREE; /* reset flag */
dp = (struct tftphdr *)b->buf;
nextone = !nextone; /* incr for next time */
- buf = dp->th_data;
+ writebuf = dp->th_data;
if (count <= 0)
return -1; /* nak logic? */
if (convert == 0)
- return write(test->ofile, buf, count);
+ return write(test->ofile, writebuf, count);
- p = buf;
+ p = writebuf;
ct = count;
while (ct--) { /* loop over the buffer */
c = *p++; /* pick up a character */
@@ -363,8 +363,8 @@ static int synchnet(curl_socket_t f /* socket to flush */)
#endif
int j = 0;
char rbuf[PKTSIZE];
- struct sockaddr_in from;
- socklen_t fromlen;
+ struct sockaddr_in fromaddr;
+ socklen_t fromaddrlen;
while (1) {
#if defined(HAVE_IOCTLSOCKET)
@@ -374,9 +374,9 @@ static int synchnet(curl_socket_t f /* socket to flush */)
#endif
if (i) {
j++;
- fromlen = sizeof from;
+ fromaddrlen = sizeof fromaddr;
(void) recvfrom(f, rbuf, sizeof (rbuf), 0,
- (struct sockaddr *)&from, &fromlen);
+ (struct sockaddr *)&fromaddr, &fromaddrlen);
}
else
break;