← Commit list

25cbc2f79a

Viktor Szakats
Viktor Szakats
2024-05-12
SUCCESS Duration: 162s

Subject

tests: make the unit test result type `CURLcode`

Binary

Download Binary (821 KB)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

$ git checkout -f 25cbc2f79a3aedf38e2177fe8cb7bfd1652d97b2
Previous HEAD position was a35bbe8977 lib: bump hash sizes to `size_t`
HEAD is now at 25cbc2f79a tests: make the unit test result type `CURLcode`

$ git clean -fdx
Removing Makefile
Removing Makefile.in
Removing aclocal.m4
Removing autom4te.cache/
Removing compile
Removing config.guess
Removing config.log
Removing config.status
Removing config.sub
Removing configure
Removing curl-config
Removing depcomp
Removing docs/Makefile
Removing docs/Makefile.in
Removing docs/cmdline-opts/Makefile
Removing docs/cmdline-opts/Makefile.in
Removing docs/examples/.deps/
Removing docs/examples/Makefile
Removing docs/examples/Makefile.in
Removing docs/libcurl/Makefile
Removing docs/libcurl/Makefile.in
Removing docs/libcurl/opts/Makefile
Removing docs/libcurl/opts/Makefile.in
Removing include/Makefile
Removing include/Makefile.in
Removing include/curl/Makefile
Removing include/curl/Makefile.in
Removing install-sh
Removing lib/.deps/
Removing lib/.dirstamp
Removing lib/.libs/
Removing lib/Makefile
Removing lib/Makefile.in
Removing lib/base64.o
Removing lib/curl_config.h
Removing lib/curl_config.h.in
Removing lib/curl_multibyte.o
Removing lib/dynbuf.o
Removing lib/libcurl.la
Removing lib/libcurl.vers
Removing lib/libcurl_la-altsvc.lo
Removing lib/libcurl_la-altsvc.o
Removing lib/libcurl_la-amigaos.lo
Removing lib/libcurl_la-amigaos.o
Removing lib/libcurl_la-asyn-ares.lo
Removing lib/libcurl_la-asyn-ares.o
Removing lib/libcurl_la-asyn-thread.lo
Removing lib/libcurl_la-asyn-thread.o
Removing lib/libcurl_la-base64.lo
Removing lib/libcurl_la-base64.o
Removing lib/libcurl_la-bufq.lo
Removing lib/libcurl_la-bufq.o
Removing lib/libcurl_la-bufref.lo
Removing lib/libcurl_la-bufref.o
Removing lib/libcurl_la-c-hyper.lo
Removing lib/libcurl_la-c-hyper.o
Removing lib/libcurl_la-cf-h1-proxy.lo
Removing lib/libcurl_la-cf-h1-proxy.o
Removing lib/libcurl_la-cf-h2-proxy.lo
Removing lib/libcurl_la-cf-h2-proxy.o
Removing lib/libcurl_la-cf-haproxy.lo
Removing lib/libcurl_la-cf-haproxy.o
Removing lib/libcurl_la-cf-https-connect.lo
Removing lib/libcurl_la-cf-https-connect.o
Removing lib/libcurl_la-cf-socket.lo
Removing lib/libcurl_la-cf-socket.o
Removing lib/libcurl_la-cfilters.lo
Removing lib/libcurl_la-cfilters.o
Removing lib/libcurl_la-conncache.lo
Removing lib/libcurl_la-conncache.o
Removing lib/libcurl_la-connect.lo
Removing lib/libcurl_la-connect.o
Removing lib/libcurl_la-content_encoding.lo
Removing lib/libcurl_la-content_encoding.o
Removing lib/libcurl_la-cookie.lo
Removing lib/libcurl_la-cookie.o
Removing lib/libcurl_la-curl_addrinfo.lo
Removing lib/libcurl_la-curl_addrinfo.o
Removing lib/libcurl_la-curl_des.lo
Removing lib/libcurl_la-curl_des.o
Removing lib/libcurl_la-curl_endian.lo
Removing lib/libcurl_la-curl_endian.o
Removing lib/libcurl_la-curl_fnmatch.lo
Removing lib/libcurl_la-curl_fnmatch.o
Removing lib/libcurl_la-curl_get_line.lo
Removing lib/libcurl_la-curl_get_line.o
Removing lib/libcurl_la-curl_gethostname.lo
Removing lib/libcurl_la-curl_gethostname.o
Removing lib/libcurl_la-curl_gssapi.lo
Removing lib/libcurl_la-curl_gssapi.o
Removing lib/libcurl_la-curl_memrchr.lo
Removing lib/libcurl_la-curl_memrchr.o
Removing lib/libcurl_la-curl_multibyte.lo
Removing lib/libcurl_la-curl_multibyte.o
Removing lib/libcurl_la-curl_ntlm_core.lo
Removing lib/libcurl_la-curl_ntlm_core.o
Removing lib/libcurl_la-curl_path.lo
Removing lib/libcurl_la-curl_path.o
Removing lib/libcurl_la-curl_range.lo
Removing lib/libcurl_la-curl_range.o
Removing lib/libcurl_la-curl_rtmp.lo
Removing lib/libcurl_la-curl_rtmp.o
Removing lib/libcurl_la-curl_sasl.lo
Removing lib/libcurl_la-curl_sasl.o
Removing lib/libcurl_la-curl_sha512_256.lo
Removing lib/libcurl_la-curl_sha512_256.o
Removing lib/libcurl_la-curl_sspi.lo
Removing lib/libcurl_la-curl_sspi.o
Removing lib/libcurl_la-curl_threads.lo
Removing lib/libcurl_la-curl_threads.o
Removing lib/libcurl_la-curl_trc.lo
Removing lib/libcurl_la-curl_trc.o
Removing lib/libcurl_la-cw-out.lo
Removing lib/libcurl_la-cw-out.o
Removing lib/libcurl_la-dict.lo
Removing lib/libcurl_la-dict.o
Removing lib/libcurl_la-dllmain.lo
Removing lib/libcurl_la-dllmain.o
Removing lib/libcurl_la-doh.lo
Removing lib/libcurl_la-doh.o
Removing lib/libcurl_la-dynbuf.lo
Removing lib/libcurl_la-dynbuf.o
Removing lib/libcurl_la-dynhds.lo
Removing lib/libcurl_la-dynhds.o
Removing lib/libcurl_la-easy.lo
Removing lib/libcurl_la-easy.o
Removing lib/libcurl_la-easygetopt.lo
Removing lib/libcurl_la-easygetopt.o
Removing lib/libcurl_la-easyoptions.lo
Removing lib/libcurl_la-easyoptions.o
Removing lib/libcurl_la-escape.lo
Removing lib/libcurl_la-escape.o
Removing lib/libcurl_la-file.lo
Removing lib/libcurl_la-file.o
Removing lib/libcurl_la-fileinfo.lo
Removing lib/libcurl_la-fileinfo.o
Removing lib/libcurl_la-fopen.lo
Removing lib/libcurl_la-fopen.o
Removing lib/libcurl_la-formdata.lo
Removing lib/libcurl_la-formdata.o
Removing lib/libcurl_la-ftp.lo
Removing lib/libcurl_la-ftp.o
Removing lib/libcurl_la-ftplistparser.lo
Removing lib/libcurl_la-ftplistparser.o
Removing lib/libcurl_la-getenv.lo
Removing lib/libcurl_la-getenv.o
Removing lib/libcurl_la-getinfo.lo
Removing lib/libcurl_la-getinfo.o
Removing lib/libcurl_la-gopher.lo
Removing lib/libcurl_la-gopher.o
Removing lib/libcurl_la-hash.lo
Removing lib/libcurl_la-hash.o
Removing lib/libcurl_la-headers.lo
Removing lib/libcurl_la-headers.o
Removing lib/libcurl_la-hmac.lo
Removing lib/libcurl_la-hmac.o
Removing lib/libcurl_la-hostasyn.lo
Removing lib/libcurl_la-hostasyn.o
Removing lib/libcurl_la-hostip.lo
Removing lib/libcurl_la-hostip.o
Removing lib/libcurl_la-hostip4.lo
Removing lib/libcurl_la-hostip4.o
Removing lib/libcurl_la-hostip6.lo
Removing lib/libcurl_la-hostip6.o
Removing lib/libcurl_la-hostsyn.lo
Removing lib/libcurl_la-hostsyn.o
Removing lib/libcurl_la-hsts.lo
Removing lib/libcurl_la-hsts.o
Removing lib/libcurl_la-http.lo
Removing lib/libcurl_la-http.o
Removing lib/libcurl_la-http1.lo
Removing lib/libcurl_la-http1.o
Removing lib/libcurl_la-http2.lo
Removing lib/libcurl_la-http2.o
Removing lib/libcurl_la-http_aws_sigv4.lo
Removing lib/libcurl_la-http_aws_sigv4.o
Removing lib/libcurl_la-http_chunks.lo
Removing lib/libcurl_la-http_chunks.o
Removing lib/libcurl_la-http_digest.lo
Removing lib/libcurl_la-http_digest.o
Removing lib/libcurl_la-http_negotiate.lo
Removing lib/libcurl_la-http_negotiate.o
Removing lib/libcurl_la-http_ntlm.lo
Removing lib/libcurl_la-http_ntlm.o
Removing lib/libcurl_la-http_proxy.lo
Removing lib/libcurl_la-http_proxy.o
Removing lib/libcurl_la-idn.lo
Removing lib/libcurl_la-idn.o
Removing lib/libcurl_la-if2ip.lo
Removing lib/libcurl_la-if2ip.o
Removing lib/libcurl_la-imap.lo
Removing lib/libcurl_la-imap.o
Removing lib/libcurl_la-inet_ntop.lo
Removing lib/libcurl_la-inet_ntop.o
Removing lib/libcurl_la-inet_pton.lo
Removing lib/libcurl_la-inet_pton.o
Removing lib/libcurl_la-krb5.lo
Removing lib/libcurl_la-krb5.o
Removing lib/libcurl_la-ldap.lo
Removing lib/libcurl_la-ldap.o
Removing lib/libcurl_la-llist.lo
Removing lib/libcurl_la-llist.o
Removing lib/libcurl_la-macos.lo
Removing lib/libcurl_la-macos.o
Removing lib/libcurl_la-md4.lo
Removing lib/libcurl_la-md4.o
Removing lib/libcurl_la-md5.lo
Removing lib/libcurl_la-md5.o
Removing lib/libcurl_la-memdebug.lo
Removing lib/libcurl_la-memdebug.o
Removing lib/libcurl_la-mime.lo
Removing lib/libcurl_la-mime.o
Removing lib/libcurl_la-mprintf.lo
Removing lib/libcurl_la-mprintf.o
Removing lib/libcurl_la-mqtt.lo
Removing lib/libcurl_la-mqtt.o
Removing lib/libcurl_la-multi.lo
Removing lib/libcurl_la-multi.o
Removing lib/libcurl_la-netrc.lo
Removing lib/libcurl_la-netrc.o
Removing lib/libcurl_la-nonblock.lo
Removing lib/libcurl_la-nonblock.o
Removing lib/libcurl_la-noproxy.lo
Removing lib/libcurl_la-noproxy.o
Removing lib/libcurl_la-openldap.lo
Removing lib/libcurl_la-openldap.o
Removing lib/libcurl_la-parsedate.lo
Removing lib/libcurl_la-parsedate.o
Removing lib/libcurl_la-pingpong.lo
Removing lib/libcurl_la-pingpong.o
Removing lib/libcurl_la-pop3.lo
Removing lib/libcurl_la-pop3.o
Removing lib/libcurl_la-progress.lo
Removing lib/libcurl_la-progress.o
Removing lib/libcurl_la-psl.lo
Removing lib/libcurl_la-psl.o
Removing lib/libcurl_la-rand.lo
Removing lib/libcurl_la-rand.o
Removing lib/libcurl_la-rename.lo
Removing lib/libcurl_la-rename.o
Removing lib/libcurl_la-request.lo
Removing lib/libcurl_la-request.o
Removing lib/libcurl_la-rtsp.lo
Removing lib/libcurl_la-rtsp.o
Removing lib/libcurl_la-select.lo
Removing lib/libcurl_la-select.o
Removing lib/libcurl_la-sendf.lo
Removing lib/libcurl_la-sendf.o
Removing lib/libcurl_la-setopt.lo
Removing lib/libcurl_la-setopt.o
Removing lib/libcurl_la-sha256.lo
Removing lib/libcurl_la-sha256.o
Removing lib/libcurl_la-share.lo
Removing lib/libcurl_la-share.o
Removing lib/libcurl_la-slist.lo
Removing lib/libcurl_la-slist.o
Removing lib/libcurl_la-smb.lo
Removing lib/libcurl_la-smb.o
Removing lib/libcurl_la-smtp.lo
Removing lib/libcurl_la-smtp.o
Removing lib/libcurl_la-socketpair.lo
Removing lib/libcurl_la-socketpair.o
Removing lib/libcurl_la-socks.lo
Removing lib/libcurl_la-socks.o
Removing lib/libcurl_la-socks_gssapi.lo
Removing lib/libcurl_la-socks_gssapi.o
Removing lib/libcurl_la-socks_sspi.lo
Removing lib/libcurl_la-socks_sspi.o
Removing lib/libcurl_la-speedcheck.lo
Removing lib/libcurl_la-speedcheck.o
Removing lib/libcurl_la-splay.lo
Removing lib/libcurl_la-splay.o
Removing lib/libcurl_la-strcase.lo
Removing lib/libcurl_la-strcase.o
Removing lib/libcurl_la-strdup.lo
Removing lib/libcurl_la-strdup.o
Removing lib/libcurl_la-strerror.lo
Removing lib/libcurl_la-strerror.o
Removing lib/libcurl_la-strtok.lo
Removing lib/libcurl_la-strtok.o
Removing lib/libcurl_la-strtoofft.lo
Removing lib/libcurl_la-strtoofft.o
Removing lib/libcurl_la-system_win32.lo
Removing lib/libcurl_la-system_win32.o
Removing lib/libcurl_la-telnet.lo
Removing lib/libcurl_la-telnet.o
Removing lib/libcurl_la-tftp.lo
Removing lib/libcurl_la-tftp.o
Removing lib/libcurl_la-timediff.lo
Removing lib/libcurl_la-timediff.o
Removing lib/libcurl_la-timeval.lo
Removing lib/libcurl_la-timeval.o
Removing lib/libcurl_la-transfer.lo
Removing lib/libcurl_la-transfer.o
Removing lib/libcurl_la-url.lo
Removing lib/libcurl_la-url.o
Removing lib/libcurl_la-urlapi.lo
Removing lib/libcurl_la-urlapi.o
Removing lib/libcurl_la-version.lo
Removing lib/libcurl_la-version.o
Removing lib/libcurl_la-version_win32.lo
Removing lib/libcurl_la-version_win32.o
Removing lib/libcurl_la-warnless.lo
Removing lib/libcurl_la-warnless.o
Removing lib/libcurl_la-ws.lo
Removing lib/libcurl_la-ws.o
Removing lib/nonblock.o
Removing lib/stamp-h1
Removing lib/strtoofft.o
Removing lib/timediff.o
Removing lib/vauth/.deps/
Removing lib/vauth/.dirstamp
Removing lib/vauth/libcurl_la-cleartext.lo
Removing lib/vauth/libcurl_la-cleartext.o
Removing lib/vauth/libcurl_la-cram.lo
Removing lib/vauth/libcurl_la-cram.o
Removing lib/vauth/libcurl_la-digest.lo
Removing lib/vauth/libcurl_la-digest.o
Removing lib/vauth/libcurl_la-digest_sspi.lo
Removing lib/vauth/libcurl_la-digest_sspi.o
Removing lib/vauth/libcurl_la-gsasl.lo
Removing lib/vauth/libcurl_la-gsasl.o
Removing lib/vauth/libcurl_la-krb5_gssapi.lo
Removing lib/vauth/libcurl_la-krb5_gssapi.o
Removing lib/vauth/libcurl_la-krb5_sspi.lo
Removing lib/vauth/libcurl_la-krb5_sspi.o
Removing lib/vauth/libcurl_la-ntlm.lo
Removing lib/vauth/libcurl_la-ntlm.o
Removing lib/vauth/libcurl_la-ntlm_sspi.lo
Removing lib/vauth/libcurl_la-ntlm_sspi.o
Removing lib/vauth/libcurl_la-oauth2.lo
Removing lib/vauth/libcurl_la-oauth2.o
Removing lib/vauth/libcurl_la-spnego_gssapi.lo
Removing lib/vauth/libcurl_la-spnego_gssapi.o
Removing lib/vauth/libcurl_la-spnego_sspi.lo
Removing lib/vauth/libcurl_la-spnego_sspi.o
Removing lib/vauth/libcurl_la-vauth.lo
Removing lib/vauth/libcurl_la-vauth.o
Removing lib/version_win32.o
Removing lib/vquic/.deps/
Removing lib/vquic/.dirstamp
Removing lib/vquic/libcurl_la-curl_msh3.lo
Removing lib/vquic/libcurl_la-curl_msh3.o
Removing lib/vquic/libcurl_la-curl_ngtcp2.lo
Removing lib/vquic/libcurl_la-curl_ngtcp2.o
Removing lib/vquic/libcurl_la-curl_osslq.lo
Removing lib/vquic/libcurl_la-curl_osslq.o
Removing lib/vquic/libcurl_la-curl_quiche.lo
Removing lib/vquic/libcurl_la-curl_quiche.o
Removing lib/vquic/libcurl_la-vquic-tls.lo
Removing lib/vquic/libcurl_la-vquic-tls.o
Removing lib/vquic/libcurl_la-vquic.lo
Removing lib/vquic/libcurl_la-vquic.o
Removing lib/vssh/.deps/
Removing lib/vssh/.dirstamp
Removing lib/vssh/libcurl_la-libssh.lo
Removing lib/vssh/libcurl_la-libssh.o
Removing lib/vssh/libcurl_la-libssh2.lo
Removing lib/vssh/libcurl_la-libssh2.o
Removing lib/vssh/libcurl_la-wolfssh.lo
Removing lib/vssh/libcurl_la-wolfssh.o
Removing lib/vtls/.deps/
Removing lib/vtls/.dirstamp
Removing lib/vtls/libcurl_la-bearssl.lo
Removing lib/vtls/libcurl_la-bearssl.o
Removing lib/vtls/libcurl_la-cipher_suite.lo
Removing lib/vtls/libcurl_la-cipher_suite.o
Removing lib/vtls/libcurl_la-gtls.lo
Removing lib/vtls/libcurl_la-gtls.o
Removing lib/vtls/libcurl_la-hostcheck.lo
Removing lib/vtls/libcurl_la-hostcheck.o
Removing lib/vtls/libcurl_la-keylog.lo
Removing lib/vtls/libcurl_la-keylog.o
Removing lib/vtls/libcurl_la-mbedtls.lo
Removing lib/vtls/libcurl_la-mbedtls.o
Removing lib/vtls/libcurl_la-mbedtls_threadlock.lo
Removing lib/vtls/libcurl_la-mbedtls_threadlock.o
Removing lib/vtls/libcurl_la-openssl.lo
Removing lib/vtls/libcurl_la-openssl.o
Removing lib/vtls/libcurl_la-rustls.lo
Removing lib/vtls/libcurl_la-rustls.o
Removing lib/vtls/libcurl_la-schannel.lo
Removing lib/vtls/libcurl_la-schannel.o
Removing lib/vtls/libcurl_la-schannel_verify.lo
Removing lib/vtls/libcurl_la-schannel_verify.o
Removing lib/vtls/libcurl_la-sectransp.lo
Removing lib/vtls/libcurl_la-sectransp.o
Removing lib/vtls/libcurl_la-vtls.lo
Removing lib/vtls/libcurl_la-vtls.o
Removing lib/vtls/libcurl_la-wolfssl.lo
Removing lib/vtls/libcurl_la-wolfssl.o
Removing lib/vtls/libcurl_la-x509asn1.lo
Removing lib/vtls/libcurl_la-x509asn1.o
Removing lib/warnless.o
Removing libcurl.pc
Removing libtool
Removing ltmain.sh
Removing m4/libtool.m4
Removing m4/ltoptions.m4
Removing m4/ltsugar.m4
Removing m4/ltversion.m4
Removing m4/lt~obsolete.m4
Removing missing
Removing packages/Makefile
Removing packages/Makefile.in
Removing packages/vms/Makefile
Removing packages/vms/Makefile.in
Removing scripts/Makefile
Removing scripts/Makefile.in
Removing src/.deps/
Removing src/.libs/
Removing src/Makefile
Removing src/Makefile.in
Removing src/curl
Removing src/slist_wc.o
Removing src/tool_binmode.o
Removing src/tool_bname.o
Removing src/tool_cb_dbg.o
Removing src/tool_cb_hdr.o
Removing src/tool_cb_prg.o
Removing src/tool_cb_rea.o
Removing src/tool_cb_see.o
Removing src/tool_cb_wrt.o
Removing src/tool_cfgable.o
Removing src/tool_dirhie.o
Removing src/tool_doswin.o
Removing src/tool_easysrc.o
Removing src/tool_filetime.o
Removing src/tool_findfile.o
Removing src/tool_formparse.o
Removing src/tool_getparam.o
Removing src/tool_getpass.o
Removing src/tool_help.o
Removing src/tool_helpers.o
Removing src/tool_hugehelp.c
Removing src/tool_hugehelp.o
Removing src/tool_ipfs.o
Removing src/tool_libinfo.o
Removing src/tool_listhelp.o
Removing src/tool_main.o
Removing src/tool_msgs.o
Removing src/tool_operate.o
Removing src/tool_operhlp.o
Removing src/tool_paramhlp.o
Removing src/tool_parsecfg.o
Removing src/tool_progress.o
Removing src/tool_setopt.o
Removing src/tool_sleep.o
Removing src/tool_stderr.o
Removing src/tool_strdup.o
Removing src/tool_urlglob.o
Removing src/tool_util.o
Removing src/tool_vms.o
Removing src/tool_writeout.o
Removing src/tool_writeout_json.o
Removing src/tool_xattr.o
Removing src/var.o
Removing tests/Makefile
Removing tests/Makefile.in
Removing tests/certs/Makefile
Removing tests/certs/Makefile.in
Removing tests/certs/scripts/Makefile
Removing tests/certs/scripts/Makefile.in
Removing tests/config
Removing tests/configurehelp.pm
Removing tests/data/Makefile
Removing tests/data/Makefile.in
Removing tests/http/Makefile
Removing tests/http/Makefile.in
Removing tests/http/clients/.deps/
Removing tests/http/clients/Makefile
Removing tests/http/clients/Makefile.in
Removing tests/http/config.ini
Removing tests/libtest/.deps/
Removing tests/libtest/Makefile
Removing tests/libtest/Makefile.in
Removing tests/server/.deps/
Removing tests/server/Makefile
Removing tests/server/Makefile.in
Removing tests/unit/.deps/
Removing tests/unit/Makefile
Removing tests/unit/Makefile.in

