aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-06-05 14:56:32 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-06-05 14:56:32 +0200
commit38125e7f7ed899d07aecd6599de17cbd76ed5422 (patch)
tree04785b776d81c35edea65fe2dfa743376983cd27 /tests/libtest
parentb8085f493a7066fe6990c15e8e30d8b20c736062 (diff)
test1121: use stricter types to work with typcheck-gcc
Diffstat (limited to 'tests/libtest')
-rw-r--r--tests/libtest/lib1521.c93
-rw-r--r--tests/libtest/mk-lib1521.pl59
2 files changed, 116 insertions, 36 deletions
diff --git a/tests/libtest/lib1521.c b/tests/libtest/lib1521.c
index 3b558a7a5..cce29d066 100644
--- a/tests/libtest/lib1521.c
+++ b/tests/libtest/lib1521.c
@@ -47,6 +47,31 @@ int test(char *URL)
CURL *dep;
CURLSH *share;
(void)URL; /* not used */
+ char errorbuffer[CURL_ERROR_SIZE];
+ curl_write_callback writecb;
+ curl_read_callback readcb;
+ curl_progress_callback progresscb;
+ curl_write_callback headercb;
+ curl_debug_callback debugcb;
+ curl_ssl_ctx_callback ssl_ctx_cb;
+ curl_ioctl_callback ioctlcb;
+ void *conv_from_network_cb;
+ void *conv_to_network_cb;
+ void *conv_from_utf8_cb;
+ curl_sockopt_callback sockoptcb;
+ curl_opensocket_callback opensocketcb;
+ curl_seek_callback seekcb;
+ curl_sshkeycallback ssh_keycb;
+ void *interleavecb;
+ curl_chunk_bgn_callback chunk_bgn_cb;
+ curl_chunk_end_callback chunk_end_cb;
+ curl_fnmatch_callback fnmatch_cb;
+ curl_closesocket_callback closesocketcb;
+ curl_xferinfo_callback xferinfocb;
+ char *stringpointerextra="moooo";
+ struct curl_slist *slist=NULL;
+ struct curl_httppost *httppost=NULL;
+ FILE *stream = stderr;
dep = curl_easy_init();
share = curl_share_init();
curl = curl_easy_init();
@@ -70,11 +95,11 @@ int test(char *URL)
(void)curl_easy_setopt(curl, CURLOPT_RANGE, NULL);
(void)curl_easy_setopt(curl, CURLOPT_READDATA, &object);
(void)curl_easy_setopt(curl, CURLOPT_READDATA, NULL);
- (void)curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, &object);
+ (void)curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errorbuffer);
(void)curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, NULL);
- (void)curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &func);
+ (void)curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writecb);
(void)curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, NULL);
- (void)curl_easy_setopt(curl, CURLOPT_READFUNCTION, &func);
+ (void)curl_easy_setopt(curl, CURLOPT_READFUNCTION, readcb);
(void)curl_easy_setopt(curl, CURLOPT_READFUNCTION, NULL);
(void)curl_easy_setopt(curl, CURLOPT_TIMEOUT, 0L);
(void)curl_easy_setopt(curl, CURLOPT_TIMEOUT, 22L);
@@ -84,7 +109,7 @@ int test(char *URL)
(void)curl_easy_setopt(curl, CURLOPT_INFILESIZE, 22L);
(void)curl_easy_setopt(curl, CURLOPT_INFILESIZE, LO);
(void)curl_easy_setopt(curl, CURLOPT_INFILESIZE, HI);
- (void)curl_easy_setopt(curl, CURLOPT_POSTFIELDS, &object);
+ (void)curl_easy_setopt(curl, CURLOPT_POSTFIELDS, stringpointerextra);
(void)curl_easy_setopt(curl, CURLOPT_POSTFIELDS, NULL);
(void)curl_easy_setopt(curl, CURLOPT_REFERER, "string");
(void)curl_easy_setopt(curl, CURLOPT_REFERER, NULL);
@@ -106,9 +131,9 @@ int test(char *URL)
(void)curl_easy_setopt(curl, CURLOPT_RESUME_FROM, HI);
(void)curl_easy_setopt(curl, CURLOPT_COOKIE, "string");
(void)curl_easy_setopt(curl, CURLOPT_COOKIE, NULL);
- (void)curl_easy_setopt(curl, CURLOPT_HTTPHEADER, &object);
+ (void)curl_easy_setopt(curl, CURLOPT_HTTPHEADER, slist);
(void)curl_easy_setopt(curl, CURLOPT_HTTPHEADER, NULL);
- (void)curl_easy_setopt(curl, CURLOPT_HTTPPOST, &object);
+ (void)curl_easy_setopt(curl, CURLOPT_HTTPPOST, httppost);
(void)curl_easy_setopt(curl, CURLOPT_HTTPPOST, NULL);
(void)curl_easy_setopt(curl, CURLOPT_SSLCERT, "string");
(void)curl_easy_setopt(curl, CURLOPT_SSLCERT, NULL);
@@ -118,7 +143,7 @@ int test(char *URL)
(void)curl_easy_setopt(curl, CURLOPT_CRLF, 22L);
(void)curl_easy_setopt(curl, CURLOPT_CRLF, LO);
(void)curl_easy_setopt(curl, CURLOPT_CRLF, HI);
- (void)curl_easy_setopt(curl, CURLOPT_QUOTE, &object);
+ (void)curl_easy_setopt(curl, CURLOPT_QUOTE, slist);
(void)curl_easy_setopt(curl, CURLOPT_QUOTE, NULL);
(void)curl_easy_setopt(curl, CURLOPT_HEADERDATA, &object);
(void)curl_easy_setopt(curl, CURLOPT_HEADERDATA, NULL);
@@ -138,9 +163,9 @@ int test(char *URL)
(void)curl_easy_setopt(curl, CURLOPT_TIMEVALUE, HI);
(void)curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "string");
(void)curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, NULL);
- (void)curl_easy_setopt(curl, CURLOPT_STDERR, &object);
+ (void)curl_easy_setopt(curl, CURLOPT_STDERR, stream);
(void)curl_easy_setopt(curl, CURLOPT_STDERR, NULL);
- (void)curl_easy_setopt(curl, CURLOPT_POSTQUOTE, &object);
+ (void)curl_easy_setopt(curl, CURLOPT_POSTQUOTE, slist);
(void)curl_easy_setopt(curl, CURLOPT_POSTQUOTE, NULL);
(void)curl_easy_setopt(curl, CURLOPT_OBSOLETE40, &object);
(void)curl_easy_setopt(curl, CURLOPT_OBSOLETE40, NULL);
@@ -196,7 +221,7 @@ int test(char *URL)
(void)curl_easy_setopt(curl, CURLOPT_PUT, 22L);
(void)curl_easy_setopt(curl, CURLOPT_PUT, LO);
(void)curl_easy_setopt(curl, CURLOPT_PUT, HI);
- (void)curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, &func);
+ (void)curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, progresscb);
(void)curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, NULL);
(void)curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, &object);
(void)curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, NULL);
@@ -234,7 +259,7 @@ int test(char *URL)
(void)curl_easy_setopt(curl, CURLOPT_FILETIME, 22L);
(void)curl_easy_setopt(curl, CURLOPT_FILETIME, LO);
(void)curl_easy_setopt(curl, CURLOPT_FILETIME, HI);
- (void)curl_easy_setopt(curl, CURLOPT_TELNETOPTIONS, &object);
+ (void)curl_easy_setopt(curl, CURLOPT_TELNETOPTIONS, slist);
(void)curl_easy_setopt(curl, CURLOPT_TELNETOPTIONS, NULL);
(void)curl_easy_setopt(curl, CURLOPT_MAXCONNECTS, 0L);
(void)curl_easy_setopt(curl, CURLOPT_MAXCONNECTS, 22L);
@@ -260,7 +285,7 @@ int test(char *URL)
(void)curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 22L);
(void)curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, LO);
(void)curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, HI);
- (void)curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, &func);
+ (void)curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, headercb);
(void)curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, NULL);
(void)curl_easy_setopt(curl, CURLOPT_HTTPGET, 0L);
(void)curl_easy_setopt(curl, CURLOPT_HTTPGET, 22L);
@@ -302,9 +327,9 @@ int test(char *URL)
(void)curl_easy_setopt(curl, CURLOPT_DNS_CACHE_TIMEOUT, 22L);
(void)curl_easy_setopt(curl, CURLOPT_DNS_CACHE_TIMEOUT, LO);
(void)curl_easy_setopt(curl, CURLOPT_DNS_CACHE_TIMEOUT, HI);
- (void)curl_easy_setopt(curl, CURLOPT_PREQUOTE, &object);
+ (void)curl_easy_setopt(curl, CURLOPT_PREQUOTE, slist);
(void)curl_easy_setopt(curl, CURLOPT_PREQUOTE, NULL);
- (void)curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, &func);
+ (void)curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, debugcb);
(void)curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, NULL);
(void)curl_easy_setopt(curl, CURLOPT_DEBUGDATA, &object);
(void)curl_easy_setopt(curl, CURLOPT_DEBUGDATA, NULL);
@@ -332,7 +357,7 @@ int test(char *URL)
(void)curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, NULL);
(void)curl_easy_setopt(curl, CURLOPT_PRIVATE, &object);
(void)curl_easy_setopt(curl, CURLOPT_PRIVATE, NULL);
- (void)curl_easy_setopt(curl, CURLOPT_HTTP200ALIASES, &object);
+ (void)curl_easy_setopt(curl, CURLOPT_HTTP200ALIASES, slist);
(void)curl_easy_setopt(curl, CURLOPT_HTTP200ALIASES, NULL);
(void)curl_easy_setopt(curl, CURLOPT_UNRESTRICTED_AUTH, 0L);
(void)curl_easy_setopt(curl, CURLOPT_UNRESTRICTED_AUTH, 22L);
@@ -346,7 +371,7 @@ int test(char *URL)
(void)curl_easy_setopt(curl, CURLOPT_HTTPAUTH, 22L);
(void)curl_easy_setopt(curl, CURLOPT_HTTPAUTH, LO);
(void)curl_easy_setopt(curl, CURLOPT_HTTPAUTH, HI);
- (void)curl_easy_setopt(curl, CURLOPT_SSL_CTX_FUNCTION, &func);
+ (void)curl_easy_setopt(curl, CURLOPT_SSL_CTX_FUNCTION, ssl_ctx_cb);
(void)curl_easy_setopt(curl, CURLOPT_SSL_CTX_FUNCTION, NULL);
(void)curl_easy_setopt(curl, CURLOPT_SSL_CTX_DATA, &object);
(void)curl_easy_setopt(curl, CURLOPT_SSL_CTX_DATA, NULL);
@@ -396,7 +421,7 @@ int test(char *URL)
(void)curl_easy_setopt(curl, CURLOPT_FTPSSLAUTH, 22L);
(void)curl_easy_setopt(curl, CURLOPT_FTPSSLAUTH, LO);
(void)curl_easy_setopt(curl, CURLOPT_FTPSSLAUTH, HI);
- (void)curl_easy_setopt(curl, CURLOPT_IOCTLFUNCTION, &func);
+ (void)curl_easy_setopt(curl, CURLOPT_IOCTLFUNCTION, ioctlcb);
(void)curl_easy_setopt(curl, CURLOPT_IOCTLFUNCTION, NULL);
(void)curl_easy_setopt(curl, CURLOPT_IOCTLDATA, &object);
(void)curl_easy_setopt(curl, CURLOPT_IOCTLDATA, NULL);
@@ -428,11 +453,11 @@ int test(char *URL)
(void)curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 22L);
(void)curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, LO);
(void)curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, HI);
- (void)curl_easy_setopt(curl, CURLOPT_CONV_FROM_NETWORK_FUNCTION, &func);
+ (void)curl_easy_setopt(curl, CURLOPT_CONV_FROM_NETWORK_FUNCTION, conv_from_network_cb);
(void)curl_easy_setopt(curl, CURLOPT_CONV_FROM_NETWORK_FUNCTION, NULL);
- (void)curl_easy_setopt(curl, CURLOPT_CONV_TO_NETWORK_FUNCTION, &func);
+ (void)curl_easy_setopt(curl, CURLOPT_CONV_TO_NETWORK_FUNCTION, conv_to_network_cb);
(void)curl_easy_setopt(curl, CURLOPT_CONV_TO_NETWORK_FUNCTION, NULL);
- (void)curl_easy_setopt(curl, CURLOPT_CONV_FROM_UTF8_FUNCTION, &func);
+ (void)curl_easy_setopt(curl, CURLOPT_CONV_FROM_UTF8_FUNCTION, conv_from_utf8_cb);
(void)curl_easy_setopt(curl, CURLOPT_CONV_FROM_UTF8_FUNCTION, NULL);
(void)curl_easy_setopt(curl, CURLOPT_MAX_SEND_SPEED_LARGE, OFF_NO);
(void)curl_easy_setopt(curl, CURLOPT_MAX_SEND_SPEED_LARGE, OFF_VAL);
@@ -442,7 +467,7 @@ int test(char *URL)
(void)curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, OFF_LO);
(void)curl_easy_setopt(curl, CURLOPT_FTP_ALTERNATIVE_TO_USER, "string");
(void)curl_easy_setopt(curl, CURLOPT_FTP_ALTERNATIVE_TO_USER, NULL);
- (void)curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, &func);
+ (void)curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, sockoptcb);
(void)curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, NULL);
(void)curl_easy_setopt(curl, CURLOPT_SOCKOPTDATA, &object);
(void)curl_easy_setopt(curl, CURLOPT_SOCKOPTDATA, NULL);
@@ -492,17 +517,17 @@ int test(char *URL)
(void)curl_easy_setopt(curl, CURLOPT_POSTREDIR, HI);
(void)curl_easy_setopt(curl, CURLOPT_SSH_HOST_PUBLIC_KEY_MD5, "string");
(void)curl_easy_setopt(curl, CURLOPT_SSH_HOST_PUBLIC_KEY_MD5, NULL);
- (void)curl_easy_setopt(curl, CURLOPT_OPENSOCKETFUNCTION, &func);
+ (void)curl_easy_setopt(curl, CURLOPT_OPENSOCKETFUNCTION, opensocketcb);
(void)curl_easy_setopt(curl, CURLOPT_OPENSOCKETFUNCTION, NULL);
(void)curl_easy_setopt(curl, CURLOPT_OPENSOCKETDATA, &object);
(void)curl_easy_setopt(curl, CURLOPT_OPENSOCKETDATA, NULL);
- (void)curl_easy_setopt(curl, CURLOPT_COPYPOSTFIELDS, &object);
+ (void)curl_easy_setopt(curl, CURLOPT_COPYPOSTFIELDS, stringpointerextra);
(void)curl_easy_setopt(curl, CURLOPT_COPYPOSTFIELDS, NULL);
(void)curl_easy_setopt(curl, CURLOPT_PROXY_TRANSFER_MODE, 0L);
(void)curl_easy_setopt(curl, CURLOPT_PROXY_TRANSFER_MODE, 22L);
(void)curl_easy_setopt(curl, CURLOPT_PROXY_TRANSFER_MODE, LO);
(void)curl_easy_setopt(curl, CURLOPT_PROXY_TRANSFER_MODE, HI);
- (void)curl_easy_setopt(curl, CURLOPT_SEEKFUNCTION, &func);
+ (void)curl_easy_setopt(curl, CURLOPT_SEEKFUNCTION, seekcb);
(void)curl_easy_setopt(curl, CURLOPT_SEEKFUNCTION, NULL);
(void)curl_easy_setopt(curl, CURLOPT_SEEKDATA, &object);
(void)curl_easy_setopt(curl, CURLOPT_SEEKDATA, NULL);
@@ -548,13 +573,13 @@ int test(char *URL)
(void)curl_easy_setopt(curl, CURLOPT_REDIR_PROTOCOLS, HI);
(void)curl_easy_setopt(curl, CURLOPT_SSH_KNOWNHOSTS, "string");
(void)curl_easy_setopt(curl, CURLOPT_SSH_KNOWNHOSTS, NULL);
- (void)curl_easy_setopt(curl, CURLOPT_SSH_KEYFUNCTION, &func);
+ (void)curl_easy_setopt(curl, CURLOPT_SSH_KEYFUNCTION, ssh_keycb);
(void)curl_easy_setopt(curl, CURLOPT_SSH_KEYFUNCTION, NULL);
(void)curl_easy_setopt(curl, CURLOPT_SSH_KEYDATA, &object);
(void)curl_easy_setopt(curl, CURLOPT_SSH_KEYDATA, NULL);
(void)curl_easy_setopt(curl, CURLOPT_MAIL_FROM, "string");
(void)curl_easy_setopt(curl, CURLOPT_MAIL_FROM, NULL);
- (void)curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, &object);
+ (void)curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, slist);
(void)curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, NULL);
(void)curl_easy_setopt(curl, CURLOPT_FTP_USE_PRET, 0L);
(void)curl_easy_setopt(curl, CURLOPT_FTP_USE_PRET, 22L);
@@ -580,23 +605,23 @@ int test(char *URL)
(void)curl_easy_setopt(curl, CURLOPT_RTSP_SERVER_CSEQ, HI);
(void)curl_easy_setopt(curl, CURLOPT_INTERLEAVEDATA, &object);
(void)curl_easy_setopt(curl, CURLOPT_INTERLEAVEDATA, NULL);
- (void)curl_easy_setopt(curl, CURLOPT_INTERLEAVEFUNCTION, &func);
+ (void)curl_easy_setopt(curl, CURLOPT_INTERLEAVEFUNCTION, interleavecb);
(void)curl_easy_setopt(curl, CURLOPT_INTERLEAVEFUNCTION, NULL);
(void)curl_easy_setopt(curl, CURLOPT_WILDCARDMATCH, 0L);
(void)curl_easy_setopt(curl, CURLOPT_WILDCARDMATCH, 22L);
(void)curl_easy_setopt(curl, CURLOPT_WILDCARDMATCH, LO);
(void)curl_easy_setopt(curl, CURLOPT_WILDCARDMATCH, HI);
- (void)curl_easy_setopt(curl, CURLOPT_CHUNK_BGN_FUNCTION, &func);
+ (void)curl_easy_setopt(curl, CURLOPT_CHUNK_BGN_FUNCTION, chunk_bgn_cb);
(void)curl_easy_setopt(curl, CURLOPT_CHUNK_BGN_FUNCTION, NULL);
- (void)curl_easy_setopt(curl, CURLOPT_CHUNK_END_FUNCTION, &func);
+ (void)curl_easy_setopt(curl, CURLOPT_CHUNK_END_FUNCTION, chunk_end_cb);
(void)curl_easy_setopt(curl, CURLOPT_CHUNK_END_FUNCTION, NULL);
- (void)curl_easy_setopt(curl, CURLOPT_FNMATCH_FUNCTION, &func);
+ (void)curl_easy_setopt(curl, CURLOPT_FNMATCH_FUNCTION, fnmatch_cb);
(void)curl_easy_setopt(curl, CURLOPT_FNMATCH_FUNCTION, NULL);
(void)curl_easy_setopt(curl, CURLOPT_CHUNK_DATA, &object);
(void)curl_easy_setopt(curl, CURLOPT_CHUNK_DATA, NULL);
(void)curl_easy_setopt(curl, CURLOPT_FNMATCH_DATA, &object);
(void)curl_easy_setopt(curl, CURLOPT_FNMATCH_DATA, NULL);
- (void)curl_easy_setopt(curl, CURLOPT_RESOLVE, &object);
+ (void)curl_easy_setopt(curl, CURLOPT_RESOLVE, slist);
(void)curl_easy_setopt(curl, CURLOPT_RESOLVE, NULL);
(void)curl_easy_setopt(curl, CURLOPT_TLSAUTH_USERNAME, "string");
(void)curl_easy_setopt(curl, CURLOPT_TLSAUTH_USERNAME, NULL);
@@ -608,7 +633,7 @@ int test(char *URL)
(void)curl_easy_setopt(curl, CURLOPT_TRANSFER_ENCODING, 22L);
(void)curl_easy_setopt(curl, CURLOPT_TRANSFER_ENCODING, LO);
(void)curl_easy_setopt(curl, CURLOPT_TRANSFER_ENCODING, HI);
- (void)curl_easy_setopt(curl, CURLOPT_CLOSESOCKETFUNCTION, &func);
+ (void)curl_easy_setopt(curl, CURLOPT_CLOSESOCKETFUNCTION, closesocketcb);
(void)curl_easy_setopt(curl, CURLOPT_CLOSESOCKETFUNCTION, NULL);
(void)curl_easy_setopt(curl, CURLOPT_CLOSESOCKETDATA, &object);
(void)curl_easy_setopt(curl, CURLOPT_CLOSESOCKETDATA, NULL);
@@ -644,7 +669,7 @@ int test(char *URL)
(void)curl_easy_setopt(curl, CURLOPT_SASL_IR, 22L);
(void)curl_easy_setopt(curl, CURLOPT_SASL_IR, LO);
(void)curl_easy_setopt(curl, CURLOPT_SASL_IR, HI);
- (void)curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, &func);
+ (void)curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, xferinfocb);
(void)curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, NULL);
(void)curl_easy_setopt(curl, CURLOPT_XOAUTH2_BEARER, "string");
(void)curl_easy_setopt(curl, CURLOPT_XOAUTH2_BEARER, NULL);
@@ -668,7 +693,7 @@ int test(char *URL)
(void)curl_easy_setopt(curl, CURLOPT_EXPECT_100_TIMEOUT_MS, 22L);
(void)curl_easy_setopt(curl, CURLOPT_EXPECT_100_TIMEOUT_MS, LO);
(void)curl_easy_setopt(curl, CURLOPT_EXPECT_100_TIMEOUT_MS, HI);
- (void)curl_easy_setopt(curl, CURLOPT_PROXYHEADER, &object);
+ (void)curl_easy_setopt(curl, CURLOPT_PROXYHEADER, slist);
(void)curl_easy_setopt(curl, CURLOPT_PROXYHEADER, NULL);
(void)curl_easy_setopt(curl, CURLOPT_HEADEROPT, 0L);
(void)curl_easy_setopt(curl, CURLOPT_HEADEROPT, 22L);
diff --git a/tests/libtest/mk-lib1521.pl b/tests/libtest/mk-lib1521.pl
index 60c65f57e..7b31c0b28 100644
--- a/tests/libtest/mk-lib1521.pl
+++ b/tests/libtest/mk-lib1521.pl
@@ -78,6 +78,31 @@ int test(char *URL)
CURL *dep;
CURLSH *share;
(void)URL; /* not used */
+ char errorbuffer[CURL_ERROR_SIZE];
+ curl_write_callback writecb;
+ curl_read_callback readcb;
+ curl_progress_callback progresscb;
+ curl_write_callback headercb;
+ curl_debug_callback debugcb;
+ curl_ssl_ctx_callback ssl_ctx_cb;
+ curl_ioctl_callback ioctlcb;
+ void *conv_from_network_cb;
+ void *conv_to_network_cb;
+ void *conv_from_utf8_cb;
+ curl_sockopt_callback sockoptcb;
+ curl_opensocket_callback opensocketcb;
+ curl_seek_callback seekcb;
+ curl_sshkeycallback ssh_keycb;
+ void *interleavecb;
+ curl_chunk_bgn_callback chunk_bgn_cb;
+ curl_chunk_end_callback chunk_end_cb;
+ curl_fnmatch_callback fnmatch_cb;
+ curl_closesocket_callback closesocketcb;
+ curl_xferinfo_callback xferinfocb;
+ char *stringpointerextra="moooo";
+ struct curl_slist *slist=NULL;
+ struct curl_httppost *httppost=NULL;
+ FILE *stream = stderr;
dep = curl_easy_init();
share = curl_share_init();
curl = curl_easy_init();
@@ -106,16 +131,46 @@ while(<STDIN>) {
if($name =~ /DEPENDS/) {
print "${pref} dep);\n";
}
- elsif($name =~ /SHARE/) {
+ elsif($name =~ "SHARE") {
print "${pref} share);\n";
}
+ elsif($name eq "ERRORBUFFER") {
+ print "${pref} errorbuffer);\n";
+ }
+ elsif(($name eq "POSTFIELDS") ||
+ ($name eq "COPYPOSTFIELDS")) {
+ print "${pref} stringpointerextra);\n";
+ }
+ elsif(($name eq "HTTPHEADER") ||
+ ($name eq "POSTQUOTE") ||
+ ($name eq "PREQUOTE") ||
+ ($name eq "HTTP200ALIASES") ||
+ ($name eq "TELNETOPTIONS") ||
+ ($name eq "MAIL_RCPT") ||
+ ($name eq "RESOLVE") ||
+ ($name eq "PROXYHEADER") ||
+ ($name eq "QUOTE")) {
+ print "${pref} slist);\n";
+ }
+ elsif($name eq "HTTPPOST") {
+ print "${pref} httppost);\n";
+ }
+ elsif($name eq "STDERR") {
+ print "${pref} stream);\n";
+ }
else {
print "${pref} &object);\n";
}
print "${pref} NULL);\n";
}
elsif($type eq "FUNCTIONPOINT") {
- print "${pref} &func);\n";
+ if($name =~ /([^ ]*)FUNCTION/) {
+ my $l=lc($1);
+ print "${pref} ${l}cb);\n";
+ }
+ else {
+ print "${pref} &func);\n";
+ }
print "${pref} NULL);\n";
}
elsif($type eq "OFF_T") {