diff options
author | Yang Tse <yangsita@gmail.com> | 2008-09-18 19:02:40 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2008-09-18 19:02:40 +0000 |
commit | 8b2bfa4212c3e534b695a74bcf9df29255d2bb00 (patch) | |
tree | 8b9fa7e1a05e8a25175a75e64efc1c1ca4d6648c | |
parent | a6c915aab98a51b69a77a23ebe1ad8eaf0fd251f (diff) |
fix compiler warning: external definition with no prior declaration
-rw-r--r-- | tests/libtest/lib517.c | 2 | ||||
-rw-r--r-- | tests/libtest/lib552.c | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/tests/libtest/lib517.c b/tests/libtest/lib517.c index 34146d20f..20fba6fbd 100644 --- a/tests/libtest/lib517.c +++ b/tests/libtest/lib517.c @@ -10,7 +10,7 @@ #include "test.h" -const char *dates[]={ +static const char *dates[]={ "Sun, 06 Nov 1994 08:49:37 GMT", "Sunday, 06-Nov-94 08:49:37 GMT", "Sun Nov 6 08:49:37 1994", diff --git a/tests/libtest/lib552.c b/tests/libtest/lib552.c index 1c6e23455..ab097da3e 100644 --- a/tests/libtest/lib552.c +++ b/tests/libtest/lib552.c @@ -106,15 +106,15 @@ int my_trace(CURL *handle, curl_infotype type, static size_t current_offset = 0; -char data[70000]; /* MUST be more than 64k OR MAX_INITIAL_POST_SIZE */ +static char databuf[70000]; /* MUST be more than 64k OR MAX_INITIAL_POST_SIZE */ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream) { size_t amount = nmemb * size; /* Total bytes curl wants */ - size_t available = sizeof data - current_offset; /* What we have to give */ + size_t available = sizeof(databuf) - current_offset; /* What we have to give */ size_t given = amount < available ? amount : available; /* What is given */ (void)stream; - memcpy(ptr, data + current_offset, given); + memcpy(ptr, databuf + current_offset, given); current_offset += given; return given; } @@ -161,14 +161,14 @@ int test(char *URL) curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); /* setup repeated data string */ - for (i=0; i < sizeof data; ++i) - data[i] = fill[i % sizeof fill]; + for (i=0; i < sizeof(databuf); ++i) + databuf[i] = fill[i % sizeof fill]; /* Post */ curl_easy_setopt(curl, CURLOPT_POST, 1L); /* Setup read callback */ - curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long) sizeof data); + curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long) sizeof(databuf)); curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback); /* Write callback */ |