$ autoreconf -fi
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
libtoolize: Remember to add 'LT_INIT' to configure.ac.
configure.ac:124: installing './compile'
configure.ac:426: installing './config.guess'
configure.ac:426: installing './config.sub'
configure.ac:124: installing './install-sh'
configure.ac:130: installing './missing'
docs/examples/Makefile.am: installing './depcomp'

$ bash -c find . -name config.guess -exec cp /usr/share/misc/config.guess {} \;

$ bash -c find . -name config.sub -exec cp /usr/share/misc/config.sub {} \;

$ chmod +x configure

$ ./configure --disable-shared --without-ssl --disable-docs
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports nested variables... yes
checking whether to enable debug build options... no
checking whether to enable compiler optimizer... (assumed) yes
checking whether to enable strict compiler warnings... no
checking whether to enable compiler warnings as errors... no
checking whether to enable curl debug memory tracking... no
checking whether to enable hiding of library internal symbols... yes
checking whether to enable c-ares for DNS lookups... no
checking whether to disable dependency on -lrt... (assumed no)
checking whether to enable HTTPSRR support... no
checking whether to enable ECH support... no
checking for path separator... :
checking for sed... /usr/bin/sed
checking for grep... /usr/bin/grep
checking that grep -E works... yes
checking for ar... /usr/bin/ar
checking for a BSD-compatible install... /usr/bin/install -c
checking for gcc... ccache gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether ccache gcc accepts -g... yes
checking for ccache gcc option to enable C11 features... none needed
checking whether ccache gcc understands -c and -o together... yes
checking how to run the C preprocessor... ccache gcc -E
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for stdatomic.h... yes
checking if _Atomic is available... yes
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for code coverage support... no
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of ccache gcc... gcc3
checking curl version... 8.8.0-DEV
checking for httpd... no
checking for apache2... no
checking for apachectl... no
checking for apxs... no
configure: httpd/apache2 not in PATH, http tests disabled
configure: apxs not in PATH, http tests disabled
checking for nghttpx... no
checking for caddy... no
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking if OS is AIX (to define _ALL_SOURCE)... no
checking if _THREAD_SAFE is already defined... no
checking if _THREAD_SAFE is actually needed... no
checking if _THREAD_SAFE is onwards defined... no
checking if _REENTRANT is already defined... no
checking if _REENTRANT is actually needed... no
checking if _REENTRANT is onwards defined... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by ccache gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from ccache gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if ccache gcc supports -fno-rtti -fno-exceptions... no
checking for ccache gcc option to produce PIC... -fPIC -DPIC
checking if ccache gcc PIC flag -fPIC -DPIC works... yes
checking if ccache gcc static flag -static works... yes
checking if ccache gcc supports -c -o file.o... yes
checking if ccache gcc supports -c -o file.o... (cached) yes
checking whether the ccache gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking whether to build shared libraries with -version-info... yes
checking whether to build shared libraries with -no-undefined... no
checking whether to build shared libraries with -mimpure-text... no
checking whether to build shared libraries with PIC... yes
checking whether to build static libraries with PIC... yes
checking whether to build shared libraries only... no
checking whether to build static libraries only... yes
checking for windres... no
checking if cpp -P is needed... yes
checking if cpp -P works... yes
checking if compiler is DEC/Compaq/HP C... no
checking if compiler is HP-UX C... no
checking if compiler is IBM C... no
checking if compiler is Intel C... no
checking if compiler is clang... no
checking if compiler is GNU C... yes
checking compiler version... gcc '1100' (raw: '11')
checking if compiler is SGI MIPSpro C... no
checking if compiler is SGI MIPS C... no
checking if compiler is SunPro C... no
checking if compiler is Tiny C... no
checking whether build target is a native Windows one... no
checking if compiler accepts some basic options... yes
configure: compiler options added: -Werror-implicit-function-declaration 
checking if compiler optimizer assumed setting might be used... yes
checking if compiler accepts optimizer enabling options... yes
configure: compiler options added: -O2
checking if compiler accepts strict warning options... yes
configure: compiler options added: -Wno-system-headers 
checking if compiler halts on compilation errors... yes
checking if compiler halts on negative sized arrays... yes
checking if compiler halts on function prototype mismatch... yes
checking if compiler supports hiding library internal symbols... yes
checking whether build target supports WIN32 file API... no
checking whether build target supports WIN32 crypto API... no
checking for good-to-use Darwin CFLAGS... no
checking whether to link macOS CoreFoundation, CoreServices, and SystemConfiguration frameworks... no
checking to see if the compiler supports __builtin_available()... no
checking whether to support http... yes
checking whether to support ftp... yes
checking whether to support file... yes
checking whether to support ldap... yes
checking whether to support ldaps... yes
checking whether to support rtsp... yes
checking whether to support proxies... yes
checking whether to support dict... yes
checking whether to support telnet... yes
checking whether to support tftp... yes
checking whether to support pop3... yes
checking whether to support imap... yes
checking whether to support smb... yes
checking whether to support smtp... yes
checking whether to support gopher... yes
checking whether to support mqtt... no
checking whether to provide built-in manual... yes
checking whether to build documentation... no
checking whether to enable generation of C code... yes
checking whether to use libgcc... no
checking if X/Open network library is required... no
checking for gethostbyname... yes
checking whether build target is a native Windows one... (cached) no
checking for proto/bsdsocket.h... no
checking for connect in libraries... yes
checking for sys/types.h... (cached) yes
checking for sys/time.h... yes
checking for monotonic clock_gettime... yes
checking for clock_gettime in libraries... no additional lib required
checking if monotonic clock_gettime works... yes
checking for sys/types.h... (cached) yes
checking for sys/time.h... (cached) yes
checking for raw monotonic clock_gettime... yes
checking for pkg-config... /usr/bin/pkg-config
checking for zlib options with pkg-config... found
checking for zlib.h... yes
configure: found both libz and libz.h header
checking for BrotliDecoderDecompress in -lbrotlidec... no
checking for brotli/decode.h... no
checking for ZSTD_createDStream in -lzstd... no
checking for zstd.h... no
checking for lber.h... no
checking for ldap.h... no
checking for ldap_ssl.h... no
checking for LDAP libraries... cannot find LDAP libraries
checking whether to enable IPv6... yes
checking if struct sockaddr_in6 has sin6_scope_id member... yes
checking if argv can be written to... yes
checking if GSS-API support is requested... no
checking whether to enable Windows native SSL/TLS... no
checking whether to enable Secure Transport... no
checking whether to enable Amiga native SSL/TLS (AmiSSL v5)... no
checking for psl_builtin in -lpsl... yes
checking for libpsl.h... yes
checking for library containing gsasl_init... no
checking for RTMP_Init in -lrtmp... no
checking whether versioned symbols are wanted... no
checking whether to enable Windows native IDN (Windows native builds only)... no
checking whether to build with libidn2... (assumed) yes
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for libidn2 options with pkg-config... no
configure: IDN_LIBS: "-lidn2"
configure: IDN_LDFLAGS: ""
configure: IDN_CPPFLAGS: ""
configure: IDN_DIR: ""
checking if idn2_lookup_ul can be linked... no
checking for idn2.h... no
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for libnghttp2 options with pkg-config... no
checking for nghttp2_session_get_stream_local_window_size in -lnghttp2... no
checking for sys/types.h... (cached) yes
checking for sys/time.h... (cached) yes
checking for sys/select.h... yes
checking for sys/socket.h... yes
checking for sys/ioctl.h... yes
checking for unistd.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for arpa/inet.h... yes
checking for net/if.h... yes
checking for netinet/in.h... yes
checking for netinet/in6.h... no
checking for sys/un.h... yes
checking for linux/tcp.h... yes
checking for netinet/tcp.h... yes
checking for netinet/udp.h... yes
checking for netdb.h... yes
checking for sys/sockio.h... no
checking for sys/stat.h... (cached) yes
checking for sys/param.h... yes
checking for termios.h... yes
checking for termio.h... yes
checking for fcntl.h... yes
checking for io.h... no
checking for pwd.h... yes
checking for utime.h... yes
checking for sys/utime.h... no
checking for sys/poll.h... yes
checking for poll.h... yes
checking for socket.h... no
checking for sys/resource.h... yes
checking for libgen.h... yes
checking for locale.h... yes
checking for stdbool.h... yes
checking for sys/filio.h... no
checking for sys/wait.h... yes
checking for setjmp.h... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking for sys/types.h... (cached) yes
checking for sys/time.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking for struct timeval... yes
checking run-time libs availability... fine
checking size of size_t... 8
checking size of long... 8
checking size of int... 4
checking size of time_t... 8
checking size of off_t... 8
checking size of curl_off_t... 8
checking size of curl_socket_t... 4
checking for long long... yes
checking for ssize_t... yes
checking for bool... yes
checking for sa_family_t... yes
checking for suseconds_t... yes
checking if time_t is unsigned... no
checking for in_addr_t... yes
checking for struct sockaddr_storage... yes
checking for sys/select.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking for select... yes
checking for sys/types.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking for recv... yes
checking for sys/types.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking for send... yes
checking for sys/types.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking for MSG_NOSIGNAL... yes
checking for sys/types.h... (cached) yes
checking for unistd.h... (cached) yes
checking if alarm can be linked... yes
checking if alarm is prototyped... yes
checking if alarm is compilable... yes
checking if alarm usage allowed... yes
checking if alarm might be used... yes
checking for sys/types.h... (cached) yes
checking for strings.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for libgen.h... (cached) yes
checking if basename can be linked... yes
checking if basename is prototyped... yes
checking if basename is compilable... yes
checking if basename usage allowed... yes
checking if basename might be used... yes
checking for sys/types.h... (cached) yes
checking for socket.h... (cached) no
checking if closesocket can be linked... no
checking if closesocket might be used... no
checking for sys/types.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking if CloseSocket can be linked... no
checking if CloseSocket might be used... no
checking for sys/types.h... (cached) yes
checking for unistd.h... (cached) yes
checking for fcntl.h... (cached) yes
checking if fcntl can be linked... yes
checking if fcntl is prototyped... yes
checking if fcntl is compilable... yes
checking if fcntl usage allowed... yes
checking if fcntl might be used... yes
checking if fcntl O_NONBLOCK is compilable... yes
checking if fcntl O_NONBLOCK usage allowed... yes
checking if fcntl O_NONBLOCK might be used... yes
checking whether build target is a native Windows one... (cached) no
checking for sys/types.h... (cached) yes
checking for netdb.h... (cached) yes
checking if freeaddrinfo can be linked... yes
checking if freeaddrinfo is prototyped... yes
checking if freeaddrinfo is compilable... yes
checking if freeaddrinfo usage allowed... yes
checking if freeaddrinfo might be used... yes
checking for sys/types.h... (cached) yes
checking for sys/xattr.h... yes
checking if fsetxattr can be linked... yes
checking if fsetxattr is prototyped... yes
checking if fsetxattr takes 5 args.... yes
checking if fsetxattr is compilable... yes
checking if fsetxattr usage allowed... yes
checking if fsetxattr might be used... yes
checking if ftruncate can be linked... yes
checking if ftruncate is prototyped... yes
checking if ftruncate is compilable... yes
checking if ftruncate usage allowed... yes
checking if ftruncate might be used... yes
checking for sys/types.h... (cached) yes
checking if getaddrinfo can be linked... yes
checking if getaddrinfo is prototyped... yes
checking if getaddrinfo is compilable... yes
checking if getaddrinfo seems to work... yes
checking if getaddrinfo usage allowed... yes
checking if getaddrinfo might be used... yes
checking if getaddrinfo is threadsafe... yes
checking if gethostbyname can be linked... yes
checking if gethostbyname is prototyped... yes
checking if gethostbyname is compilable... yes
checking if gethostbyname usage allowed... yes
checking if gethostbyname might be used... yes
checking if gethostbyname_r can be linked... yes
checking if gethostbyname_r is prototyped... yes
checking if gethostbyname_r takes 3 args.... no
checking if gethostbyname_r takes 5 args.... no
checking if gethostbyname_r takes 6 args.... yes
checking if gethostbyname_r is compilable... yes
checking if gethostbyname_r usage allowed... yes
checking if gethostbyname_r might be used... yes
checking if gethostname can be linked... yes
checking if gethostname is prototyped... yes
checking if gethostname is compilable... yes
checking for gethostname arg 2 data type... size_t
checking if gethostname usage allowed... yes
checking if gethostname might be used... yes
checking if getpeername can be linked... yes
checking if getpeername is prototyped... yes
checking if getpeername is compilable... yes
checking if getpeername usage allowed... yes
checking if getpeername might be used... yes
checking if getsockname can be linked... yes
checking if getsockname is prototyped... yes
checking if getsockname is compilable... yes
checking if getsockname usage allowed... yes
checking if getsockname might be used... yes
checking for net/if.h... (cached) yes
checking if if_nametoindex can be linked... yes
checking if if_nametoindex is prototyped... yes
checking if if_nametoindex is compilable... yes
checking if if_nametoindex usage allowed... yes
checking if if_nametoindex might be used... yes
checking for sys/types.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking for netinet/in.h... (cached) yes
checking for ifaddrs.h... yes
checking if getifaddrs can be linked... yes
checking if getifaddrs is prototyped... yes
checking if getifaddrs is compilable... yes
checking if getifaddrs seems to work... yes
checking if getifaddrs usage allowed... yes
checking if getifaddrs might be used... yes
checking for sys/types.h... (cached) yes
checking for sys/time.h... (cached) yes
checking if gmtime_r can be linked... yes
checking if gmtime_r is prototyped... yes
checking if gmtime_r is compilable... yes
checking if gmtime_r seems to work... yes
checking if gmtime_r usage allowed... yes
checking if gmtime_r might be used... yes
checking for sys/types.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking for netinet/in.h... (cached) yes
checking for arpa/inet.h... (cached) yes
checking if inet_ntop can be linked... yes
checking if inet_ntop is prototyped... yes
checking if inet_ntop is compilable... yes
checking if inet_ntop seems to work... yes
checking if inet_ntop usage allowed... yes
checking if inet_ntop might be used... yes
checking if inet_pton can be linked... yes
checking if inet_pton is prototyped... yes
checking if inet_pton is compilable... yes
checking if inet_pton seems to work... yes
checking if inet_pton usage allowed... yes
checking if inet_pton might be used... yes
checking for sys/types.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking for sys/ioctl.h... (cached) yes
checking for stropts.h... no
checking if ioctl can be linked... yes
checking if ioctl is prototyped... yes
checking if ioctl is compilable... yes
checking if ioctl usage allowed... yes
checking if ioctl might be used... yes
checking if ioctl FIONBIO is compilable... yes
checking if ioctl FIONBIO usage allowed... yes
checking if ioctl FIONBIO might be used... yes
checking if ioctl SIOCGIFADDR is compilable... yes
checking if ioctl SIOCGIFADDR usage allowed... yes
checking if ioctl SIOCGIFADDR might be used... yes
checking if ioctlsocket can be linked... no
checking if ioctlsocket might be used... no
checking if IoctlSocket can be linked... no
checking if IoctlSocket might be used... no
checking if memrchr can be linked... yes
checking if memrchr is prototyped... no
checking if memrchr might be used... no
checking for sys/types.h... (cached) yes
checking for poll.h... (cached) yes
checking for sys/poll.h... (cached) yes
checking if poll can be linked... yes
checking if poll is prototyped... yes
checking if poll is compilable... yes
checking if poll seems to work... yes
checking if poll usage allowed... yes
checking if poll might be used... yes
checking for sys/types.h... (cached) yes
checking if sigaction can be linked... yes
checking if sigaction is prototyped... yes
checking if sigaction is compilable... yes
checking if sigaction usage allowed... yes
checking if sigaction might be used... yes
checking if siginterrupt can be linked... yes
checking if siginterrupt is prototyped... yes
checking if siginterrupt is compilable... yes
checking if siginterrupt usage allowed... yes
checking if siginterrupt might be used... yes
checking if signal can be linked... yes
checking if signal is prototyped... yes
checking if signal is compilable... yes
checking if signal usage allowed... yes
checking if signal might be used... yes
checking for sys/types.h... (cached) yes
checking if sigsetjmp can be linked... no
checking if sigsetjmp seems a macro... yes
checking if sigsetjmp is compilable... yes
checking if sigsetjmp usage allowed... yes
checking if sigsetjmp might be used... yes
checking if socket can be linked... yes
checking if socket is prototyped... yes
checking if socket is compilable... yes
checking if socket usage allowed... yes
checking if socket might be used... yes
checking if socketpair can be linked... yes
checking if socketpair is prototyped... yes
checking if socketpair is compilable... yes
checking if socketpair usage allowed... yes
checking if socketpair might be used... yes
checking if strcasecmp can be linked... yes
checking if strcasecmp is prototyped... yes
checking if strcasecmp is compilable... yes
checking if strcasecmp usage allowed... yes
checking if strcasecmp might be used... yes
checking if strcmpi can be linked... no
checking if strcmpi might be used... no
checking if strdup can be linked... yes
checking if strdup is prototyped... yes
checking if strdup is compilable... yes
checking if strdup usage allowed... yes
checking if strdup might be used... yes
checking if strerror_r can be linked... yes
checking if strerror_r is prototyped... yes
checking if strerror_r is compilable... yes
checking if strerror_r is glibc like... no
checking if strerror_r is POSIX like... yes
checking if strerror_r seems to work... yes
checking if strerror_r usage allowed... yes
checking if strerror_r might be used... yes
checking if stricmp can be linked... no
checking if stricmp might be used... no
checking if strtok_r can be linked... yes
checking if strtok_r is prototyped... yes
checking if strtok_r is compilable... yes
checking if strtok_r usage allowed... yes
checking if strtok_r might be used... yes
checking if strtoll can be linked... yes
checking if strtoll is prototyped... yes
checking if strtoll is compilable... yes
checking if strtoll usage allowed... yes
checking if strtoll might be used... yes
checking for ccache gcc options needed to detect all undeclared functions... none needed
checking whether getpwuid_r is declared... yes
checking for _fseeki64... no
checking deeper for _fseeki64... but still no
checking for arc4random... no
checking deeper for arc4random... but still no
checking for fnmatch... yes
checking for fseeko... yes
checking for geteuid... yes
checking for getpass_r... no
checking deeper for getpass_r... but still no
checking for getppid... yes
checking for getpwuid... yes
checking for getpwuid_r... yes
checking for getrlimit... yes
checking for gettimeofday... yes
checking for if_nametoindex... yes
checking for mach_absolute_time... no
checking deeper for mach_absolute_time... but still no
checking for pipe... yes
checking for sched_yield... yes
checking for sendmsg... yes
checking for setlocale... yes
checking for setmode... no
checking deeper for setmode... but still no
checking for setrlimit... yes
checking for snprintf... yes
checking for utime... yes
checking for utimes... yes
checking whether fseeko is declared... yes
checking how to set a socket into non-blocking mode... fcntl O_NONBLOCK
checking whether to enable the threaded resolver... yes
checking whether to use POSIX threads for threaded resolver... auto
checking for pthread.h... yes
checking for pthread_create... yes
checking for dirent.h... yes
checking for opendir... yes
checking convert -I options to -isystem... yes
checking whether to enable verbose strings... yes
checking whether to enable SSPI support (Windows native builds only)... no
checking whether to enable basic authentication method... yes
checking whether to enable bearer authentication method... yes
checking whether to enable digest authentication method... yes
checking whether to enable kerberos authentication method... yes
checking whether to enable negotiate authentication method... yes
checking whether to enable aws sig methods... yes
checking whether to support NTLM... yes
checking whether to enable TLS-SRP authentication... yes
checking whether to enable Unix domain sockets... auto
checking for struct sockaddr_un.sun_path... yes
checking whether to support cookies... yes
checking whether to support socketpair... yes
checking whether to support HTTP authentication... yes
checking whether to support DoH... yes
checking whether to support the MIME API... yes
checking whether to support binding connections locally... yes
checking whether to support the form API... yes
checking whether to support date parsing... yes
checking whether to support netrc parsing... yes
checking whether to support progress-meter... yes
checking whether to support DNS shuffling... yes
checking whether to support curl_easy_option*... yes
checking whether to support alt-svc... yes
checking whether to support headers-api... yes
configure: disables HSTS due to lack of SSL
checking whether to support WebSockets... no
checking whether hiding of library internal symbols will actually happen... yes
checking if this build supports HTTPS-proxy... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating docs/Makefile
config.status: creating docs/examples/Makefile
config.status: creating docs/libcurl/Makefile
config.status: creating docs/libcurl/opts/Makefile
config.status: creating docs/cmdline-opts/Makefile
config.status: creating include/Makefile
config.status: creating include/curl/Makefile
config.status: creating src/Makefile
config.status: creating lib/Makefile
config.status: creating scripts/Makefile
config.status: creating lib/libcurl.vers
config.status: creating tests/Makefile
config.status: creating tests/config
config.status: creating tests/certs/Makefile
config.status: creating tests/certs/scripts/Makefile
config.status: creating tests/data/Makefile
config.status: creating tests/server/Makefile
config.status: creating tests/libtest/Makefile
config.status: creating tests/unit/Makefile
config.status: creating tests/http/config.ini
config.status: creating tests/http/Makefile
config.status: creating tests/http/clients/Makefile
config.status: creating packages/Makefile
config.status: creating packages/vms/Makefile
config.status: creating curl-config
config.status: creating libcurl.pc
config.status: creating lib/curl_config.h
config.status: executing depfiles commands
config.status: executing libtool commands
configure: Configured to build curl/libcurl:

  Host setup:       x86_64-pc-linux-gnu
  Install prefix:   /usr/local
  Compiler:         ccache gcc
   CFLAGS:          -Werror-implicit-function-declaration -O2 -Wno-system-headers
   CPPFLAGS:        
   LDFLAGS:         
   LIBS:            -lpsl -lz

  curl version:     8.8.0-DEV
  SSL:              no      (--with-{openssl,gnutls,mbedtls,wolfssl,schannel,secure-transport,amissl,bearssl,rustls} )
  SSH:              no      (--with-{libssh,libssh2})
  zlib:             enabled
  brotli:           no      (--with-brotli)
  zstd:             no      (--with-zstd)
  GSS-API:          no      (--with-gssapi)
  GSASL:            no      (libgsasl not found)
  TLS-SRP:          no      (--enable-tls-srp)
  resolver:         POSIX threaded
  IPv6:             enabled
  Unix sockets:     enabled
  IDN:              no      (--with-{libidn2,winidn})
  Build docs:       no
  Build libcurl:    Shared=no, Static=yes
  Built-in manual:  no      (--enable-manual)
  --libcurl option: enabled (--disable-libcurl-option)
  Verbose errors:   enabled (--disable-verbose)
  Code coverage:    disabled
  SSPI:             no      (--enable-sspi)
  ca cert bundle:   no
  ca cert path:     
  ca fallback:      
  LDAP:             no      (--enable-ldap / --with-ldap-lib / --with-lber-lib)
  LDAPS:            no      (--enable-ldaps)
  RTSP:             enabled
  RTMP:             no      (--with-librtmp)
  PSL:              enabled
  Alt-svc:          enabled (--disable-alt-svc)
  Headers API:      enabled (--disable-headers-api)
  HSTS:             no      (--enable-hsts)
  HTTP1:            enabled (internal)
  HTTP2:            no      (--with-nghttp2)
  HTTP3:            no      (--with-ngtcp2 --with-nghttp3, --with-quiche, --with-openssl-quic, --with-msh3)
  ECH:              no      (--enable-ech)
  WebSockets:       no      (--enable-websockets)
  Protocols:        DICT FILE FTP GOPHER HTTP IMAP IPFS IPNS MQTT POP3 RTSP SMTP TELNET TFTP
  Features:         AsynchDNS IPv6 Largefile PSL UnixSockets alt-svc libz threadsafe

