summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-09-18 16:21:09 +0000
committerYang Tse <yangsita@gmail.com>2008-09-18 16:21:09 +0000
commita6c915aab98a51b69a77a23ebe1ad8eaf0fd251f (patch)
tree197a1708904aad5274994d0232b0e7edf8fdae01 /tests
parenta8323cc3f5f3ab0621e14ebf543a870feed2280e (diff)
downloadcurl-a6c915aab98a51b69a77a23ebe1ad8eaf0fd251f.tar.gz
fix compiler warning: external declaration in primary source file
Diffstat (limited to 'tests')
-rw-r--r--tests/libtest/first.c3
-rw-r--r--tests/libtest/test.h9
-rw-r--r--tests/server/sws.c8
-rw-r--r--tests/server/util.c3
-rw-r--r--tests/server/util.h3
5 files changed, 12 insertions, 14 deletions
diff --git a/tests/libtest/first.c b/tests/libtest/first.c
index a58755c41..d25c7ad28 100644
--- a/tests/libtest/first.c
+++ b/tests/libtest/first.c
@@ -16,9 +16,6 @@ extern void curl_memdebug(const char *);
extern void curl_memlimit(int);
#endif
-/* test is provided in the test code file */
-int test(char *url);
-
int select_test (int num_fds, fd_set *rd, fd_set *wr, fd_set *exc,
struct timeval *tv)
{
diff --git a/tests/libtest/test.h b/tests/libtest/test.h
index ef85c346f..b4541c6c4 100644
--- a/tests/libtest/test.h
+++ b/tests/libtest/test.h
@@ -43,8 +43,9 @@ extern char *libtest_arg3; /* set by first.c to the argv[3] or NULL */
extern int test_argc;
extern char **test_argv;
-int select_test (int num_fds, fd_set *rd, fd_set *wr, fd_set *exc,
- struct timeval *tv);
+extern int select_test(int num_fds, fd_set *rd, fd_set *wr, fd_set *exc,
+ struct timeval *tv);
+
+extern int test(char *URL); /* the actual test function provided by each
+ individual libXXX.c file */
-int test(char *URL); /* the actual test function provided by each individual
- libXXX.c file */
diff --git a/tests/server/sws.c b/tests/server/sws.c
index a4d7e89e0..92f485954 100644
--- a/tests/server/sws.c
+++ b/tests/server/sws.c
@@ -108,8 +108,8 @@ struct httprequest {
bool pipelining; /* true if request is pipelined */
};
-int ProcessRequest(struct httprequest *req);
-void storerequest(char *reqbuf, ssize_t totalsize);
+static int ProcessRequest(struct httprequest *req);
+static void storerequest(char *reqbuf, ssize_t totalsize);
#define DEFAULT_PORT 8999
@@ -191,7 +191,7 @@ static void sigpipe_handler(int sig)
}
#endif
-int ProcessRequest(struct httprequest *req)
+static int ProcessRequest(struct httprequest *req)
{
char *line=&req->reqbuf[req->checkindex];
bool chunked = FALSE;
@@ -482,7 +482,7 @@ int ProcessRequest(struct httprequest *req)
}
/* store the entire request in a file */
-void storerequest(char *reqbuf, ssize_t totalsize)
+static void storerequest(char *reqbuf, ssize_t totalsize)
{
int res;
int error;
diff --git a/tests/server/util.c b/tests/server/util.c
index 64684545e..af9059721 100644
--- a/tests/server/util.c
+++ b/tests/server/util.c
@@ -59,9 +59,6 @@
const struct in6_addr in6addr_any = {{ IN6ADDR_ANY_INIT }};
#endif
-/* someone else must set this properly */
-extern const char *serverlogfile;
-
void logmsg(const char *msg, ...)
{
va_list ap;
diff --git a/tests/server/util.h b/tests/server/util.h
index 9b9dd598b..aaca005f2 100644
--- a/tests/server/util.h
+++ b/tests/server/util.h
@@ -32,6 +32,9 @@ void logmsg(const char *msg, ...);
/* global variable, where to find the 'data' dir */
extern const char *path;
+/* global variable, log file name */
+extern const char *serverlogfile;
+
#ifdef WIN32
#include <process.h>
#include <fcntl.h>