configure: WARNING: Cannot find libraries for LDAP support: LDAP disabled
configure: WARNING: libgsasl was not found
configure: WARNING: Cannot find libraries for IDN support: IDN disabled

$ make -j3
Making all in lib
make[1]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/lib'
make  all-am
make[2]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/lib'
  CC       libcurl_la-altsvc.lo
  CC       libcurl_la-amigaos.lo
  CC       libcurl_la-asyn-ares.lo
  CC       libcurl_la-asyn-thread.lo
  CC       libcurl_la-base64.lo
  CC       libcurl_la-bufq.lo
  CC       libcurl_la-bufref.lo
  CC       libcurl_la-c-hyper.lo
  CC       libcurl_la-cf-h1-proxy.lo
  CC       libcurl_la-cf-h2-proxy.lo
  CC       libcurl_la-cf-haproxy.lo
  CC       libcurl_la-cf-https-connect.lo
  CC       libcurl_la-cf-socket.lo
  CC       libcurl_la-cfilters.lo
  CC       libcurl_la-conncache.lo
  CC       libcurl_la-connect.lo
  CC       libcurl_la-content_encoding.lo
  CC       libcurl_la-cookie.lo
  CC       libcurl_la-curl_addrinfo.lo
  CC       libcurl_la-curl_des.lo
  CC       libcurl_la-curl_endian.lo
  CC       libcurl_la-curl_fnmatch.lo
  CC       libcurl_la-curl_get_line.lo
  CC       libcurl_la-curl_gethostname.lo
  CC       libcurl_la-curl_gssapi.lo
  CC       libcurl_la-curl_memrchr.lo
  CC       libcurl_la-curl_multibyte.lo
  CC       libcurl_la-curl_ntlm_core.lo
  CC       libcurl_la-curl_path.lo
  CC       libcurl_la-curl_range.lo
  CC       libcurl_la-curl_rtmp.lo
  CC       libcurl_la-curl_sasl.lo
  CC       libcurl_la-curl_sha512_256.lo
  CC       libcurl_la-curl_sspi.lo
  CC       libcurl_la-curl_threads.lo
  CC       libcurl_la-curl_trc.lo
  CC       libcurl_la-cw-out.lo
  CC       libcurl_la-dict.lo
  CC       libcurl_la-dllmain.lo
  CC       libcurl_la-doh.lo
  CC       libcurl_la-dynbuf.lo
  CC       libcurl_la-dynhds.lo
  CC       libcurl_la-easy.lo
  CC       libcurl_la-easygetopt.lo
  CC       libcurl_la-easyoptions.lo
  CC       libcurl_la-escape.lo
  CC       libcurl_la-file.lo
  CC       libcurl_la-fileinfo.lo
  CC       libcurl_la-fopen.lo
  CC       libcurl_la-formdata.lo
  CC       libcurl_la-ftp.lo
  CC       libcurl_la-ftplistparser.lo
  CC       libcurl_la-getenv.lo
  CC       libcurl_la-getinfo.lo
  CC       libcurl_la-gopher.lo
  CC       libcurl_la-hash.lo
  CC       libcurl_la-headers.lo
  CC       libcurl_la-hmac.lo
  CC       libcurl_la-hostasyn.lo
  CC       libcurl_la-hostip.lo
  CC       libcurl_la-hostip4.lo
  CC       libcurl_la-hostip6.lo
  CC       libcurl_la-hostsyn.lo
  CC       libcurl_la-hsts.lo
  CC       libcurl_la-http.lo
  CC       libcurl_la-http1.lo
  CC       libcurl_la-http2.lo
  CC       libcurl_la-http_aws_sigv4.lo
  CC       libcurl_la-http_chunks.lo
  CC       libcurl_la-http_digest.lo
  CC       libcurl_la-http_negotiate.lo
  CC       libcurl_la-http_ntlm.lo
  CC       libcurl_la-http_proxy.lo
  CC       libcurl_la-idn.lo
  CC       libcurl_la-if2ip.lo
  CC       libcurl_la-imap.lo
  CC       libcurl_la-inet_ntop.lo
  CC       libcurl_la-inet_pton.lo
  CC       libcurl_la-krb5.lo
  CC       libcurl_la-ldap.lo
  CC       libcurl_la-llist.lo
  CC       libcurl_la-macos.lo
  CC       libcurl_la-md4.lo
  CC       libcurl_la-md5.lo
  CC       libcurl_la-memdebug.lo
  CC       libcurl_la-mime.lo
  CC       libcurl_la-mprintf.lo
  CC       libcurl_la-mqtt.lo
  CC       libcurl_la-multi.lo
  CC       libcurl_la-netrc.lo
  CC       libcurl_la-nonblock.lo
  CC       libcurl_la-noproxy.lo
  CC       libcurl_la-openldap.lo
  CC       libcurl_la-parsedate.lo
  CC       libcurl_la-pingpong.lo
  CC       libcurl_la-pop3.lo
  CC       libcurl_la-progress.lo
  CC       libcurl_la-psl.lo
  CC       libcurl_la-rand.lo
  CC       libcurl_la-rename.lo
  CC       libcurl_la-request.lo
  CC       libcurl_la-rtsp.lo
  CC       libcurl_la-select.lo
  CC       libcurl_la-sendf.lo
  CC       libcurl_la-setopt.lo
  CC       libcurl_la-sha256.lo
  CC       libcurl_la-share.lo
  CC       libcurl_la-slist.lo
  CC       libcurl_la-smb.lo
  CC       libcurl_la-smtp.lo
  CC       libcurl_la-socketpair.lo
  CC       libcurl_la-socks.lo
  CC       libcurl_la-socks_gssapi.lo
  CC       libcurl_la-socks_sspi.lo
  CC       libcurl_la-speedcheck.lo
  CC       libcurl_la-splay.lo
  CC       libcurl_la-strcase.lo
  CC       libcurl_la-strdup.lo
  CC       libcurl_la-strerror.lo
  CC       libcurl_la-strtok.lo
  CC       libcurl_la-strtoofft.lo
  CC       libcurl_la-system_win32.lo
  CC       libcurl_la-telnet.lo
  CC       libcurl_la-tftp.lo
  CC       libcurl_la-timediff.lo
  CC       libcurl_la-timeval.lo
  CC       libcurl_la-transfer.lo
  CC       libcurl_la-url.lo
  CC       libcurl_la-urlapi.lo
  CC       libcurl_la-version.lo
  CC       libcurl_la-version_win32.lo
  CC       libcurl_la-warnless.lo
  CC       libcurl_la-ws.lo
  CC       vauth/libcurl_la-cleartext.lo
  CC       vauth/libcurl_la-cram.lo
  CC       vauth/libcurl_la-digest.lo
  CC       vauth/libcurl_la-digest_sspi.lo
  CC       vauth/libcurl_la-gsasl.lo
  CC       vauth/libcurl_la-krb5_gssapi.lo
  CC       vauth/libcurl_la-krb5_sspi.lo
  CC       vauth/libcurl_la-ntlm.lo
  CC       vauth/libcurl_la-ntlm_sspi.lo
  CC       vauth/libcurl_la-oauth2.lo
  CC       vauth/libcurl_la-spnego_gssapi.lo
  CC       vauth/libcurl_la-spnego_sspi.lo
  CC       vauth/libcurl_la-vauth.lo
  CC       vtls/libcurl_la-bearssl.lo
  CC       vtls/libcurl_la-cipher_suite.lo
  CC       vtls/libcurl_la-gtls.lo
  CC       vtls/libcurl_la-hostcheck.lo
  CC       vtls/libcurl_la-keylog.lo
  CC       vtls/libcurl_la-mbedtls.lo
  CC       vtls/libcurl_la-mbedtls_threadlock.lo
  CC       vtls/libcurl_la-openssl.lo
  CC       vtls/libcurl_la-rustls.lo
  CC       vtls/libcurl_la-schannel.lo
  CC       vtls/libcurl_la-schannel_verify.lo
  CC       vtls/libcurl_la-sectransp.lo
  CC       vtls/libcurl_la-vtls.lo
  CC       vtls/libcurl_la-wolfssl.lo
  CC       vtls/libcurl_la-x509asn1.lo
  CC       vquic/libcurl_la-curl_msh3.lo
  CC       vquic/libcurl_la-curl_ngtcp2.lo
  CC       vquic/libcurl_la-curl_osslq.lo
  CC       vquic/libcurl_la-curl_quiche.lo
  CC       vquic/libcurl_la-vquic.lo
  CC       vquic/libcurl_la-vquic-tls.lo
  CC       vssh/libcurl_la-libssh.lo
  CC       vssh/libcurl_la-libssh2.lo
  CC       vssh/libcurl_la-wolfssh.lo
  CCLD     libcurl.la
make[2]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/lib'
make[1]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/lib'
Making all in docs
make[1]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/docs'
Making all in .
make[2]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/docs'
make[2]: Nothing to be done for 'all-am'.
make[2]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/docs'
Making all in cmdline-opts
make[2]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/docs/cmdline-opts'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/docs/cmdline-opts'
Making all in libcurl
make[2]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/docs/libcurl'
Making all in opts
make[3]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/docs/libcurl/opts'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/docs/libcurl/opts'
make[3]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/docs/libcurl'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/docs/libcurl'
make[2]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/docs/libcurl'
make[1]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/docs'
Making all in src
make[1]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/src'
make[2]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/src'
  CC       slist_wc.o
  CC       tool_binmode.o
  CC       tool_bname.o
  CC       tool_cb_hdr.o
  CC       tool_cb_dbg.o
  CC       tool_cb_prg.o
  CC       tool_cb_rea.o
  CC       tool_cb_see.o
  CC       tool_cb_wrt.o
  CC       tool_cfgable.o
  CC       tool_dirhie.o
  CC       tool_doswin.o
  CC       tool_easysrc.o
  CC       tool_filetime.o
  CC       tool_findfile.o
  CC       tool_formparse.o
  CC       tool_getparam.o
  CC       tool_getpass.o
  CC       tool_help.o
  CC       tool_helpers.o
echo '#include "tool_hugehelp.h"' >> tool_hugehelp.c
  CC       tool_ipfs.o
  CC       tool_libinfo.o
  CC       tool_listhelp.o
  CC       tool_main.o
  CC       tool_msgs.o
  CC       tool_operate.o
  CC       tool_operhlp.o
  CC       tool_paramhlp.o
  CC       tool_parsecfg.o
  CC       tool_progress.o
  CC       tool_setopt.o
  CC       tool_stderr.o
  CC       tool_strdup.o
  CC       tool_sleep.o
  CC       tool_urlglob.o
  CC       tool_util.o
  CC       tool_vms.o
  CC       tool_writeout.o
  CC       tool_writeout_json.o
  CC       tool_xattr.o
  CC       var.o
  CC       tool_hugehelp.o
  CC       ../lib/base64.o
  CC       ../lib/curl_multibyte.o
  CC       ../lib/dynbuf.o
  CC       ../lib/nonblock.o
  CC       ../lib/strtoofft.o
  CC       ../lib/timediff.o
  CC       ../lib/version_win32.o
  CC       ../lib/warnless.o
  CCLD     curl
make[2]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/src'
make[1]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/src'
Making all in scripts
make[1]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/scripts'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/scripts'
make[1]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0'
make[1]: Nothing to be done for 'all-am'.
make[1]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0'

Commit Diff GitHub →

tests/libtest/first.c +2 -2tests/libtest/lib1156.c +3 -3tests/libtest/lib1301.c +3 -3tests/libtest/lib1500.c +7 -6tests/libtest/lib1501.c +3 -3tests/libtest/lib1502.c +2 -2tests/libtest/lib1506.c +2 -2tests/libtest/lib1507.c +2 -2tests/libtest/lib1508.c +2 -2tests/libtest/lib1509.c +4 -4tests/libtest/lib1510.c +2 -2tests/libtest/lib1511.c +2 -2tests/libtest/lib1512.c +2 -2tests/libtest/lib1513.c +2 -2tests/libtest/lib1514.c +3 -3tests/libtest/lib1515.c +7 -6tests/libtest/lib1517.c +3 -3tests/libtest/lib1518.c +6 -6tests/libtest/lib1520.c +2 -2tests/libtest/lib1522.c +2 -2tests/libtest/lib1523.c +2 -2tests/libtest/lib1525.c +2 -2tests/libtest/lib1526.c +2 -2tests/libtest/lib1527.c +2 -2tests/libtest/lib1528.c +2 -2tests/libtest/lib1529.c +2 -2tests/libtest/lib1530.c +2 -2tests/libtest/lib1531.c +2 -2tests/libtest/lib1532.c +2 -2tests/libtest/lib1533.c +17 -12tests/libtest/lib1534.c +2 -2tests/libtest/lib1535.c +2 -2tests/libtest/lib1536.c +2 -2tests/libtest/lib1537.c +2 -2tests/libtest/lib1538.c +3 -3tests/libtest/lib1540.c +3 -3tests/libtest/lib1541.c +3 -3tests/libtest/lib1542.c +2 -2tests/libtest/lib1545.c +2 -2tests/libtest/lib1550.c +3 -3tests/libtest/lib1551.c +2 -2tests/libtest/lib1552.c +7 -6tests/libtest/lib1553.c +7 -6tests/libtest/lib1554.c +2 -2tests/libtest/lib1555.c +2 -2tests/libtest/lib1556.c +3 -3tests/libtest/lib1557.c +2 -2tests/libtest/lib1558.c +2 -2tests/libtest/lib1559.c +4 -4tests/libtest/lib1560.c +13 -13tests/libtest/lib1564.c +2 -2tests/libtest/lib1565.c +9 -8tests/libtest/lib1567.c +2 -2tests/libtest/lib1568.c +2 -2tests/libtest/lib1569.c +2 -2tests/libtest/lib1591.c +2 -2tests/libtest/lib1592.c +3 -4tests/libtest/lib1593.c +2 -2tests/libtest/lib1594.c +2 -2tests/libtest/lib1597.c +6 -8tests/libtest/lib1598.c +2 -2tests/libtest/lib1662.c +2 -2tests/libtest/lib1900.c +3 -3tests/libtest/lib1901.c +2 -2tests/libtest/lib1903.c +2 -2tests/libtest/lib1905.c +3 -3tests/libtest/lib1906.c +5 -5tests/libtest/lib1907.c +2 -2tests/libtest/lib1908.c +2 -2tests/libtest/lib1910.c +2 -2tests/libtest/lib1911.c +4 -4tests/libtest/lib1912.c +2 -2tests/libtest/lib1913.c +2 -2tests/libtest/lib1915.c +4 -4tests/libtest/lib1916.c +2 -2tests/libtest/lib1918.c +2 -3tests/libtest/lib1919.c +2 -2tests/libtest/lib1933.c +1 -1tests/libtest/lib1934.c +1 -1tests/libtest/lib1935.c +1 -1tests/libtest/lib1936.c +1 -1tests/libtest/lib1937.c +1 -1tests/libtest/lib1938.c +1 -1tests/libtest/lib1939.c +1 -1tests/libtest/lib1940.c +2 -2tests/libtest/lib1945.c +3 -3tests/libtest/lib1947.c +2 -2tests/libtest/lib1948.c +2 -2tests/libtest/lib1955.c +1 -1tests/libtest/lib1956.c +1 -1tests/libtest/lib1957.c +1 -1tests/libtest/lib1958.c +1 -1tests/libtest/lib1959.c +1 -1tests/libtest/lib1960.c +4 -4tests/libtest/lib1964.c +1 -1tests/libtest/lib1970.c +1 -1tests/libtest/lib1971.c +1 -1tests/libtest/lib1972.c +1 -1tests/libtest/lib1973.c +1 -1tests/libtest/lib1974.c +1 -1tests/libtest/lib1975.c +1 -1tests/libtest/lib2301.c +13 -13tests/libtest/lib2302.c +3 -3tests/libtest/lib2304.c +13 -13tests/libtest/lib2305.c +6 -6tests/libtest/lib2306.c +1 -1tests/libtest/lib2402.c +2 -2tests/libtest/lib2404.c +2 -2tests/libtest/lib2405.c +10 -9tests/libtest/lib2502.c +2 -2tests/libtest/lib3010.c +1 -1tests/libtest/lib3025.c +2 -2tests/libtest/lib3026.c +11 -11tests/libtest/lib3027.c +2 -2tests/libtest/lib3100.c +3 -3tests/libtest/lib3101.c +3 -3tests/libtest/lib3102.c +1 -1tests/libtest/lib3103.c +3 -3tests/libtest/lib500.c +2 -2tests/libtest/lib501.c +2 -2tests/libtest/lib502.c +2 -2tests/libtest/lib503.c +2 -2tests/libtest/lib504.c +2 -2tests/libtest/lib505.c +1 -1tests/libtest/lib506.c +3 -3tests/libtest/lib507.c +3 -3tests/libtest/lib508.c +1 -1tests/libtest/lib509.c +2 -2tests/libtest/lib510.c +1 -1tests/libtest/lib511.c +2 -2tests/libtest/lib512.c +2 -2tests/libtest/lib513.c +2 -2tests/libtest/lib514.c +2 -2tests/libtest/lib515.c +2 -2tests/libtest/lib516.c +2 -2tests/libtest/lib517.c +2 -2tests/libtest/lib518.c +5 -5tests/libtest/lib519.c +2 -2tests/libtest/lib520.c +2 -2tests/libtest/lib521.c +2 -2tests/libtest/lib523.c +2 -2tests/libtest/lib524.c +2 -2tests/libtest/lib525.c +2 -2tests/libtest/lib526.c +3 -3tests/libtest/lib530.c +20 -16tests/libtest/lib533.c +2 -2tests/libtest/lib536.c +2 -2tests/libtest/lib537.c +6 -6tests/libtest/lib539.c +2 -2tests/libtest/lib540.c +11 -11tests/libtest/lib541.c +2 -2tests/libtest/lib542.c +1 -1tests/libtest/lib543.c +2 -2tests/libtest/lib544.c +2 -2tests/libtest/lib547.c +2 -2tests/libtest/lib549.c +2 -2tests/libtest/lib552.c +2 -2tests/libtest/lib553.c +2 -2tests/libtest/lib554.c +3 -3tests/libtest/lib555.c +2 -2tests/libtest/lib556.c +3 -3tests/libtest/lib557.c +3 -2tests/libtest/lib558.c +2 -2tests/libtest/lib559.c +2 -2tests/libtest/lib560.c +2 -2tests/libtest/lib562.c +1 -1tests/libtest/lib564.c +2 -2tests/libtest/lib566.c +2 -2tests/libtest/lib567.c +2 -2tests/libtest/lib568.c +2 -2tests/libtest/lib569.c +2 -2tests/libtest/lib570.c +4 -4tests/libtest/lib571.c +2 -2tests/libtest/lib572.c +2 -2tests/libtest/lib573.c +2 -2tests/libtest/lib574.c +2 -2tests/libtest/lib575.c +2 -2tests/libtest/lib576.c +1 -1tests/libtest/lib578.c +1 -1tests/libtest/lib579.c +1 -1tests/libtest/lib582.c +2 -2tests/libtest/lib583.c +2 -2tests/libtest/lib586.c +1 -1tests/libtest/lib589.c +2 -2tests/libtest/lib590.c +2 -2tests/libtest/lib591.c +2 -2tests/libtest/lib597.c +2 -2tests/libtest/lib598.c +2 -2tests/libtest/lib599.c +1 -1tests/libtest/lib643.c +6 -6tests/libtest/lib650.c +1 -1tests/libtest/lib651.c +1 -1tests/libtest/lib652.c +4 -4tests/libtest/lib653.c +3 -3tests/libtest/lib654.c +6 -9tests/libtest/lib655.c +2 -2tests/libtest/lib658.c +1 -1tests/libtest/lib659.c +1 -1tests/libtest/lib661.c +2 -2tests/libtest/lib666.c +4 -4tests/libtest/lib667.c +4 -6tests/libtest/lib668.c +4 -6tests/libtest/lib670.c +8 -11tests/libtest/lib674.c +1 -1tests/libtest/lib676.c +2 -2tests/libtest/lib677.c +2 -2tests/libtest/lib678.c +5 -5tests/libtest/libauthretry.c +4 -4tests/libtest/libntlmconnect.c +2 -2tests/libtest/libprereq.c +1 -1tests/libtest/mk-lib1521.pl +2 -2tests/libtest/test.h +4 -4tests/unit/curlcheck.h +2 -2tests/unit/unit1303.c +2 -2tests/unit/unit1308.c +6 -5tests/unit/unit1603.c +1 -1tests/unit/unit1620.c +1 -1tests/unit/unit1650.c +10 -10tests/unit/unit1660.c +1 -1tests/unit/unit2604.c +1 -1tests/unit/unit3200.c +2 -2
tests/libtest/first.c+2 -2
@@ -136,7 +136,7 @@ char *hexdump(const unsigned char *buffer, size_t len)
int main(int argc, char **argv)
{
char *URL;
- int result;
+ CURLcode result;
#ifdef O_BINARY
# ifdef __HIGHC__
@@ -185,5 +185,5 @@ int main(int argc, char **argv)
/* Regular program status codes are limited to 0..127 and 126 and 127 have
* special meanings by the shell, so limit a normal return code to 125 */
- return result <= 125 ? result : 125;
+ return (int)result <= 125 ? (int)result : 125;
}
tests/libtest/lib1156.c+3 -3
@@ -131,7 +131,7 @@ test_cleanup:
/* for debugging: */
/* #define SINGLETEST 9 */
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res;
CURL *curl;
@@ -162,12 +162,12 @@ int test(char *URL)
curl_global_cleanup();
printf("%d\n", status);
- return status;
+ return (CURLcode)status;
test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1301.c+3 -3
@@ -28,11 +28,11 @@
if(!(expr)) { \
fprintf(stderr, "%s:%d Assertion '%s' failed: %s\n", \
__FILE__, __LINE__, #expr, msg); \
- return 1; \
+ return (CURLcode)1; \
} \
} while(0)
-int test(char *URL)
+CURLcode test(char *URL)
{
int rc;
(void)URL;
@@ -58,5 +58,5 @@ int test(char *URL)
rc = curl_strnequal("ii", "II", 3);
fail_unless(rc != 0, "return code should be non-zero");
- return 0;
+ return CURLE_OK;
}
tests/libtest/lib1500.c+7 -6
@@ -29,13 +29,13 @@
#define TEST_HANG_TIMEOUT 60 * 1000
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curls = NULL;
CURLM *multi = NULL;
int still_running;
- int i = TEST_ERR_FAILURE;
- int res = 0;
+ CURLcode i = TEST_ERR_FAILURE;
+ CURLcode res = CURLE_OK;
CURLMsg *msg;
start_test_timing();
@@ -56,10 +56,11 @@ int test(char *URL)
abort_on_test_timeout();
while(still_running) {
+ CURLMcode mres;
int num;
- res = curl_multi_wait(multi, NULL, 0, TEST_HANG_TIMEOUT, &num);
- if(res != CURLM_OK) {
- printf("curl_multi_wait() returned %d\n", res);
+ mres = curl_multi_wait(multi, NULL, 0, TEST_HANG_TIMEOUT, &num);
+ if(mres != CURLM_OK) {
+ printf("curl_multi_wait() returned %d\n", mres);
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
}
tests/libtest/lib1501.c+3 -3
@@ -35,11 +35,11 @@
to allow old and slow machines to run this test too */
#define MAX_BLOCKED_TIME_MS 500
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *handle = NULL;
CURLM *mhandle = NULL;
- int res = 0;
+ CURLcode res = CURLE_OK;
int still_running = 0;
start_test_timing();
@@ -96,7 +96,7 @@ int test(char *URL)
fprintf(stderr, "pong = %ld\n", e);
if(e > MAX_BLOCKED_TIME_MS) {
- res = 100;
+ res = (CURLcode) 100;
break;
}
}
tests/libtest/lib1502.c+2 -2
@@ -39,13 +39,13 @@
#define TEST_HANG_TIMEOUT 60 * 1000
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *easy = NULL;
CURL *dup;
CURLM *multi = NULL;
int still_running;
- int res = 0;
+ CURLcode res = CURLE_OK;
char redirect[160];
tests/libtest/lib1506.c+2 -2
@@ -31,9 +31,9 @@
#define NUM_HANDLES 4
-int test(char *URL)
+CURLcode test(char *URL)
{
- int res = 0;
+ CURLcode res = CURLE_OK;
CURL *curl[NUM_HANDLES] = {0};
int running;
CURLM *m = NULL;
tests/libtest/lib1507.c+2 -2
@@ -47,9 +47,9 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
return CURL_READFUNC_ABORT;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
- int res = 0;
+ CURLcode res = CURLE_OK;
CURL *curl = NULL;
CURLM *mcurl = NULL;
int still_running = 1;
tests/libtest/lib1508.c+2 -2
@@ -27,9 +27,9 @@
#include "warnless.h"
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
- int res = 0;
+ CURLcode res = CURLE_OK;
CURLM *m = NULL;
(void)URL;
tests/libtest/lib1509.c+4 -4
@@ -32,12 +32,12 @@ size_t WriteHeader(void *ptr, size_t size, size_t nmemb, void *stream);
static unsigned long realHeaderSize = 0;
-int test(char *URL)
+CURLcode test(char *URL)
{
long headerSize;
CURLcode code;
CURL *curl = NULL;
- int res = 0;
+ CURLcode res = CURLE_OK;
global_init(CURL_GLOBAL_ALL);
@@ -57,7 +57,7 @@ int test(char *URL)
if(CURLE_OK != code) {
fprintf(stderr, "%s:%d curl_easy_perform() failed, "
"with code %d (%s)\n",
- __FILE__, __LINE__, (int)code, curl_easy_strerror(code));
+ __FILE__, __LINE__, code, curl_easy_strerror(code));
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
}
@@ -66,7 +66,7 @@ int test(char *URL)
if(CURLE_OK != code) {
fprintf(stderr, "%s:%d curl_easy_getinfo() failed, "
"with code %d (%s)\n",
- __FILE__, __LINE__, (int)code, curl_easy_strerror(code));
+ __FILE__, __LINE__, code, curl_easy_strerror(code));
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
}
tests/libtest/lib1510.c+2 -2
@@ -31,9 +31,9 @@
#define NUM_URLS 4
-int test(char *URL)
+CURLcode test(char *URL)
{
- int res = 0;
+ CURLcode res = CURLE_OK;
CURL *curl = NULL;
int i;
char target_url[256];
tests/libtest/lib1511.c+2 -2
@@ -25,11 +25,11 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
long unmet;
CURL *curl = NULL;
- int res = 0;
+ CURLcode res = CURLE_OK;
global_init(CURL_GLOBAL_ALL);
tests/libtest/lib1512.c+2 -2
@@ -34,9 +34,9 @@
#define NUM_HANDLES 2
-int test(char *URL)
+CURLcode test(char *URL)
{
- int res = 0;
+ CURLcode res = CURLE_OK;
CURL *curl[NUM_HANDLES] = {NULL, NULL};
char *port = libtest_arg3;
char *address = libtest_arg2;
tests/libtest/lib1513.c+2 -2
@@ -47,10 +47,10 @@ static int progressKiller(void *arg,
return 1;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
- int res = 0;
+ CURLcode res = CURLE_OK;
global_init(CURL_GLOBAL_ALL);
tests/libtest/lib1514.c+3 -3
@@ -54,11 +54,11 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
return 0; /* no more data left to deliver */
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode result = CURLE_OK;
- int res = 0;
+ CURLcode res = CURLE_OK;
struct WriteThis pooh = { data, sizeof(data)-1 };
global_init(CURL_GLOBAL_ALL);
@@ -82,5 +82,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)result;
+ return result;
}
tests/libtest/lib1515.c+7 -6
@@ -49,12 +49,12 @@ static int debug_callback(CURL *curl, curl_infotype info, char *msg,
return 0;
}
-static int do_one_request(CURLM *m, char *URL, char *resolve)
+static CURLcode do_one_request(CURLM *m, char *URL, char *resolve)
{
CURL *curls;
struct curl_slist *resolve_list = NULL;
int still_running;
- int res = 0;
+ CURLcode res = CURLE_OK;
CURLMsg *msg;
int msgs_left;
@@ -110,10 +110,10 @@ test_cleanup:
return res;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLM *multi = NULL;
- int res = 0;
+ CURLcode res = CURLE_OK;
char *address = libtest_arg2;
char *port = libtest_arg3;
char *path = URL;
@@ -136,8 +136,9 @@ int test(char *URL)
/* second request must succeed like the first one */
res = do_one_request(multi, target_url, dns_entry);
- if(res)
+ if(res != CURLE_OK) {
goto test_cleanup;
+ }
if(i < count)
sleep(DNS_TIMEOUT + 1);
@@ -148,5 +149,5 @@ test_cleanup:
curl_multi_cleanup(multi);
curl_global_cleanup();
- return (int) res;
+ return res;
}
tests/libtest/lib1517.c+3 -3
@@ -53,7 +53,7 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
return tocopy;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
@@ -64,9 +64,9 @@ int test(char *URL)
#if (defined(_WIN32) || defined(__CYGWIN__))
printf("Windows TCP does not deliver response data but reports "
"CONNABORTED\n");
- return 1; /* skip since test will fail on Windows without workaround */
+ return (CURLcode)1; /* skip since it fails on Windows without workaround */
#else
- return 0; /* sure, run this! */
+ return CURLE_OK; /* sure, run this! */
#endif
}
tests/libtest/lib1518.c+6 -6
@@ -37,7 +37,7 @@ static size_t writecb(char *buffer, size_t size, size_t nitems,
return 0;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
@@ -84,13 +84,13 @@ int test(char *URL)
test_setopt(curl, CURLOPT_WRITEFUNCTION, writecb);
printf("res %d\n"
- "status %d\n"
- "redirects %d\n"
+ "status %ld\n"
+ "redirects %ld\n"
"effectiveurl %s\n"
"redirecturl %s\n",
- (int)res,
- (int)curlResponseCode,
- (int)curlRedirectCount,
+ res,
+ curlResponseCode,
+ curlRedirectCount,
effectiveUrl,
redirectUrl ? redirectUrl : "blank");
tests/libtest/lib1520.c+2 -2
@@ -71,7 +71,7 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
return 0;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res;
CURL *curl;
@@ -111,5 +111,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1522.c+2 -2
@@ -49,7 +49,7 @@ static int sockopt_callback(void *clientp, curl_socket_t curlfd,
return CURL_SOCKOPT_OK;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode code = TEST_ERR_MAJOR_BAD;
CURLcode res;
@@ -97,5 +97,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)code;
+ return code;
}
tests/libtest/lib1523.c+2 -2
@@ -55,7 +55,7 @@ static CURLcode run(CURL *hnd, long limit, long time)
return curl_easy_perform(hnd);
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode ret;
CURL *hnd;
@@ -81,5 +81,5 @@ int test(char *URL)
curl_easy_cleanup(hnd);
curl_global_cleanup();
- return (int)ret;
+ return ret;
}
tests/libtest/lib1525.c+2 -2
@@ -46,7 +46,7 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream)
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl = NULL;
CURLcode res = CURLE_FAILED_INIT;
@@ -96,5 +96,5 @@ test_cleanup:
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1526.c+2 -2
@@ -44,7 +44,7 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream)
return strlen(data);
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl = NULL;
CURLcode res = CURLE_FAILED_INIT;
@@ -101,5 +101,5 @@ test_cleanup:
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1527.c+2 -2
@@ -45,7 +45,7 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream)
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl = NULL;
CURLcode res = CURLE_FAILED_INIT;
@@ -98,5 +98,5 @@ test_cleanup:
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1528.c+2 -2
@@ -26,7 +26,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl = NULL;
CURLcode res = CURLE_FAILED_INIT;
@@ -71,5 +71,5 @@ test_cleanup:
curl_slist_free_all(phl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1529.c+2 -2
@@ -26,7 +26,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl = NULL;
CURLcode res = CURLE_FAILED_INIT;
@@ -59,5 +59,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1530.c+2 -2
@@ -37,7 +37,7 @@ static curl_socket_t opensocket(void *clientp,
return CURL_SOCKET_BAD;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl = NULL;
CURLcode res = CURLE_FAILED_INIT;
@@ -66,5 +66,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1531.c+2 -2
@@ -33,14 +33,14 @@
static char const testData[] = ".abc\0xyz";
static off_t const testDataSize = sizeof(testData) - 1;
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *easy;
CURLM *multi_handle;
int still_running; /* keep number of running handles */
CURLMsg *msg; /* for picking up messages with the transfer status */
int msgs_left; /* how many messages are left */
- int res = CURLE_OK;
+ CURLcode res = CURLE_OK;
start_test_timing();
tests/libtest/lib1532.c+2 -2
@@ -27,7 +27,7 @@
/* Test CURLINFO_RESPONSE_CODE */
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
long httpcode;
@@ -78,5 +78,5 @@ int test(char *URL)
test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1533.c+17 -12
@@ -106,7 +106,7 @@ static int perform_and_check_connections(CURL *curl, const char *description,
res = curl_easy_perform(curl);
if(res != CURLE_OK) {
- fprintf(stderr, "curl_easy_perform() failed with %d\n", (int)res);
+ fprintf(stderr, "curl_easy_perform() failed with %d\n", res);
return TEST_ERR_MAJOR_BAD;
}
@@ -127,11 +127,12 @@ static int perform_and_check_connections(CURL *curl, const char *description,
}
-int test(char *URL)
+CURLcode test(char *URL)
{
struct cb_data data;
CURL *curl = NULL;
- int res = TEST_ERR_FAILURE;
+ CURLcode res = TEST_ERR_FAILURE;
+ int result;
if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
@@ -157,17 +158,19 @@ int test(char *URL)
test_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback);
test_setopt(curl, CURLOPT_WRITEDATA, &data);
- res = perform_and_check_connections(curl,
+ result = perform_and_check_connections(curl,
"First request without CURLOPT_KEEP_SENDING_ON_ERROR", 1);
- if(res != TEST_ERR_SUCCESS) {
+ if(result != TEST_ERR_SUCCESS) {
+ res = (CURLcode) result;
goto test_cleanup;
}
reset_data(&data, curl);
- res = perform_and_check_connections(curl,
+ result = perform_and_check_connections(curl,
"Second request without CURLOPT_KEEP_SENDING_ON_ERROR", 1);
- if(res != TEST_ERR_SUCCESS) {
+ if(result != TEST_ERR_SUCCESS) {
+ res = (CURLcode) result;
goto test_cleanup;
}
@@ -175,17 +178,19 @@ int test(char *URL)
reset_data(&data, curl);
- res = perform_and_check_connections(curl,
+ result = perform_and_check_connections(curl,
"First request with CURLOPT_KEEP_SENDING_ON_ERROR", 1);
- if(res != TEST_ERR_SUCCESS) {
+ if(result != TEST_ERR_SUCCESS) {
+ res = (CURLcode) result;
goto test_cleanup;
}
reset_data(&data, curl);
- res = perform_and_check_connections(curl,
+ result = perform_and_check_connections(curl,
"Second request with CURLOPT_KEEP_SENDING_ON_ERROR", 0);
- if(res != TEST_ERR_SUCCESS) {
+ if(result != TEST_ERR_SUCCESS) {
+ res = (CURLcode) result;
goto test_cleanup;
}
@@ -197,5 +202,5 @@ test_cleanup:
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1534.c+2 -2
@@ -27,7 +27,7 @@
/* Test CURLINFO_FILETIME */
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl, *dupe = NULL;
long filetime;
@@ -127,5 +127,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_easy_cleanup(dupe);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1535.c+2 -2
@@ -27,7 +27,7 @@
/* Test CURLINFO_PROTOCOL */
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl, *dupe = NULL;
long protocol;
@@ -134,5 +134,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_easy_cleanup(dupe);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1536.c+2 -2
@@ -27,7 +27,7 @@
/* Test CURLINFO_SCHEME */
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl, *dupe = NULL;
char *scheme;
@@ -127,5 +127,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_easy_cleanup(dupe);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1537.c+2 -2
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
const unsigned char a[] = {0x2f, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
0x91, 0xa2, 0xb3, 0xc4, 0xd5, 0xe6, 0xf7};
@@ -87,5 +87,5 @@ test_cleanup:
curl_free(ptr);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1538.c+3 -3
@@ -25,9 +25,9 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
- int res = 0;
+ CURLcode res = CURLE_OK;
CURLcode easyret;
CURLMcode multiret;
CURLSHcode shareret;
@@ -56,5 +56,5 @@ int test(char *URL)
printf("u%d: %s\n", (int)urlret, curl_url_strerror(urlret));
}
- return (int)res;
+ return res;
}
tests/libtest/lib1540.c+3 -3
@@ -82,10 +82,10 @@ static size_t write_callback(void *ptr, size_t size, size_t nmemb, void *userp)
return CURL_WRITEFUNC_PAUSE;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curls = NULL;
- int res = 0;
+ CURLcode res = CURLE_OK;
struct transfer_status st;
start_test_timing();
@@ -114,5 +114,5 @@ test_cleanup:
curl_easy_cleanup(curls);
curl_global_cleanup();
- return (int)res; /* return the final return code */
+ return res; /* return the final return code */
}
tests/libtest/lib1541.c+3 -3
@@ -110,10 +110,10 @@ static size_t write_callback(void *ptr, size_t size, size_t nmemb, void *userp)
return size * nmemb;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curls = NULL;
- int res = 0;
+ CURLcode res = CURLE_OK;
struct transfer_status st;
start_test_timing();
@@ -148,5 +148,5 @@ test_cleanup:
curl_easy_cleanup(curls);
curl_global_cleanup();
- return (int)res; /* return the final return code */
+ return res; /* return the final return code */
}
tests/libtest/lib1542.c+2 -2
@@ -36,10 +36,10 @@
#include "warnless.h"
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *easy = NULL;
- int res = 0;
+ CURLcode res = CURLE_OK;
global_init(CURL_GLOBAL_ALL);
tests/libtest/lib1545.c+2 -2
@@ -26,10 +26,10 @@
#endif
#include "test.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *eh = NULL;
- int res = 0;
+ CURLcode res = CURLE_OK;
struct curl_httppost *lastptr = NULL;
struct curl_httppost *m_formpost = NULL;
tests/libtest/lib1550.c+3 -3
@@ -27,10 +27,10 @@
#include <curl/multi.h>
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLM *handle;
- int res = CURLE_OK;
+ CURLcode res = CURLE_OK;
static const char * const bl_servers[] =
{"Microsoft-IIS/6.0", "nginx/0.8.54", NULL};
static const char * const bl_sites[] =
@@ -44,5 +44,5 @@ int test(char *URL)
curl_multi_setopt(handle, CURLMOPT_PIPELINING_SITE_BL, bl_sites);
curl_multi_cleanup(handle);
curl_global_cleanup();
- return 0;
+ return CURLE_OK;
}
tests/libtest/lib1551.c+2 -2
@@ -27,7 +27,7 @@
#include <curl/multi.h>
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
@@ -49,5 +49,5 @@ int test(char *URL)
test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1552.c+7 -6
@@ -29,13 +29,13 @@
#define TEST_HANG_TIMEOUT 60 * 1000
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curls = NULL;
CURLM *multi = NULL;
int still_running;
- int i = 0;
- int res = 0;
+ CURLcode i = CURLE_OK;
+ CURLcode res = CURLE_OK;
CURLMsg *msg;
int counter = 3;
@@ -59,10 +59,11 @@ int test(char *URL)
abort_on_test_timeout();
while(still_running && counter--) {
+ CURLMcode mres;
int num;
- res = curl_multi_wait(multi, NULL, 0, TEST_HANG_TIMEOUT, &num);
- if(res != CURLM_OK) {
- printf("curl_multi_wait() returned %d\n", res);
+ mres = curl_multi_wait(multi, NULL, 0, TEST_HANG_TIMEOUT, &num);
+ if(mres != CURLM_OK) {
+ printf("curl_multi_wait() returned %d\n", mres);
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
}
tests/libtest/lib1553.c+7 -6
@@ -42,13 +42,13 @@ static int xferinfo(void *p,
return 1; /* fail as fast as we can */
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curls = NULL;
CURLM *multi = NULL;
int still_running;
- int i = 0;
- int res = 0;
+ CURLcode i = CURLE_OK;
+ CURLcode res = CURLE_OK;
curl_mimepart *field = NULL;
curl_mime *mime = NULL;
int counter = 1;
@@ -81,10 +81,11 @@ int test(char *URL)
abort_on_test_timeout();
while(still_running && counter--) {
+ CURLMcode mres;
int num;
- res = curl_multi_wait(multi, NULL, 0, TEST_HANG_TIMEOUT, &num);
- if(res != CURLM_OK) {
- printf("curl_multi_wait() returned %d\n", res);
+ mres = curl_multi_wait(multi, NULL, 0, TEST_HANG_TIMEOUT, &num);
+ if(mres != CURLM_OK) {
+ printf("curl_multi_wait() returned %d\n", mres);
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
}
tests/libtest/lib1554.c+2 -2
@@ -43,7 +43,7 @@ static void my_unlock(CURL *handle, curl_lock_data data, void *useptr)
}
/* test function */
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
CURLSH *share = NULL;
@@ -91,5 +91,5 @@ test_cleanup:
curl_share_cleanup(share);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1555.c+2 -2
@@ -53,9 +53,9 @@ static int progressCallback(void *arg,
return 1;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
- int res = 0;
+ CURLcode res = CURLE_OK;
global_init(CURL_GLOBAL_ALL);
tests/libtest/lib1556.c+3 -3
@@ -44,11 +44,11 @@ static size_t header(void *ptr, size_t size, size_t nmemb, void *stream)
return nmemb * size;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode code;
CURL *curl = NULL;
- int res = 0;
+ CURLcode res = CURLE_OK;
struct headerinfo info = {0};
global_init(CURL_GLOBAL_ALL);
@@ -64,7 +64,7 @@ int test(char *URL)
if(CURLE_OK != code) {
fprintf(stderr, "%s:%d curl_easy_perform() failed, "
"with code %d (%s)\n",
- __FILE__, __LINE__, (int)code, curl_easy_strerror(code));
+ __FILE__, __LINE__, code, curl_easy_strerror(code));
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
}
tests/libtest/lib1557.c+2 -2
@@ -27,13 +27,13 @@
#include "warnless.h"
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLM *curlm = NULL;
CURL *curl1 = NULL;
CURL *curl2 = NULL;
int running_handles = 0;
- int res = 0;
+ CURLcode res = CURLE_OK;
global_init(CURL_GLOBAL_ALL);
tests/libtest/lib1558.c+2 -2
@@ -27,7 +27,7 @@
#include "warnless.h"
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
CURL *curl = NULL;
@@ -58,7 +58,7 @@ int test(char *URL)
curl_easy_cleanup(curl);
curl_global_cleanup();
- return 0;
+ return CURLE_OK;
test_cleanup:
tests/libtest/lib1559.c+4 -4
@@ -28,7 +28,7 @@
#include "memdebug.h"
#define EXCESSIVE 10*1000*1000
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
CURL *curl = NULL;
@@ -37,7 +37,7 @@ int test(char *URL)
(void)URL;
if(!longurl)
- return 1;
+ return (CURLcode)1;
memset(longurl, 'a', EXCESSIVE);
longurl[EXCESSIVE-1] = 0;
@@ -47,11 +47,11 @@ int test(char *URL)
res = curl_easy_setopt(curl, CURLOPT_URL, longurl);
printf("CURLOPT_URL %d bytes URL == %d\n",
- EXCESSIVE, (int)res);
+ EXCESSIVE, res);
res = curl_easy_setopt(curl, CURLOPT_POSTFIELDS, longurl);
printf("CURLOPT_POSTFIELDS %d bytes data == %d\n",
- EXCESSIVE, (int)res);
+ EXCESSIVE, res);
u = curl_url();
if(u) {
tests/libtest/lib1560.c+13 -13
@@ -1847,43 +1847,43 @@ err:
return 1;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
(void)URL; /* not used */
if(urldup())
- return 11;
+ return (CURLcode)11;
if(setget_parts())
- return 10;
+ return (CURLcode)10;
if(get_url())
- return 3;
+ return (CURLcode)3;
if(huge())
- return 9;
+ return (CURLcode)9;
if(get_nothing())
- return 7;
+ return (CURLcode)7;
if(scopeid())
- return 6;
+ return (CURLcode)6;
if(append())
- return 5;
+ return (CURLcode)5;
if(set_url())
- return 1;
+ return (CURLcode)1;
if(set_parts())
- return 2;
+ return (CURLcode)2;
if(get_parts())
- return 4;
+ return (CURLcode)4;
if(clear_url())
- return 8;
+ return (CURLcode)8;
printf("success\n");
- return 0;
+ return CURLE_OK;
}
tests/libtest/lib1564.c+2 -2
@@ -30,12 +30,12 @@
#define TEST_HANG_TIMEOUT 60 * 1000
#define WAKEUP_NUM 10
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLM *multi = NULL;
int numfds;
int i;
- int res = 0;
+ CURLcode res = CURLE_OK;
struct timeval time_before_wait, time_after_wait;
(void)URL;
tests/libtest/lib1565.c+9 -8
@@ -38,7 +38,7 @@
static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
static CURL *pending_handles[CONN_NUM];
static int pending_num = 0;
-static int test_failure = 0;
+static CURLcode test_failure = CURLE_OK;
static CURLM *multi = NULL;
static const char *url;
@@ -46,7 +46,7 @@ static const char *url;
static void *run_thread(void *ptr)
{
CURL *easy = NULL;
- int res = 0;
+ CURLcode res = CURLE_OK;
int i;
(void)ptr;
@@ -89,12 +89,13 @@ test_cleanup:
return NULL;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
int still_running;
int num;
int i;
- int res = 0;
+ int result;
+ CURLcode res = CURLE_OK;
CURL *started_handles[CONN_NUM];
int started_num = 0;
int finished_num = 0;
@@ -110,12 +111,12 @@ int test(char *URL)
url = URL;
- res = pthread_create(&tid, NULL, run_thread, NULL);
- if(!res)
+ result = pthread_create(&tid, NULL, run_thread, NULL);
+ if(!result)
tid_valid = true;
else {
fprintf(stderr, "%s:%d Couldn't create thread, errno %d\n",
- __FILE__, __LINE__, res);
+ __FILE__, __LINE__, result);
goto test_cleanup;
}
@@ -201,7 +202,7 @@ test_cleanup:
}
#else /* without pthread, this test doesn't work */
-int test(char *URL)
+CURLcode test(char *URL)
{
(void)URL;
return 0;
tests/libtest/lib1567.c+2 -2
@@ -27,7 +27,7 @@
#include <curl/multi.h>
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl = NULL;
CURLcode res = CURLE_OK;
@@ -55,5 +55,5 @@ test_cleanup:
curl_url_cleanup(u);
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1568.c+2 -2
@@ -26,7 +26,7 @@
#include "testtrace.h"
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode ret;
CURL *hnd;
@@ -48,5 +48,5 @@ int test(char *URL)
hnd = NULL;
curl_global_cleanup();
- return (int)ret;
+ return ret;
}
tests/libtest/lib1569.c+2 -2
@@ -26,7 +26,7 @@
#include "testtrace.h"
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
CURL *hnd;
@@ -47,5 +47,5 @@ int test(char *URL)
test_cleanup:
curl_easy_cleanup(hnd);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1591.c+2 -2
@@ -73,7 +73,7 @@ static int trailers_callback(struct curl_slist **list, void *userdata)
}
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl = NULL;
CURLcode res = CURLE_FAILED_INIT;
@@ -116,5 +116,5 @@ test_cleanup:
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1592.c+3 -4
@@ -41,7 +41,7 @@
#include <sys/stat.h>
-int test(char *URL)
+CURLcode test(char *URL)
{
int stillRunning;
CURLM *multiHandle = NULL;
@@ -103,8 +103,7 @@ int test(char *URL)
start_test_timing();
mres = curl_multi_remove_handle(multiHandle, curl);
if(mres) {
- fprintf(stderr, "curl_multi_remove_handle() failed, "
- "with code %d\n", (int)res);
+ fprintf(stderr, "curl_multi_remove_handle() failed, with code %d\n", mres);
res = TEST_ERR_MULTI;
goto test_cleanup;
}
@@ -120,5 +119,5 @@ test_cleanup:
curl_multi_cleanup(multiHandle);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1593.c+2 -2
@@ -28,12 +28,12 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
struct curl_slist *header = NULL;
long unmet;
CURL *curl = NULL;
- int res = 0;
+ CURLcode res = CURLE_OK;
global_init(CURL_GLOBAL_ALL);
tests/libtest/lib1594.c+2 -2
@@ -28,12 +28,12 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
struct curl_slist *header = NULL;
curl_off_t retry;
CURL *curl = NULL;
- int res = 0;
+ CURLcode res = CURLE_OK;
global_init(CURL_GLOBAL_ALL);
tests/libtest/lib1597.c+6 -8
@@ -33,10 +33,10 @@ struct pair {
CURLcode *exp;
};
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl = NULL;
- int res = 0;
+ CURLcode res = CURLE_OK;
CURLcode result = CURLE_OK;
curl_version_info_data *curlinfo;
const char *const *proto;
@@ -77,7 +77,7 @@ int test(char *URL)
curlinfo = curl_version_info(CURLVERSION_NOW);
if(!curlinfo) {
fputs("curl_version_info failed\n", stderr);
- res = (int) TEST_ERR_FAILURE;
+ res = TEST_ERR_FAILURE;
goto test_cleanup;
}
@@ -85,7 +85,7 @@ int test(char *URL)
for(proto = curlinfo->protocols; *proto; proto++) {
if((size_t) n >= sizeof(protolist)) {
puts("protolist buffer too small\n");
- res = (int) TEST_ERR_FAILURE;
+ res = TEST_ERR_FAILURE;
goto test_cleanup;
}
n += msnprintf(protolist + n, sizeof(protolist) - n, ",%s", *proto);
@@ -99,17 +99,15 @@ int test(char *URL)
for(i = 0; prots[i].in; i++) {
result = curl_easy_setopt(curl, CURLOPT_PROTOCOLS_STR, prots[i].in);
if(result != *prots[i].exp) {
- printf("unexpectedly '%s' returned %u\n",
- prots[i].in, result);
+ printf("unexpectedly '%s' returned %d\n", prots[i].in, result);
break;
}
}
printf("Tested %u strings\n", i);
- res = (int)result;
test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)result;
+ return result;
}
tests/libtest/lib1598.c+2 -2
@@ -54,7 +54,7 @@ static int trailers_callback(struct curl_slist **list, void *userdata)
static const char *post_data = "xxx=yyy&aaa=bbbbb";
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl = NULL;
CURLcode res = CURLE_FAILED_INIT;
@@ -103,5 +103,5 @@ test_cleanup:
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1662.c+2 -2
@@ -47,7 +47,7 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
CURL *hnd;
@@ -86,5 +86,5 @@ int test(char *URL)
curl_easy_cleanup(hnd);
curl_mime_free(mime1);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1900.c+3 -3
@@ -27,7 +27,7 @@
#include "warnless.h"
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
CURL *hnd = NULL;
@@ -45,11 +45,11 @@ int test(char *URL)
curl_easy_cleanup(hnd);
curl_easy_cleanup(second);
curl_global_cleanup();
- return 0;
+ return CURLE_OK;
test_cleanup:
curl_easy_cleanup(hnd);
curl_easy_cleanup(second);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1901.c+2 -2
@@ -53,7 +53,7 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream)
return 0;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
@@ -91,5 +91,5 @@ test_cleanup:
curl_slist_free_all(chunk);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1903.c+2 -2
@@ -28,7 +28,7 @@
#include "warnless.h"
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
CURL *ch = NULL;
@@ -53,5 +53,5 @@ test_cleanup:
curl_easy_cleanup(ch);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1905.c+3 -3
@@ -28,7 +28,7 @@
#include "warnless.h"
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLSH *sh = NULL;
CURL *ch = NULL;
@@ -40,7 +40,7 @@ int test(char *URL)
cm = curl_multi_init();
if(!cm) {
curl_global_cleanup();
- return 1;
+ return (CURLcode)1;
}
sh = curl_share_init();
if(!sh)
@@ -96,5 +96,5 @@ cleanup:
curl_multi_cleanup(cm);
curl_global_cleanup();
- return 0;
+ return CURLE_OK;
}
tests/libtest/lib1906.c+5 -5
@@ -27,7 +27,7 @@
#include "warnless.h"
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
char *url_after = NULL;
@@ -49,7 +49,7 @@ int test(char *URL)
if(res != CURLE_COULDNT_CONNECT && res != CURLE_OPERATION_TIMEDOUT) {
fprintf(stderr, "failure expected, "
"curl_easy_perform returned %d: <%s>, <%s>\n",
- (int) res, curl_easy_strerror(res), error_buffer);
+ res, curl_easy_strerror(res), error_buffer);
if(res == CURLE_OK)
res = TEST_ERR_MAJOR_BAD; /* force an error return */
goto test_cleanup;
@@ -68,8 +68,8 @@ int test(char *URL)
res = curl_easy_perform(curl);
if(res)
fprintf(stderr, "success expected, "
- "curl_easy_perform returned %ld: <%s>, <%s>\n",
- (long) res, curl_easy_strerror(res), error_buffer);
+ "curl_easy_perform returned %d: <%s>, <%s>\n",
+ res, curl_easy_strerror(res), error_buffer);
/* print url */
curl_url_get(curlu, CURLUPART_URL, &url_after, 0);
@@ -81,5 +81,5 @@ test_cleanup:
curl_url_cleanup(curlu);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1907.c+2 -2
@@ -27,7 +27,7 @@
#include "warnless.h"
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
char *url_after;
CURL *curl;
@@ -52,5 +52,5 @@ int test(char *URL)
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1908.c+2 -2
@@ -27,7 +27,7 @@
#include "warnless.h"
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode ret = CURLE_OK;
CURL *hnd;
@@ -60,5 +60,5 @@ int test(char *URL)
curl_easy_cleanup(hnd);
}
curl_global_cleanup();
- return (int)ret;
+ return ret;
}
tests/libtest/lib1910.c+2 -2
@@ -27,7 +27,7 @@
#include "warnless.h"
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode ret = CURLE_OK;
CURL *hnd;
@@ -45,5 +45,5 @@ int test(char *URL)
curl_easy_cleanup(hnd);
}
curl_global_cleanup();
- return (int)ret;
+ return ret;
}
tests/libtest/lib1911.c+4 -4
@@ -33,7 +33,7 @@
static char buffer[MAX_INPUT_LENGTH + 2];
-int test(char *URL)
+CURLcode test(char *URL)
{
const struct curl_easyoption *o;
CURL *easy;
@@ -44,7 +44,7 @@ int test(char *URL)
easy = curl_easy_init();
if(!easy) {
curl_global_cleanup();
- return 1;
+ return (CURLcode)1;
}
/* make it a null-terminated C string with just As */
@@ -86,7 +86,7 @@ int test(char *URL)
default:
/* all other return codes are unexpected */
fprintf(stderr, "curl_easy_setopt(%s...) returned %d\n",
- o->name, (int)result);
+ o->name, result);
error++;
break;
}
@@ -94,5 +94,5 @@ int test(char *URL)
}
curl_easy_cleanup(easy);
curl_global_cleanup();
- return error;
+ return error == 0 ? CURLE_OK : TEST_ERR_FAILURE;
}
tests/libtest/lib1912.c+2 -2
@@ -30,7 +30,7 @@
#define print_err(name, exp) \
fprintf(stderr, "Type mismatch for CURLOPT_%s (expected %s)\n", name, exp);
-int test(char *URL)
+CURLcode test(char *URL)
{
/* Only test if GCC typechecking is available */
int error = 0;
@@ -80,5 +80,5 @@ int test(char *URL)
}
#endif
(void)URL;
- return error;
+ return error == 0 ? CURLE_OK : TEST_ERR_FAILURE;
}
tests/libtest/lib1913.c+2 -2
@@ -27,7 +27,7 @@
#include "warnless.h"
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode ret = CURLE_OK;
CURL *hnd;
@@ -46,5 +46,5 @@ int test(char *URL)
curl_easy_cleanup(hnd);
}
curl_global_cleanup();
- return (int)ret;
+ return ret;
}
tests/libtest/lib1915.c+4 -4
@@ -96,7 +96,7 @@ static CURLSTScode hstswrite(CURL *easy, struct curl_hstsentry *e,
* Read/write HSTS cache entries via callback.
*/
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
CURL *hnd;
@@ -114,7 +114,7 @@ int test(char *URL)
res = curl_easy_perform(hnd);
curl_easy_cleanup(hnd);
hnd = NULL;
- printf("First request returned %d\n", (int)res);
+ printf("First request returned %d\n", res);
res = CURLE_OK;
easy_init(hnd);
@@ -127,10 +127,10 @@ int test(char *URL)
res = curl_easy_perform(hnd);
curl_easy_cleanup(hnd);
hnd = NULL;
- printf("Second request returned %d\n", (int)res);
+ printf("Second request returned %d\n", res);
test_cleanup:
curl_easy_cleanup(hnd);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1916.c+2 -2
@@ -26,7 +26,7 @@
#include "warnless.h"
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
@@ -52,5 +52,5 @@ int test(char *URL)
curl_easy_cleanup(curl);
}
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1918.c+2 -3
@@ -27,10 +27,9 @@
#include "warnless.h"
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
const struct curl_easyoption *o;
- int error = 0;
(void)URL;
curl_global_init(CURL_GLOBAL_ALL);
@@ -53,5 +52,5 @@ int test(char *URL)
}
}
curl_global_cleanup();
- return error;
+ return CURLE_OK;
}
tests/libtest/lib1919.c+2 -2
@@ -27,7 +27,7 @@
#include "warnless.h"
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
CURL *curl;
@@ -52,5 +52,5 @@ int test(char *URL)
test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1933.c+1 -1
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;
tests/libtest/lib1934.c+1 -1
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;
tests/libtest/lib1935.c+1 -1
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;
tests/libtest/lib1936.c+1 -1
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;
tests/libtest/lib1937.c+1 -1
@@ -26,7 +26,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;
tests/libtest/lib1938.c+1 -1
@@ -26,7 +26,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;
tests/libtest/lib1939.c+1 -1
@@ -26,7 +26,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLM *multi;
CURL *easy;
tests/libtest/lib1940.c+2 -2
@@ -83,7 +83,7 @@ static size_t write_cb(char *data, size_t n, size_t l, void *userp)
(void)userp;
return n*l;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *easy = NULL;
CURLcode res = CURLE_OK;
@@ -116,5 +116,5 @@ int test(char *URL)
test_cleanup:
curl_easy_cleanup(easy);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1945.c+3 -3
@@ -49,7 +49,7 @@ static size_t write_cb(char *data, size_t n, size_t l, void *userp)
(void)userp;
return n*l;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *easy;
CURLcode res = CURLE_OK;
@@ -70,12 +70,12 @@ int test(char *URL)
}
res = curl_easy_perform(easy);
if(res) {
- printf("badness: %d\n", (int)res);
+ printf("badness: %d\n", res);
}
showem(easy, CURLH_CONNECT|CURLH_HEADER|CURLH_TRAILER|CURLH_1XX);
test_cleanup:
curl_easy_cleanup(easy);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1947.c+2 -2
@@ -33,7 +33,7 @@ static size_t writecb(char *data, size_t n, size_t l, void *userp)
(void)userp;
return n*l;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
@@ -88,5 +88,5 @@ int test(char *URL)
test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1948.c+2 -2
@@ -41,7 +41,7 @@ static size_t put_callback(char *ptr, size_t size, size_t nmemb, void *stream)
return tocopy;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
@@ -74,5 +74,5 @@ int test(char *URL)
test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib1955.c+1 -1
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;
tests/libtest/lib1956.c+1 -1
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;
tests/libtest/lib1957.c+1 -1
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;
tests/libtest/lib1958.c+1 -1
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;
tests/libtest/lib1959.c+1 -1
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;
tests/libtest/lib1960.c+4 -4
@@ -68,7 +68,7 @@ static int sockopt_cb(void *clientp,
}
/* Expected args: URL IP PORT */
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl = NULL;
CURLcode res = TEST_ERR_MAJOR_BAD;
@@ -78,7 +78,7 @@ int test(char *URL)
unsigned short port;
if(!strcmp("check", URL))
- return 0; /* no output makes it not skipped */
+ return CURLE_OK; /* no output makes it not skipped */
port = (unsigned short)atoi(libtest_arg3);
@@ -140,10 +140,10 @@ test_cleanup:
return res;
}
#else
-int test(char *URL)
+CURLcode test(char *URL)
{
(void)URL;
printf("lacks inet_pton\n");
- return 0;
+ return CURLE_OK;
}
#endif
tests/libtest/lib1964.c+1 -1
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
tests/libtest/lib1970.c+1 -1
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;
tests/libtest/lib1971.c+1 -1
@@ -35,7 +35,7 @@ static size_t read_callback(char *buffer, size_t size, size_t nitems,
return 0;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;
tests/libtest/lib1972.c+1 -1
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
curl_mime *mime = NULL;
tests/libtest/lib1973.c+1 -1
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;
tests/libtest/lib1974.c+1 -1
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;
tests/libtest/lib1975.c+1 -1
@@ -35,7 +35,7 @@ static size_t read_callback(char *buffer, size_t size, size_t nitems,
return 0;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;
tests/libtest/lib2301.c+13 -13
@@ -27,18 +27,18 @@
#ifdef USE_WEBSOCKETS
#if 0
-static int ping(CURL *curl, const char *send_payload)
+static CURLcode ping(CURL *curl, const char *send_payload)
{
size_t sent;
CURLcode result =
curl_ws_send(curl, send_payload, strlen(send_payload), &sent, CURLWS_PING);
fprintf(stderr,
- "ws: curl_ws_send returned %u, sent %u\n", (int)result, (int)sent);
+ "ws: curl_ws_send returned %d, sent %d\n", result, (int)sent);
- return (int)result;
+ return result;
}
-static int recv_pong(CURL *curl, const char *expected_payload)
+static CURLcode recv_pong(CURL *curl, const char *expected_payload)
{
size_t rlen;
unsigned int rflags;
@@ -58,11 +58,11 @@ static int recv_pong(CURL *curl, const char *expected_payload)
fprintf(stderr, "ws: did NOT get the same payload back\n");
}
else {
- fprintf(stderr, "recv_pong: got %u bytes rflags %x\n", (int)rlen, rflags);
+ fprintf(stderr, "recv_pong: got %d bytes rflags %x\n", (int)rlen, rflags);
}
- fprintf(stderr, "ws: curl_ws_recv returned %u, received %u\n", (int)result,
- rlen);
- return (int)result;
+ fprintf(stderr, "ws: curl_ws_recv returned %d, received %d\n", result,
+ (int)rlen);
+ return result;
}
/* just close the connection */
@@ -72,7 +72,7 @@ static void websocket_close(CURL *curl)
CURLcode result =
curl_ws_send(curl, "", 0, &sent, CURLWS_CLOSE);
fprintf(stderr,
- "ws: curl_ws_send returned %u, sent %u\n", (int)result, (int)sent);
+ "ws: curl_ws_send returned %d, sent %d\n", result, (int)sent);
}
static void websocket(CURL *curl)
@@ -101,7 +101,7 @@ static size_t writecb(char *b, size_t size, size_t nitems, void *p)
0x8a, 0x0
};
size_t incoming = nitems;
- fprintf(stderr, "Called CURLOPT_WRITEFUNCTION with %u bytes: ",
+ fprintf(stderr, "Called CURLOPT_WRITEFUNCTION with %d bytes: ",
(int)nitems);
for(i = 0; i < nitems; i++)
fprintf(stderr, "%02x ", (unsigned char)buffer[i]);
@@ -119,7 +119,7 @@ static size_t writecb(char *b, size_t size, size_t nitems, void *p)
return nitems;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
@@ -137,7 +137,7 @@ int test(char *URL)
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writecb);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, curl);
res = curl_easy_perform(curl);
- fprintf(stderr, "curl_easy_perform() returned %u\n", (int)res);
+ fprintf(stderr, "curl_easy_perform() returned %d\n", res);
#if 0
if(res == CURLE_OK)
websocket(curl);
@@ -146,7 +146,7 @@ int test(char *URL)
curl_easy_cleanup(curl);
}
curl_global_cleanup();
- return (int)res;
+ return res;
}
#else /* no websockets */
tests/libtest/lib2302.c+3 -3
@@ -91,7 +91,7 @@ static size_t writecb(char *buffer, size_t size, size_t nitems, void *p)
return nitems;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
@@ -112,13 +112,13 @@ int test(char *URL)
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writecb);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &ws_data);
res = curl_easy_perform(curl);
- fprintf(stderr, "curl_easy_perform() returned %u\n", (int)res);
+ fprintf(stderr, "curl_easy_perform() returned %d\n", res);
/* always cleanup */
curl_easy_cleanup(curl);
flush_data(&ws_data);
}
curl_global_cleanup();
- return (int)res;
+ return res;
}
#else
tests/libtest/lib2304.c+13 -13
@@ -26,19 +26,19 @@
#ifdef USE_WEBSOCKETS
-static int ping(CURL *curl, const char *send_payload)
+static CURLcode ping(CURL *curl, const char *send_payload)
{
size_t sent;
CURLcode result =
curl_ws_send(curl, send_payload, strlen(send_payload), &sent, 0,
CURLWS_PING);
fprintf(stderr,
- "ws: curl_ws_send returned %u, sent %u\n", (int)result, (int)sent);
+ "ws: curl_ws_send returned %d, sent %d\n", result, (int)sent);
- return (int)result;
+ return result;
}
-static int recv_pong(CURL *curl, const char *expected_payload)
+static CURLcode recv_pong(CURL *curl, const char *expected_payload)
{
size_t rlen;
const struct curl_ws_frame *meta;
@@ -58,16 +58,16 @@ static int recv_pong(CURL *curl, const char *expected_payload)
fprintf(stderr, "ws: did NOT get the same payload back\n");
}
else {
- fprintf(stderr, "recv_pong: got %u bytes rflags %x\n", (int)rlen,
+ fprintf(stderr, "recv_pong: got %d bytes rflags %x\n", (int)rlen,
meta->flags);
}
}
- fprintf(stderr, "ws: curl_ws_recv returned %u, received %u\n", (int)result,
+ fprintf(stderr, "ws: curl_ws_recv returned %d, received %d\n", result,
(int)rlen);
- return (int)result;
+ return result;
}
-static int recv_any(CURL *curl)
+static CURLcode recv_any(CURL *curl)
{
size_t rlen;
const struct curl_ws_frame *meta;
@@ -78,7 +78,7 @@ static int recv_any(CURL *curl)
fprintf(stderr, "recv_any: got %u bytes rflags %x\n", (int)rlen,
meta->flags);
- return 0;
+ return CURLE_OK;
}
/* just close the connection */
@@ -88,7 +88,7 @@ static void websocket_close(CURL *curl)
CURLcode result =
curl_ws_send(curl, "", 0, &sent, 0, CURLWS_CLOSE);
fprintf(stderr,
- "ws: curl_ws_send returned %u, sent %u\n", (int)result, (int)sent);
+ "ws: curl_ws_send returned %d, sent %u\n", result, (int)sent);
}
static void websocket(CURL *curl)
@@ -110,7 +110,7 @@ static void websocket(CURL *curl)
websocket_close(curl);
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
@@ -126,7 +126,7 @@ int test(char *URL)
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 2L); /* websocket style */
res = curl_easy_perform(curl);
- fprintf(stderr, "curl_easy_perform() returned %u\n", (int)res);
+ fprintf(stderr, "curl_easy_perform() returned %d\n", res);
if(res == CURLE_OK)
websocket(curl);
@@ -134,7 +134,7 @@ int test(char *URL)
curl_easy_cleanup(curl);
}
curl_global_cleanup();
- return (int)res;
+ return res;
}
#else
tests/libtest/lib2305.c+6 -6
@@ -34,7 +34,7 @@ static void websocket_close(CURL *curl)
CURLcode result =
curl_ws_send(curl, "", 0, &sent, 0, CURLWS_CLOSE);
fprintf(stderr,
- "ws: curl_ws_send returned %u, sent %u\n", (int)result, (int)sent);
+ "ws: curl_ws_send returned %d, sent %d\n", result, (int)sent);
}
static void websocket(CURL *curl)
@@ -55,10 +55,10 @@ static void websocket(CURL *curl)
if(result == CURLE_AGAIN)
/* crude busy-loop */
continue;
- printf("curl_ws_recv returned %d\n", (int)result);
+ printf("curl_ws_recv returned %d\n", result);
return;
}
- printf("%u: nread %zu Age %u Flags %x "
+ printf("%d: nread %zu Age %d Flags %x "
"Offset %" CURL_FORMAT_CURL_OFF_T " "
"Bytesleft %" CURL_FORMAT_CURL_OFF_T "\n",
(int)i,
@@ -71,7 +71,7 @@ static void websocket(CURL *curl)
websocket_close(curl);
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
@@ -91,7 +91,7 @@ int test(char *URL)
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 2L); /* websocket style */
res = curl_easy_perform(curl);
- fprintf(stderr, "curl_easy_perform() returned %u\n", (int)res);
+ fprintf(stderr, "curl_easy_perform() returned %d\n", res);
if(res == CURLE_OK)
websocket(curl);
@@ -99,7 +99,7 @@ int test(char *URL)
curl_easy_cleanup(curl);
}
curl_global_cleanup();
- return (int)res;
+ return res;
}
#else
tests/libtest/lib2306.c+1 -1
@@ -29,7 +29,7 @@
#define URL2 libtest_arg2
-int test(char *URL)
+CURLcode test(char *URL)
{
/* first a fine GET response, then a bad one */
CURL *cl;
tests/libtest/lib2402.c+2 -2
@@ -31,9 +31,9 @@
#define NUM_HANDLES 4
-int test(char *URL)
+CURLcode test(char *URL)
{
- int res = 0;
+ CURLcode res = CURLE_OK;
CURL *curl[NUM_HANDLES] = {0};
int running;
CURLM *m = NULL;
tests/libtest/lib2404.c+2 -2
@@ -31,9 +31,9 @@
#define NUM_HANDLES 4
-int test(char *URL)
+CURLcode test(char *URL)
{
- int res = 0;
+ CURLcode res = CURLE_OK;
CURL *curl[NUM_HANDLES] = {0};
int running;
CURLM *m = NULL;
tests/libtest/lib2405.c+10 -9
@@ -73,9 +73,9 @@ static size_t emptyWriteFunc(void *ptr, size_t size, size_t nmemb,
return size * nmemb;
}
-static int set_easy(char *URL, CURL *easy, long option)
+static CURLcode set_easy(char *URL, CURL *easy, long option)
{
- int res = CURLE_OK;
+ CURLcode res = CURLE_OK;
/* First set the URL that is about to receive our POST. */
easy_setopt(easy, CURLOPT_URL, URL);
@@ -115,7 +115,7 @@ test_cleanup:
return res;
}
-static int test_run(char *URL, long option, unsigned int *max_fd_count)
+static CURLcode test_run(char *URL, long option, unsigned int *max_fd_count)
{
CURLMcode mc = CURLM_OK;
CURLM *multi = NULL;
@@ -131,7 +131,7 @@ static int test_run(char *URL, long option, unsigned int *max_fd_count)
int msgs_left; /* how many messages are left */
CURLcode result;
- int res = CURLE_OK;
+ CURLcode res = CURLE_OK;
struct curl_waitfd ufds[10];
struct curl_waitfd ufds1[10];
@@ -205,7 +205,7 @@ static int test_run(char *URL, long option, unsigned int *max_fd_count)
result = msg->data.result;
if(!res)
- res = (int)result;
+ res = result;
}
}
@@ -221,10 +221,11 @@ test_cleanup:
if(max_fd_count)
*max_fd_count = max_count;
+
return res;
}
-static int empty_multi_test(void)
+static CURLcode empty_multi_test(void)
{
CURLMcode mc = CURLM_OK;
CURLM *multi = NULL;
@@ -232,7 +233,7 @@ static int empty_multi_test(void)
struct curl_waitfd ufds[10];
- int res = CURLE_OK;
+ CURLcode res = CURLE_OK;
unsigned int fd_count = 0;
multi_init(multi);
@@ -282,9 +283,9 @@ test_cleanup:
return res;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
- int res = CURLE_OK;
+ CURLcode res = CURLE_OK;
unsigned int fd_count = 0;
global_init(CURL_GLOBAL_ALL);
tests/libtest/lib2502.c+2 -2
@@ -31,9 +31,9 @@
#define NUM_HANDLES 4
-int test(char *URL)
+CURLcode test(char *URL)
{
- int res = 0;
+ CURLcode res = CURLE_OK;
CURL *curl[NUM_HANDLES] = {0};
int running;
CURLM *m = NULL;
tests/libtest/lib3010.c+1 -1
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode ret = CURLE_OK;
CURL *curl = NULL;
tests/libtest/lib3025.c+2 -2
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res;
CURL *curl;
@@ -57,5 +57,5 @@ test_cleanup:
curl_slist_free_all(icy);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib3026.c+11 -11
@@ -45,7 +45,7 @@ static unsigned int WINAPI run_thread(void *ptr)
return 0;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
#ifdef _WIN32_WCE
typedef HANDLE curl_win_thread_handle_t;
@@ -64,7 +64,7 @@ int test(char *URL)
fprintf(stderr, "%s:%d On Windows but the "
"CURL_VERSION_THREADSAFE feature flag is not set\n",
__FILE__, __LINE__);
- return -1;
+ return (CURLcode)-1;
}
/* On Windows libcurl global init/cleanup calls LoadLibrary/FreeLibrary for
@@ -105,7 +105,7 @@ cleanup:
}
}
- return test_failure;
+ return (CURLcode)test_failure;
}
#elif defined(HAVE_PTHREAD_H)
@@ -123,12 +123,12 @@ static void *run_thread(void *ptr)
return NULL;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode results[NUM_THREADS];
pthread_t tids[NUM_THREADS];
unsigned tid_count = NUM_THREADS, i;
- int test_failure = 0;
+ CURLcode test_failure = CURLE_OK;
curl_version_info_data *ver;
(void) URL;
@@ -137,7 +137,7 @@ int test(char *URL)
fprintf(stderr, "%s:%d Have pthread but the "
"CURL_VERSION_THREADSAFE feature flag is not set\n",
__FILE__, __LINE__);
- return -1;
+ return (CURLcode)-1;
}
for(i = 0; i < tid_count; i++) {
@@ -148,7 +148,7 @@ int test(char *URL)
fprintf(stderr, "%s:%d Couldn't create thread, errno %d\n",
__FILE__, __LINE__, res);
tid_count = i;
- test_failure = -1;
+ test_failure = (CURLcode)-1;
goto cleanup;
}
}
@@ -160,7 +160,7 @@ cleanup:
fprintf(stderr, "%s:%d thread[%u]: curl_global_init() failed,"
"with code %d (%s)\n", __FILE__, __LINE__,
i, (int) results[i], curl_easy_strerror(results[i]));
- test_failure = -1;
+ test_failure = (CURLcode)-1;
}
}
@@ -168,7 +168,7 @@ cleanup:
}
#else /* without pthread or Windows, this test doesn't work */
-int test(char *URL)
+CURLcode test(char *URL)
{
curl_version_info_data *ver;
(void)URL;
@@ -178,8 +178,8 @@ int test(char *URL)
fprintf(stderr, "%s:%d No pthread but the "
"CURL_VERSION_THREADSAFE feature flag is set\n",
__FILE__, __LINE__);
- return -1;
+ return (CURLcode)-1;
}
- return 0;
+ return CURLE_OK;
}
#endif
tests/libtest/lib3027.c+2 -2
@@ -27,7 +27,7 @@
#include "warnless.h"
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode ret = CURLE_OK;
CURL *hnd;
@@ -52,5 +52,5 @@ int test(char *URL)
curl_easy_cleanup(hnd);
}
curl_global_cleanup();
- return (int)ret;
+ return ret;
}
tests/libtest/lib3100.c+3 -3
@@ -24,9 +24,9 @@
#include "test.h"
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
- int res;
+ CURLcode res;
CURL *curl;
if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
@@ -54,7 +54,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_DESCRIBE);
res = curl_easy_perform(curl);
- if(res != (int)CURLE_OK) {
+ if(res != CURLE_OK) {
fprintf(stderr, "Failed to send DESCRIBE: %d\n", res);
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
tests/libtest/lib3101.c+3 -3
@@ -24,9 +24,9 @@
#include "test.h"
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
- int res;
+ CURLcode res;
CURL *curl;
if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
@@ -51,7 +51,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_REDIR_PROTOCOLS_STR, "https");
res = curl_easy_perform(curl);
- if(res != (int)CURLE_OK) {
+ if(res != CURLE_OK) {
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
}
tests/libtest/lib3102.c+1 -1
@@ -88,7 +88,7 @@ static size_t wrfu(void *ptr, size_t size, size_t nmemb, void *stream)
return size * nmemb;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
tests/libtest/lib3103.c+3 -3
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
CURLSH *share;
@@ -59,8 +59,8 @@ test_cleanup:
/* always cleanup */
curl_easy_cleanup(curl);
- curl_share_cleanup(share);
+ curl_share_cleanup(share);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib500.c+2 -2
@@ -59,7 +59,7 @@ static void setupcallbacks(CURL *curl)
#endif
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res;
CURL *curl;
@@ -154,5 +154,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib501.c+2 -2
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res;
CURL *curl;
@@ -56,5 +56,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib502.c+2 -2
@@ -33,11 +33,11 @@
* Get a single URL without select().
*/
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *c = NULL;
CURLM *m = NULL;
- int res = 0;
+ CURLcode res = CURLE_OK;
int running;
start_test_timing();
tests/libtest/lib503.c+2 -2
@@ -37,11 +37,11 @@
* auth info.
*/
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *c = NULL;
CURLM *m = NULL;
- int res = 0;
+ CURLcode res = CURLE_OK;
int running;
start_test_timing();
tests/libtest/lib504.c+2 -2
@@ -36,10 +36,10 @@
* Use multi interface to get document over proxy with bad port number.
* This caused the interface to "hang" in libcurl 7.10.2.
*/
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *c = NULL;
- int res = 0;
+ CURLcode res = CURLE_OK;
CURLM *m = NULL;
fd_set rd, wr, exc;
int running;
tests/libtest/lib505.c+1 -1
@@ -36,7 +36,7 @@
* Example based on source code provided by Erick Nuwendam. Thanks!
*/
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
tests/libtest/lib506.c+3 -3
@@ -172,9 +172,9 @@ static char *suburl(const char *base, int i)
/* test function */
-int test(char *URL)
+CURLcode test(char *URL)
{
- int res;
+ CURLcode res;
CURLSHcode scode = CURLSHE_OK;
CURLcode code = CURLE_OK;
char *url = NULL;
@@ -261,7 +261,7 @@ int test(char *URL)
curl_easy_cleanup(curl);
- res = 0;
+ res = CURLE_OK;
/* start treads */
for(i = 1; i <= THREADS; i++) {
tests/libtest/lib507.c+3 -3
@@ -29,13 +29,13 @@
#define TEST_HANG_TIMEOUT 60 * 1000
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curls = NULL;
CURLM *multi = NULL;
int still_running;
- int i = -1;
- int res = 0;
+ CURLcode i = (CURLcode)-1;
+ CURLcode res = CURLE_OK;
CURLMsg *msg;
start_test_timing();
tests/libtest/lib508.c+1 -1
@@ -49,7 +49,7 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
return 0; /* no more data left to deliver */
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
tests/libtest/lib509.c+2 -2
@@ -69,7 +69,7 @@ static void custom_free(void *ptr)
}
-int test(char *URL)
+CURLcode test(char *URL)
{
unsigned char a[] = {0x2f, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
0x91, 0xa2, 0xb3, 0xc4, 0xd5, 0xe6, 0xf7};
@@ -113,5 +113,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib510.c+1 -1
@@ -61,7 +61,7 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
return 0; /* no more data left to deliver */
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
tests/libtest/lib511.c+2 -2
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res;
CURL *curl;
@@ -54,5 +54,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib512.c+2 -2
@@ -28,7 +28,7 @@
/* Test case code based on source in a bug report filed by James Bursa on
28 Apr 2004 */
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode code;
int rc = 99;
@@ -72,5 +72,5 @@ int test(char *URL)
else
rc = 5;
- return rc;
+ return (CURLcode)rc;
}
tests/libtest/lib513.c+2 -2
@@ -34,7 +34,7 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
return CURL_READFUNC_ABORT;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
@@ -81,5 +81,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib514.c+2 -2
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
@@ -77,5 +77,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib515.c+2 -2
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
@@ -58,5 +58,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib516.c+2 -2
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
@@ -59,5 +59,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib517.c+2 -2
@@ -153,7 +153,7 @@ static const struct dcheck dates[] = {
{ NULL, 0 }
};
-int test(char *URL)
+CURLcode test(char *URL)
{
int i;
int error = 0;
@@ -169,5 +169,5 @@ int test(char *URL)
}
}
- return error;
+ return error == 0 ? CURLE_OK : TEST_ERR_FAILURE;
}
tests/libtest/lib518.c+5 -5
@@ -445,7 +445,7 @@ static int rlimit(int keep_open)
return 0;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res;
CURL *curl;
@@ -454,9 +454,9 @@ int test(char *URL)
/* used by the test script to ask if we can run this test or not */
if(rlimit(FALSE)) {
fprintf(stdout, "rlimit problem: %s\n", msgbuff);
- return 1;
+ return (CURLcode)1;
}
- return 0; /* sure, run this! */
+ return CURLE_OK; /* sure, run this! */
}
if(rlimit(TRUE)) {
@@ -492,12 +492,12 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
#else /* defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT) */
-int test(char *URL)
+CURLcode test(char *URL)
{
(void)URL;
printf("system lacks necessary system function(s)");
tests/libtest/lib519.c+2 -2
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res;
CURL *curl;
@@ -62,5 +62,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib520.c+2 -2
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res;
CURL *curl;
@@ -53,5 +53,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib521.c+2 -2
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res;
CURL *curl;
@@ -54,5 +54,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib523.c+2 -2
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res;
CURL *curl;
@@ -55,5 +55,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib524.c+2 -2
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res;
CURL *curl;
@@ -53,5 +53,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib525.c+2 -2
@@ -31,9 +31,9 @@
#define TEST_HANG_TIMEOUT 60 * 1000
-int test(char *URL)
+CURLcode test(char *URL)
{
- int res = 0;
+ CURLcode res = CURLE_OK;
CURL *curl = NULL;
FILE *hd_src = NULL;
int hd;
tests/libtest/lib526.c+3 -3
@@ -52,9 +52,9 @@
#define NUM_HANDLES 4
-int test(char *URL)
+CURLcode test(char *URL)
{
- int res = 0;
+ CURLcode res = CURLE_OK;
CURL *curl[NUM_HANDLES];
int running;
CURLM *m = NULL;
@@ -163,7 +163,7 @@ test_cleanup:
cleanup'ed yet, in this case we have to cleanup them or otherwise these
will be leaked, let's use undocumented cleanup sequence - type UB */
- if(res)
+ if(res != CURLE_OK)
for(i = 0; i < NUM_HANDLES; i++)
curl_easy_cleanup(curl[i]);
tests/libtest/lib530.c+20 -16
@@ -191,7 +191,7 @@ static int checkForCompletion(CURLM *curl, int *success)
}
else {
fprintf(stderr, "Got an unexpected message from curl: %i\n",
- (int)message->msg);
+ message->msg);
result = 1;
*success = 0;
}
@@ -228,7 +228,7 @@ static void updateFdSet(struct Sockets *sockets, fd_set* fdset,
}
static int socket_action(CURLM *curl, curl_socket_t s, int evBitmask,
- const char *info)
+ const char *info)
{
int numhandles = 0;
CURLMcode result = curl_multi_socket_action(curl, s, evBitmask, &numhandles);
@@ -258,9 +258,9 @@ static int checkFdSet(CURLM *curl,
return result;
}
-static int testone(char *URL, int timercb, int socketcb)
+static CURLcode testone(char *URL, int timercb, int socketcb)
{
- int res = 0;
+ CURLcode res = CURLE_OK;
CURL *curl = NULL; CURLM *m = NULL;
struct ReadWriteSockets sockets = {{NULL, 0, 0}, {NULL, 0, 0}};
struct timeval timeout = {-1, 0};
@@ -276,7 +276,7 @@ static int testone(char *URL, int timercb, int socketcb)
start_test_timing();
res_global_init(CURL_GLOBAL_ALL);
- if(res)
+ if(res != CURLE_OK)
return res;
easy_init(curl);
@@ -297,9 +297,10 @@ static int testone(char *URL, int timercb, int socketcb)
multi_add_handle(m, curl);
- res = socket_action(m, CURL_SOCKET_TIMEOUT, 0, "timeout");
- if(res)
+ if(socket_action(m, CURL_SOCKET_TIMEOUT, 0, "timeout")) {
+ res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
+ }
while(!checkForCompletion(m, &success)) {
fd_set readSet, writeSet;
@@ -325,18 +326,21 @@ static int testone(char *URL, int timercb, int socketcb)
select_test((int)maxFd, &readSet, &writeSet, NULL, &tv);
/* Check the sockets for reading / writing */
- res = checkFdSet(m, &sockets.read, &readSet, CURL_CSELECT_IN, "read");
- if(res)
+ if(checkFdSet(m, &sockets.read, &readSet, CURL_CSELECT_IN, "read")) {
+ res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
- res = checkFdSet(m, &sockets.write, &writeSet, CURL_CSELECT_OUT, "write");
- if(res)
+ }
+ if(checkFdSet(m, &sockets.write, &writeSet, CURL_CSELECT_OUT, "write")) {
+ res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
+ }
if(timeout.tv_sec != -1 && getMicroSecondTimeout(&timeout) == 0) {
/* Curl's timer has elapsed. */
- res = socket_action(m, CURL_SOCKET_TIMEOUT, 0, "timeout");
- if(res)
+ if(socket_action(m, CURL_SOCKET_TIMEOUT, 0, "timeout")) {
+ res = TEST_ERR_BAD_TIMEOUT;
goto test_cleanup;
+ }
}
abort_on_test_timeout();
@@ -362,9 +366,9 @@ test_cleanup:
return res;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
- int rc;
+ CURLcode rc;
/* rerun the same transfer multiple times and make it fail in different
callback calls */
rc = testone(URL, 0, 0);
@@ -387,5 +391,5 @@ int test(char *URL)
if(!rc)
fprintf(stderr, "test 0/2 failed: %d\n", rc);
- return 0;
+ return CURLE_OK;
}
tests/libtest/lib533.c+2 -2
@@ -33,9 +33,9 @@
#define TEST_HANG_TIMEOUT 60 * 1000
-int test(char *URL)
+CURLcode test(char *URL)
{
- int res = 0;
+ CURLcode res = CURLE_OK;
CURL *curl = NULL;
int running;
CURLM *m = NULL;
tests/libtest/lib536.c+2 -2
@@ -37,7 +37,7 @@ static void proxystat(CURL *curl)
}
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
CURL *curl;
@@ -80,5 +80,5 @@ test_cleanup:
curl_slist_free_all(host);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib537.c+6 -6
@@ -449,7 +449,7 @@ static int rlimit(int keep_open)
return 0;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res;
CURL *curl;
@@ -458,9 +458,9 @@ int test(char *URL)
/* used by the test script to ask if we can run this test or not */
if(rlimit(FALSE)) {
fprintf(stdout, "rlimit problem: %s\n", msgbuff);
- return 1;
+ return (CURLcode)1;
}
- return 0; /* sure, run this! */
+ return CURLE_OK; /* sure, run this! */
}
if(rlimit(TRUE)) {
@@ -496,16 +496,16 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
#else /* defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT) */
-int test(char *URL)
+CURLcode test(char *URL)
{
(void)URL;
printf("system lacks necessary system function(s)");
- return 1; /* skip test */
+ return (CURLcode)1; /* skip test */
}
#endif /* defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT) */
tests/libtest/lib539.c+2 -2
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res;
CURL *curl;
@@ -89,5 +89,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib540.c+11 -11
@@ -48,10 +48,10 @@
static CURL *eh[NUM_HANDLES];
-static int init(int num, CURLM *cm, const char *url, const char *userpwd,
- struct curl_slist *headers)
+static CURLcode init(int num, CURLM *cm, const char *url, const char *userpwd,
+ struct curl_slist *headers)
{
- int res = 0;
+ CURLcode res = CURLE_OK;
res_easy_init(eh[num]);
if(res)
@@ -89,7 +89,7 @@ static int init(int num, CURLM *cm, const char *url, const char *userpwd,
if(res)
goto init_failed;
- return 0; /* success */
+ return CURLE_OK; /* success */
init_failed:
@@ -99,15 +99,15 @@ init_failed:
return res; /* failure */
}
-static int loop(int num, CURLM *cm, const char *url, const char *userpwd,
- struct curl_slist *headers)
+static CURLcode loop(int num, CURLM *cm, const char *url, const char *userpwd,
+ struct curl_slist *headers)
{
CURLMsg *msg;
long L;
int Q, U = -1;
fd_set R, W, E;
struct timeval T;
- int res = 0;
+ CURLcode res = CURLE_OK;
res = init(num, cm, url, userpwd, headers);
if(res)
@@ -189,15 +189,15 @@ static int loop(int num, CURLM *cm, const char *url, const char *userpwd,
return res;
}
- return 0; /* success */
+ return CURLE_OK;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLM *cm = NULL;
struct curl_slist *headers = NULL;
char buffer[246]; /* naively fixed-size */
- int res = 0;
+ CURLcode res = CURLE_OK;
int i;
for(i = 0; i < NUM_HANDLES; i++)
@@ -206,7 +206,7 @@ int test(char *URL)
start_test_timing();
if(test_argc < 4)
- return 99;
+ return (CURLcode)99;
msnprintf(buffer, sizeof(buffer), "Host: %s", HOST);
tests/libtest/lib541.c+2 -2
@@ -33,7 +33,7 @@
* Two FTP uploads, the second with no content sent.
*/
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
@@ -51,7 +51,7 @@ int test(char *URL)
fprintf(stderr, "fopen failed with error: %d %s\n",
errno, strerror(errno));
fprintf(stderr, "Error opening file: %s\n", libtest_arg2);
- return -2; /* if this happens things are major weird */
+ return (CURLcode)-2; /* if this happens things are major weird */
}
/* get the file size of the local file */
tests/libtest/lib542.c+1 -1
@@ -33,7 +33,7 @@
* FTP get with NOBODY but no HEADER
*/
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
tests/libtest/lib543.c+2 -2
@@ -27,7 +27,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
static const unsigned char a[] = {
0x9c, 0x26, 0x4b, 0x3d, 0x49, 0x4, 0xa1, 0x1,
@@ -68,5 +68,5 @@ int test(char *URL)
}
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib544.c+2 -2
@@ -31,7 +31,7 @@ static char teststring[] =
'w', 'i', 't', 'h', ' ', 'a', 'n', ' ',
'e', 'm', 'b', 'e', 'd', 'd', 'e', 'd', ' ', 'N', 'U', 'L'};
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
@@ -80,5 +80,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib547.c+2 -2
@@ -72,7 +72,7 @@ static curlioerr ioctlcallback(CURL *handle,
#endif
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res;
CURL *curl;
@@ -123,5 +123,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib549.c+2 -2
@@ -30,7 +30,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res;
CURL *curl;
@@ -63,5 +63,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib552.c+2 -2
@@ -166,7 +166,7 @@ static curlioerr ioctl_callback(CURL *handle, int cmd, void *clientp)
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
@@ -217,5 +217,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib553.c+2 -2
@@ -57,7 +57,7 @@ static size_t myreadfunc(char *ptr, size_t size, size_t nmemb, void *stream)
static char buf[SIZE_HEADERS + 100];
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_FAILED_INIT;
@@ -109,5 +109,5 @@ test_cleanup:
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib554.c+3 -3
@@ -60,7 +60,7 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
#endif
}
-static int once(char *URL, bool oldstyle)
+static CURLcode once(char *URL, bool oldstyle)
{
CURL *curl;
CURLcode res = CURLE_OK;
@@ -189,9 +189,9 @@ test_cleanup:
return res;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
- int res;
+ CURLcode res;
if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
tests/libtest/lib555.c+2 -2
@@ -76,9 +76,9 @@ static curlioerr ioctlcallback(CURL *handle,
}
-int test(char *URL)
+CURLcode test(char *URL)
{
- int res = 0;
+ CURLcode res = CURLE_OK;
CURL *curl = NULL;
int counter = 0;
CURLM *m = NULL;
tests/libtest/lib556.c+3 -3
@@ -37,7 +37,7 @@
#define STDERR_FILENO 2
#endif
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res;
CURL *curl;
@@ -87,7 +87,7 @@ int test(char *URL)
}
if(iolen)
- res = (CURLcode)TEST_ERR_FAILURE;
+ res = TEST_ERR_FAILURE;
}
test_cleanup:
@@ -95,5 +95,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib557.c+3 -2
@@ -1464,7 +1464,8 @@ static int test_return_codes(void)
return 0;
}
-int test(char *URL)
+
+CURLcode test(char *URL)
{
int errors = 0;
(void)URL; /* not used */
@@ -1504,5 +1505,5 @@ int test(char *URL)
if(errors)
return TEST_ERR_MAJOR_BAD;
else
- return 0;
+ return CURLE_OK;
}
tests/libtest/lib558.c+2 -2
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
unsigned char a[] = {0x2f, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
0x91, 0xa2, 0xb3, 0xc4, 0xd5, 0xe6, 0xf7};
@@ -50,5 +50,5 @@ int test(char *URL)
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib559.c+2 -2
@@ -26,7 +26,7 @@
#include "testtrace.h"
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res;
CURL *curl;
@@ -53,5 +53,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib560.c+2 -2
@@ -39,11 +39,11 @@
* fast/different compared to the real/distant servers we saw the bug happen
* with.
*/
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *http_handle = NULL;
CURLM *multi_handle = NULL;
- int res = 0;
+ CURLcode res = CURLE_OK;
int still_running; /* keep number of running handles */
tests/libtest/lib562.c+1 -1
@@ -37,7 +37,7 @@
*/
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
tests/libtest/lib564.c+2 -2
@@ -31,9 +31,9 @@
#define TEST_HANG_TIMEOUT 60 * 1000
-int test(char *URL)
+CURLcode test(char *URL)
{
- int res = 0;
+ CURLcode res = CURLE_OK;
CURL *curl = NULL;
int running;
CURLM *m = NULL;
tests/libtest/lib566.c+2 -2
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res;
CURL *curl;
@@ -67,5 +67,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib567.c+2 -2
@@ -28,7 +28,7 @@
/*
* Test a simple OPTIONS request with a custom header
*/
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res;
CURL *curl;
@@ -68,5 +68,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib568.c+2 -2
@@ -41,9 +41,9 @@ static char *suburl(const char *base, int i)
/*
* Test the Client->Server ANNOUNCE functionality (PUT style)
*/
-int test(char *URL)
+CURLcode test(char *URL)
{
- int res;
+ CURLcode res;
CURL *curl;
int sdp;
FILE *sdpf = NULL;
tests/libtest/lib569.c+2 -2
@@ -33,9 +33,9 @@ static char *suburl(const char *base, int i)
/*
* Test Session ID capture
*/
-int test(char *URL)
+CURLcode test(char *URL)
{
- int res;
+ CURLcode res;
CURL *curl;
char *stream_uri = NULL;
char *rtsp_session_id;
tests/libtest/lib570.c+4 -4
@@ -30,9 +30,9 @@ static char *suburl(const char *base, int i)
return curl_maprintf("%s%.4d", base, i);
}
-int test(char *URL)
+CURLcode test(char *URL)
{
- int res;
+ CURLcode res;
CURL *curl;
int request = 1;
char *stream_uri = NULL;
@@ -104,11 +104,11 @@ int test(char *URL)
res = curl_easy_perform(curl);
if(res == CURLE_RTSP_SESSION_ERROR) {
- res = 0;
+ res = CURLE_OK;
}
else {
fprintf(stderr, "Failed to detect a Session ID mismatch");
- res = 1;
+ res = (CURLcode)1;
}
test_cleanup:
tests/libtest/lib571.c+2 -2
@@ -100,9 +100,9 @@ static char *suburl(const char *base, int i)
return curl_maprintf("%s%.4d", base, i);
}
-int test(char *URL)
+CURLcode test(char *URL)
{
- int res;
+ CURLcode res;
CURL *curl;
char *stream_uri = NULL;
int request = 1;
tests/libtest/lib572.c+2 -2
@@ -41,9 +41,9 @@ static char *suburl(const char *base, int i)
/*
* Test GET_PARAMETER: PUT, HEARTBEAT, and POST
*/
-int test(char *URL)
+CURLcode test(char *URL)
{
- int res;
+ CURLcode res;
CURL *curl;
int params;
FILE *paramsf = NULL;
tests/libtest/lib573.c+2 -2
@@ -34,11 +34,11 @@
* Get a single URL without select().
*/
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *c = NULL;
CURLM *m = NULL;
- int res = 0;
+ CURLcode res = CURLE_OK;
int running = 1;
double connect_time = 0.0;
double dbl_epsilon;
tests/libtest/lib574.c+2 -2
@@ -36,9 +36,9 @@ static int new_fnmatch(void *ptr,
return CURL_FNMATCHFUNC_MATCH;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
- int res;
+ CURLcode res;
CURL *curl;
if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
tests/libtest/lib575.c+2 -2
@@ -37,12 +37,12 @@
* 3. with multi interface
*/
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *handle = NULL;
CURL *duphandle = NULL;
CURLM *mhandle = NULL;
- int res = 0;
+ CURLcode res = CURLE_OK;
int still_running = 0;
start_test_timing();
tests/libtest/lib576.c+1 -1
@@ -94,7 +94,7 @@ long chunk_end(void *ptr)
return CURL_CHUNK_END_FUNC_OK;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *handle = NULL;
CURLcode res = CURLE_OK;
tests/libtest/lib578.c+1 -1
@@ -50,7 +50,7 @@ static int progress_callback(void *clientp, double dltotal, double dlnow,
return 0;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
tests/libtest/lib579.c+1 -1
@@ -85,7 +85,7 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
return 0; /* no more data left to deliver */
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
tests/libtest/lib582.c+2 -2
@@ -220,9 +220,9 @@ static void checkFdSet(CURLM *curl, struct Sockets *sockets, fd_set *fdset,
}
}
-int test(char *URL)
+CURLcode test(char *URL)
{
- int res = 0;
+ CURLcode res = CURLE_OK;
CURL *curl = NULL;
FILE *hd_src = NULL;
int hd;
tests/libtest/lib583.c+2 -2
@@ -32,7 +32,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
int stillRunning;
CURLM *multiHandle = NULL;
@@ -87,5 +87,5 @@ test_cleanup:
curl_multi_cleanup(multiHandle);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib586.c+1 -1
@@ -129,7 +129,7 @@ static void *fire(void *ptr)
}
/* test function */
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
CURLSHcode scode = CURLSHE_OK;
tests/libtest/lib589.c+2 -2
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
@@ -72,5 +72,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib590.c+2 -2
@@ -38,7 +38,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res;
CURL *curl;
@@ -69,5 +69,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib591.c+2 -2
@@ -35,11 +35,11 @@
#define TEST_HANG_TIMEOUT 60 * 1000
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *easy = NULL;
CURLM *multi = NULL;
- int res = 0;
+ CURLcode res = CURLE_OK;
int running;
int msgs_left;
CURLMsg *msg;
tests/libtest/lib597.c+2 -2
@@ -40,11 +40,11 @@
* with function curl_multi_info_read().
*/
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *easy = NULL;
CURLM *multi = NULL;
- int res = 0;
+ CURLcode res = CURLE_OK;
int running;
int msgs_left;
CURLMsg *msg;
tests/libtest/lib598.c+2 -2
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res;
CURL *curl;
@@ -70,5 +70,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib599.c+1 -1
@@ -41,7 +41,7 @@ static int progress_callback(void *clientp, double dltotal,
return 0;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
tests/libtest/lib643.c+6 -6
@@ -56,7 +56,7 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
return 0; /* no more data left to deliver */
}
-static int once(char *URL, bool oldstyle)
+static CURLcode once(char *URL, bool oldstyle)
{
CURL *curl;
CURLcode res = CURLE_OK;
@@ -223,7 +223,7 @@ test_cleanup:
return res;
}
-static int cyclic_add(void)
+static CURLcode cyclic_add(void)
{
CURL *easy = curl_easy_init();
curl_mime *mime = curl_mime_init(easy);
@@ -242,14 +242,14 @@ static int cyclic_add(void)
curl_easy_cleanup(easy);
if(a1 != CURLE_BAD_FUNCTION_ARGUMENT)
/* that should have failed */
- return 1;
+ return (CURLcode)1;
- return 0;
+ return CURLE_OK;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
- int res;
+ CURLcode res;
if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
tests/libtest/lib650.c+1 -1
@@ -47,7 +47,7 @@ static size_t count_chars(void *userp, const char *buf, size_t len)
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl = NULL;
CURLcode res = TEST_ERR_MAJOR_BAD;
tests/libtest/lib651.c+1 -1
@@ -28,7 +28,7 @@
static char buffer[17000]; /* more than 16K */
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
tests/libtest/lib652.c+4 -4
@@ -27,7 +27,7 @@
static char buffer[17000]; /* more than 16K */
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl = NULL;
CURLcode res = CURLE_OK;
@@ -50,7 +50,7 @@ int test(char *URL)
curl = curl_easy_init();
if(!curl) {
fprintf(stderr, "curl_easy_init() failed\n");
- res = (CURLcode) TEST_ERR_MAJOR_BAD;
+ res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
}
@@ -58,13 +58,13 @@ int test(char *URL)
mime = curl_mime_init(curl);
if(!mime) {
fprintf(stderr, "curl_mime_init() failed\n");
- res = (CURLcode) TEST_ERR_MAJOR_BAD;
+ res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
}
part = curl_mime_addpart(mime);
if(!part) {
fprintf(stderr, "curl_mime_addpart() failed\n");
- res = (CURLcode) TEST_ERR_MAJOR_BAD;
+ res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
}
res = curl_mime_filename(part, "myfile.jpg");
tests/libtest/lib653.c+3 -3
@@ -28,10 +28,10 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curls = NULL;
- int res = 0;
+ CURLcode res = CURLE_OK;
curl_mimepart *field = NULL;
curl_mime *mime = NULL;
@@ -61,5 +61,5 @@ test_cleanup:
curl_mime_free(mime);
curl_easy_cleanup(curls);
curl_global_cleanup();
- return (int) res; /* return the final return code */
+ return res; /* return the final return code */
}
tests/libtest/lib654.c+6 -9
@@ -62,15 +62,14 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
return 0; /* no more data left to deliver */
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *easy = NULL;
CURL *easy2 = NULL;
curl_mime *mime = NULL;
curl_mimepart *part;
struct curl_slist *hdrs = NULL;
- CURLcode result;
- int res = TEST_ERR_FAILURE;
+ CURLcode res = TEST_ERR_FAILURE;
struct WriteThis pooh;
/*
@@ -131,19 +130,17 @@ int test(char *URL)
mime = NULL; /* Already cleaned up. */
/* Perform on the first handle: should not send any data. */
- result = curl_easy_perform(easy);
- if(result) {
+ res = curl_easy_perform(easy);
+ if(res != CURLE_OK) {
fprintf(stderr, "curl_easy_perform(original) failed\n");
- res = (int) result;
goto test_cleanup;
}
/* Perform on the second handle: if the bound mime structure has not been
duplicated properly, it should cause a valgrind error. */
- result = curl_easy_perform(easy2);
- if(result) {
+ res = curl_easy_perform(easy2);
+ if(res != CURLE_OK) {
fprintf(stderr, "curl_easy_perform(duplicated) failed\n");
- res = (int) result;
goto test_cleanup;
}
tests/libtest/lib655.c+2 -2
@@ -58,7 +58,7 @@ resolver_alloc_cb_pass(void *resolver_state, void *reserved, void *userdata)
return 0;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
@@ -110,5 +110,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib658.c+1 -1
@@ -31,7 +31,7 @@
* Get a single URL without select().
*/
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *handle = NULL;
CURLcode res = CURLE_OK;
tests/libtest/lib659.c+1 -1
@@ -31,7 +31,7 @@
* Get a single URL without select().
*/
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *handle = NULL;
CURLcode res = CURLE_OK;
tests/libtest/lib661.c+2 -2
@@ -24,7 +24,7 @@
#include "test.h"
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res;
CURL *curl = NULL;
@@ -164,5 +164,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib666.c+4 -4
@@ -27,7 +27,7 @@
static char buffer[17000]; /* more than 16K */
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl = NULL;
CURLcode res = CURLE_OK;
@@ -52,7 +52,7 @@ int test(char *URL)
curl = curl_easy_init();
if(!curl) {
fprintf(stderr, "curl_easy_init() failed\n");
- res = (CURLcode) TEST_ERR_MAJOR_BAD;
+ res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
}
@@ -60,13 +60,13 @@ int test(char *URL)
mime = curl_mime_init(curl);
if(!mime) {
fprintf(stderr, "curl_mime_init() failed\n");
- res = (CURLcode) TEST_ERR_MAJOR_BAD;
+ res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
}
part = curl_mime_addpart(mime);
if(!part) {
fprintf(stderr, "curl_mime_addpart() failed\n");
- res = (CURLcode) TEST_ERR_MAJOR_BAD;
+ res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
}
res = curl_mime_name(part, "upfile");
tests/libtest/lib667.c+4 -6
@@ -54,13 +54,12 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
return 0; /* no more data left to deliver */
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *easy = NULL;
curl_mime *mime = NULL;
curl_mimepart *part;
- CURLcode result;
- int res = TEST_ERR_FAILURE;
+ CURLcode res = TEST_ERR_FAILURE;
struct WriteThis pooh;
/*
@@ -100,10 +99,9 @@ int test(char *URL)
test_setopt(easy, CURLOPT_MIMEPOST, mime);
/* Send data. */
- result = curl_easy_perform(easy);
- if(result) {
+ res = curl_easy_perform(easy);
+ if(res != CURLE_OK) {
fprintf(stderr, "curl_easy_perform() failed\n");
- res = (int) result;
}
test_cleanup:
tests/libtest/lib668.c+4 -6
@@ -48,13 +48,12 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
return len;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *easy = NULL;
curl_mime *mime = NULL;
curl_mimepart *part;
- CURLcode result;
- int res = TEST_ERR_FAILURE;
+ CURLcode res = TEST_ERR_FAILURE;
struct WriteThis pooh1, pooh2;
/*
@@ -104,10 +103,9 @@ int test(char *URL)
test_setopt(easy, CURLOPT_MIMEPOST, mime);
/* Send data. */
- result = curl_easy_perform(easy);
- if(result) {
+ res = curl_easy_perform(easy);
+ if(res != CURLE_OK) {
fprintf(stderr, "curl_easy_perform() failed\n");
- res = (int) result;
}
test_cleanup:
tests/libtest/lib670.c+8 -11
@@ -97,7 +97,7 @@ static int xferinfo(void *clientp, curl_off_t dltotal, curl_off_t dlnow,
}
#endif
-int test(char *URL)
+CURLcode test(char *URL)
{
#if defined(LIB670) || defined(LIB671)
curl_mime *mime = NULL;
@@ -116,8 +116,7 @@ int test(char *URL)
#endif
struct ReadThis pooh;
- CURLcode result;
- int res = TEST_ERR_FAILURE;
+ CURLcode res = TEST_ERR_FAILURE;
/*
* Check proper pausing/unpausing from a mime or form read callback.
@@ -145,11 +144,11 @@ int test(char *URL)
/* Build the mime tree. */
mime = curl_mime_init(pooh.easy);
part = curl_mime_addpart(mime);
- result = curl_mime_name(part, name);
- if(result) {
+ res = curl_mime_name(part, name);
+ if(res != CURLE_OK) {
fprintf(stderr,
"Something went wrong when building the mime structure: %d\n",
- (int) result);
+ res);
goto test_cleanup;
}
@@ -157,7 +156,7 @@ int test(char *URL)
NULL, NULL, &pooh);
/* Bind mime data to its easy handle. */
- if(!res)
+ if(res == CURLE_OK)
test_setopt(pooh.easy, CURLOPT_MIMEPOST, mime);
#else
/* Build the form. */
@@ -233,8 +232,7 @@ int test(char *URL)
if(!msg)
break;
if(msg->msg == CURLMSG_DONE) {
- result = msg->data.result;
- res = (int) result;
+ res = msg->data.result;
}
}
@@ -246,8 +244,7 @@ int test(char *URL)
test_setopt(pooh.easy, CURLOPT_XFERINFODATA, &pooh);
test_setopt(pooh.easy, CURLOPT_XFERINFOFUNCTION, xferinfo);
test_setopt(pooh.easy, CURLOPT_NOPROGRESS, 0L);
- result = curl_easy_perform(pooh.easy);
- res = (int) result;
+ res = curl_easy_perform(pooh.easy);
#endif
tests/libtest/lib674.c+1 -1
@@ -31,7 +31,7 @@
* Get a single URL without select().
*/
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *handle = NULL;
CURL *handle2;
tests/libtest/lib676.c+2 -2
@@ -25,7 +25,7 @@
#include "memdebug.h"
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLcode res;
CURL *curl;
@@ -66,5 +66,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/lib677.c+2 -2
@@ -30,7 +30,7 @@
static const char cmd[] = "A1 IDLE\r\n";
static char buf[1024];
-int test(char *URL)
+CURLcode test(char *URL)
{
CURLM *mcurl;
CURL *curl = NULL;
@@ -39,7 +39,7 @@ int test(char *URL)
time_t start = time(NULL);
int state = 0;
ssize_t pos = 0;
- int res = 0;
+ CURLcode res = CURLE_OK;
global_init(CURL_GLOBAL_DEFAULT);
multi_init(mcurl);
tests/libtest/lib678.c+5 -5
@@ -63,7 +63,7 @@ static int loadfile(const char *filename, void **filedata, size_t *filesize)
return data ? 1 : 0;
}
-static int test_cert_blob(const char *url, const char *cafile)
+static CURLcode test_cert_blob(const char *url, const char *cafile)
{
CURLcode code = CURLE_OUT_OF_MEMORY;
CURL *curl;
@@ -94,12 +94,12 @@ static int test_cert_blob(const char *url, const char *cafile)
}
curl_easy_cleanup(curl);
- return (int)code;
+ return code;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
- int res = 0;
+ CURLcode res = CURLE_OK;
curl_global_init(CURL_GLOBAL_DEFAULT);
if(!strcmp("check", URL)) {
CURL *e;
@@ -112,7 +112,7 @@ int test(char *URL)
printf("CURLOPT_CAINFO_BLOB is not supported\n");
curl_easy_cleanup(e);
}
- res = (int)w;
+ res = w;
}
else
res = test_cert_blob(URL, libtest_arg2);
tests/libtest/libauthretry.c+4 -4
@@ -60,13 +60,13 @@ test_cleanup:
static CURLcode send_wrong_password(CURL *curl, const char *url, int seq,
long auth_scheme)
{
- return send_request(curl, url, seq, auth_scheme, "testuser:wrongpass");
+ return send_request(curl, url, seq, auth_scheme, "testuser:wrongpass");
}
static CURLcode send_right_password(CURL *curl, const char *url, int seq,
long auth_scheme)
{
- return send_request(curl, url, seq, auth_scheme, "testuser:testpass");
+ return send_request(curl, url, seq, auth_scheme, "testuser:testpass");
}
static long parse_auth_name(const char *arg)
@@ -82,7 +82,7 @@ static long parse_auth_name(const char *arg)
return CURLAUTH_NONE;
}
-int test(char *url)
+CURLcode test(char *url)
{
CURLcode res;
CURL *curl = NULL;
@@ -145,5 +145,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
- return (int)res;
+ return res;
}
tests/libtest/libntlmconnect.c+2 -2
@@ -36,7 +36,7 @@
static int counter[MAX_EASY_HANDLES];
static CURL *easy[MAX_EASY_HANDLES];
static curl_socket_t sockets[MAX_EASY_HANDLES];
-static int res = 0;
+static CURLcode res = CURLE_OK;
static size_t callback(char *ptr, size_t size, size_t nmemb, void *data)
{
@@ -89,7 +89,7 @@ enum HandleState {
NoMoreHandles
};
-int test(char *url)
+CURLcode test(char *url)
{
CURLM *multi = NULL;
int running;
tests/libtest/libprereq.c+1 -1
@@ -51,7 +51,7 @@ static int prereq_callback(void *clientp,
return prereq_cb->prereq_retcode;
}
-int test(char *URL)
+CURLcode test(char *URL)
{
PRCS prereq_cb;
CURLcode ret = CURLE_OK;
tests/libtest/mk-lib1521.pl+2 -2
@@ -146,7 +146,7 @@ static curl_hstswrite_callback hstswritecb;
static curl_resolver_start_callback resolver_start_cb;
static curl_prereq_callback prereqcb;
-int test(char *URL)
+CURLcode test(char *URL)
{
CURL *curl = NULL;
CURL *dep = NULL;
@@ -363,7 +363,7 @@ test_cleanup:
curl_share_cleanup(share);
curl_global_cleanup();
- return (int)res;
+ return res;
}
FOOTER
;
tests/libtest/test.h+4 -4
@@ -68,8 +68,8 @@ extern int select_wrapper(int nfds, fd_set *rd, fd_set *wr, fd_set *exc,
extern void wait_ms(int ms); /* wait this many milliseconds */
-extern int test(char *URL); /* the actual test function provided by each
- individual libXXX.c file */
+extern CURLcode test(char *URL); /* the actual test function provided by each
+ individual libXXX.c file */
extern char *hexdump(const unsigned char *buffer, size_t len);
@@ -490,11 +490,11 @@ extern int unitfail;
chk_global_init((A), (__FILE__), (__LINE__))
#define NO_SUPPORT_BUILT_IN \
- int test(char *URL) \
+ CURLcode test(char *URL) \
{ \
(void)URL; \
fprintf(stderr, "Missing support\n"); \
- return 1; \
+ return (CURLcode)1; \
}
/* ---------------------------------------------------------------- */
tests/unit/curlcheck.h+2 -2
@@ -94,7 +94,7 @@
#define UNITTEST_START \
- int test(char *arg) \
+ CURLcode test(char *arg) \
{ \
(void)arg; \
if(unit_setup()) { \
@@ -107,5 +107,5 @@
unit_test_abort: \
unit_stop(); \
} \
- return unitfail; \
+ return (CURLcode)unitfail; \
}
tests/unit/unit1303.c+2 -2
@@ -69,8 +69,8 @@ static void unit_stop(void)
struct timetest {
int now_s;
int now_us;
- int timeout_ms;
- int connecttimeout_ms;
+ unsigned int timeout_ms;
+ unsigned int connecttimeout_ms;
bool connecting;
timediff_t result;
const char *comment;
tests/unit/unit1308.c+6 -5
@@ -44,7 +44,8 @@ static size_t print_httppost_callback(void *arg, const char *buf, size_t len)
}
UNITTEST_START
- int rc;
+ CURLFORMcode rc;
+ int res;
struct curl_httppost *post = NULL;
struct curl_httppost *last = NULL;
size_t total_size = 0;
@@ -70,9 +71,9 @@ UNITTEST_START
fail_unless(rc == 0, "curl_formadd returned error");
- rc = curl_formget(post, &total_size, print_httppost_callback);
+ res = curl_formget(post, &total_size, print_httppost_callback);
- fail_unless(rc == 0, "curl_formget returned error");
+ fail_unless(res == 0, "curl_formget returned error");
fail_unless(total_size == 518, "curl_formget got wrong size back");
@@ -89,8 +90,8 @@ UNITTEST_START
fail_unless(rc == 0, "curl_formadd returned error");
- rc = curl_formget(post, &total_size, print_httppost_callback);
- fail_unless(rc == 0, "curl_formget returned error");
+ res = curl_formget(post, &total_size, print_httppost_callback);
+ fail_unless(res == 0, "curl_formget returned error");
fail_unless(total_size == 899, "curl_formget got wrong size back");
curl_formfree(post);
tests/unit/unit1603.c+1 -1
@@ -31,7 +31,7 @@
#include "memdebug.h" /* LAST include file */
static struct Curl_hash hash_static;
-static const int slots = 3;
+static const size_t slots = 3;
static void mydtor(void *p)
{
tests/unit/unit1620.c+1 -1
@@ -42,7 +42,7 @@ static void unit_stop(void)
UNITTEST_START
{
- int rc;
+ CURLcode rc;
struct Curl_easy *empty;
const char *hostname = "hostname";
enum dupstring i;
tests/unit/unit1650.c+10 -10
@@ -57,13 +57,13 @@ struct dohrequest {
/* output */
const char *packet;
size_t size;
- int rc;
+ DOHcode rc;
};
static const struct dohrequest req[] = {
- {"test.host.name", DNS_TYPE_A, DNS_Q1, sizeof(DNS_Q1)-1, 0 },
- {"test.host.name", DNS_TYPE_AAAA, DNS_Q2, sizeof(DNS_Q2)-1, 0 },
+ {"test.host.name", DNS_TYPE_A, DNS_Q1, sizeof(DNS_Q1)-1, DOH_OK },
+ {"test.host.name", DNS_TYPE_AAAA, DNS_Q2, sizeof(DNS_Q2)-1, DOH_OK },
{"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
".host.name",
DNS_TYPE_AAAA, NULL, 0, DOH_DNS_BAD_LABEL }
@@ -76,7 +76,7 @@ struct dohresp {
DNStype type;
/* output */
- int rc;
+ DOHcode rc;
const char *out;
};
@@ -161,8 +161,8 @@ UNITTEST_START
unsigned char *p;
for(i = 0; i < sizeof(req) / sizeof(req[0]); i++) {
- int rc = doh_encode(req[i].name, req[i].type,
- buffer, sizeof(buffer), &size);
+ DOHcode rc = doh_encode(req[i].name, req[i].type,
+ buffer, sizeof(buffer), &size);
if(rc != req[i].rc) {
fprintf(stderr, "req %zu: Expected return code %d got %d\n", i,
req[i].rc, rc);
@@ -185,7 +185,7 @@ UNITTEST_START
for(i = 0; i < sizeof(resp) / sizeof(resp[0]); i++) {
struct dohentry d;
- int rc;
+ DOHcode rc;
char *ptr;
size_t len;
int u;
@@ -243,7 +243,7 @@ UNITTEST_START
/* pass all sizes into the decoder until full */
for(i = 0; i < sizeof(full49)-1; i++) {
struct dohentry d;
- int rc;
+ DOHcode rc;
memset(&d, 0, sizeof(d));
rc = doh_decode((const unsigned char *)full49, i, DNS_TYPE_A, &d);
if(!rc) {
@@ -256,7 +256,7 @@ UNITTEST_START
/* and try all pieces from the other end of the packet */
for(i = 1; i < sizeof(full49); i++) {
struct dohentry d;
- int rc;
+ DOHcode rc;
memset(&d, 0, sizeof(d));
rc = doh_decode((const unsigned char *)&full49[i], sizeof(full49)-i-1,
DNS_TYPE_A, &d);
@@ -268,7 +268,7 @@ UNITTEST_START
}
{
- int rc;
+ DOHcode rc;
struct dohentry d;
struct dohaddr *a;
memset(&d, 0, sizeof(d));
tests/unit/unit1660.c+1 -1
@@ -41,7 +41,7 @@ unit_stop(void)
#if defined(CURL_DISABLE_HTTP) || defined(CURL_DISABLE_HSTS)
UNITTEST_START
{
- return 0; /* nothing to do when HTTP or HSTS are disabled */
+ return CURLE_OK; /* nothing to do when HTTP or HSTS are disabled */
}
UNITTEST_STOP
#else
tests/unit/unit2604.c+1 -1
@@ -104,7 +104,7 @@ UNITTEST_START
}
free((void *)list[0].cp);
- return error;
+ return error == 0 ? CURLE_OK : TEST_ERR_FAILURE;
}
#endif
tests/unit/unit3200.c+2 -2
@@ -88,7 +88,7 @@ UNITTEST_START
for(i = 0; i < NUMTESTS; i++) {
FILE *fp;
struct dynbuf buf;
- int len = 4096;
+ size_t len = 4096;
char *line;
Curl_dyn_init(&buf, len);
@@ -169,7 +169,7 @@ UNITTEST_START
fclose(fp);
fprintf(stderr, "OK\n");
}
- return rc;
+ return (CURLcode)rc;
UNITTEST_STOP
#ifdef __GNUC__