aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/unit1309.c
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2018-04-27 16:19:43 -0700
committerElliott Hughes <enh@google.com>2018-05-29 13:40:19 -0700
commitcac3980d6d12690fe9c8aa2ca6bae981c8abb508 (patch)
tree9e228338321c29a79ed20af99d3b2eda7e84f984 /tests/unit/unit1309.c
parent3685a4d3467796179daa96d4c9950b4d2cc34c2e (diff)
downloadexternal_curl-cac3980d6d12690fe9c8aa2ca6bae981c8abb508.tar.gz
external_curl-cac3980d6d12690fe9c8aa2ca6bae981c8abb508.tar.bz2
external_curl-cac3980d6d12690fe9c8aa2ca6bae981c8abb508.zip
Update to 7.59.0 - March 14 2018.
Changes: curl: add --proxy-pinnedpubkey added: CURLOPT_TIMEVALUE_LARGE and CURLINFO_FILETIME_T CURLOPT_RESOLVE: Add support for multiple IP addresses per entry Add option CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS Add new tool option --happy-eyeballs-timeout-ms Add CURLOPT_RESOLVER_START_FUNCTION and CURLOPT_RESOLVER_START_DATA Bugfixes: openldap: check ldap_get_attribute_ber() results for NULL before using FTP: reject path components with control codes readwrite: make sure excess reads don't go beyond buffer end lib555: drop text conversion and encode data as ascii codes lib517: make variable static to avoid compiler warning lib544: sync ascii code data with textual data GSKit: restore pinnedpubkey functionality darwinssl: Don't import client certificates into Keychain on macOS parsedate: fix date parsing for systems with 32 bit long openssl: fix pinned public key build error in FIPS mode SChannel/WinSSL: Implement public key pinning cookies: remove verbose "cookie size:" output progress-bar: don't use stderr explicitly, use bar->out Fixes for MSDOS build: open VC15 projects with VS 2017 curl_ctype: private is*() type macros and functions configure: set PATH_SEPARATOR to colon for PATH w/o separator winbuild: make linker generate proper PDB curl_easy_reset: clear digest auth state curl/curl.h: fix comment typo for CURLOPT_DNS_LOCAL_IP6 range: commonize FTP and FILE range handling progress-bar docs: update to match implementation fnmatch: do not match the empty string with a character set fnmatch: accept an alphanum to be followed by a non-alphanum in char set build: fix termios issue on android cross-compile getdate: return -1 for out of range formdata: use the mime-content type function time-cond: fix reading the file modification time on Windows build-openssl.bat: Extend VC15 support to include Enterprise and Professional build-wolfssl.bat: Extend VC15 support to include Enterprise and Professional openssl: Don't add verify locations when verifypeer==0 fnmatch: optimize processing of consecutive *s and ?s pattern characters schannel: fix compiler warnings content_encoding: Add "none" alias to "identity" get_posix_time: only check for overflows if they can happen http_chunks: don't write chunks twice with CURLOPT_HTTP_TRANSFER_DECODING README: language fix sha256: build with OpenSSL < 0.9.8 smtp: fix processing of initial dot in data --tlsauthtype: works only if libcurl is built with TLS-SRP support tests: new tests for http raw mode libcurl-security.3: man page discussion security concerns when using libcurl curl_gssapi: make sure this file too uses our *printf() BINDINGS: fix curb link (and remove ruby-curl-multi) nss: use PK11_CreateManagedGenericObject() if available travis: add build with iconv enabled ssh: add two missing state names CURLOPT_HEADERFUNCTION.3: mention folded headers http: fix the max header length detection logic header callback: don't chop headers into smaller pieces CURLOPT_HEADER.3: clarify problems with different data sizes curl --version: show PSL if the run-time lib has it enabled examples/sftpuploadresume: resume upload via CURLOPT_APPEND Return error if called recursively from within callbacks sasl: prefer PLAIN mechanism over LOGIN winbuild: Use CALL to run batch scripts curl_share_setopt.3: connection cache is shared within multi handles winbuild: Use macros for the names of some build utilities projects/README: remove reference to dead IDN link/package lib655: silence compiler warning configure: Fix version check for OpenSSL 1.1.1 docs/MANUAL: formfind.pl is not accessible on the site anymore unit1309: fix warning on Windows x64 unit1307: proper cleanup on OOM to fix torture tests curl_ctype: fix macro redefinition warnings build: get CFLAGS (including -werror) used for examples and tests NO_PROXY: fix for IPv6 numericals in the URL krb5: use nondeprecated functions winbuild: prefer documented zlib library names http2: mark the connection for close on GOAWAY limit-rate: kick in even before "limit" data has been received HTTP: allow "header;" to replace an internal header with a blank one http2: verbose output new MAX_CONCURRENT_STREAMS values SECURITY: distros' max embargo time is 14 days curl tool: accept --compressed also if Brotli is enabled and zlib is not WolfSSL: adding TLSv1.3 checksrc.pl: add -i and -m options CURLOPT_COOKIEFILE.3: "-" as file name means stdin Bug: http://b/78771319 Test: builds, boots, `vendor/google/tools/fake-ota on streaming` works Change-Id: I18731dd7c91df36ca92a5dffc8631dee22785e34
Diffstat (limited to 'tests/unit/unit1309.c')
-rw-r--r--tests/unit/unit1309.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/unit/unit1309.c b/tests/unit/unit1309.c
index c53cbcbc..9a07c933 100644
--- a/tests/unit/unit1309.c
+++ b/tests/unit/unit1309.c
@@ -22,6 +22,7 @@
#include "curlcheck.h"
#include "splay.h"
+#include "warnless.h"
static CURLcode unit_setup(void)
@@ -86,7 +87,8 @@ UNITTEST_START
key.tv_usec = (541*i)%1023;
payload = (size_t) key.tv_usec;
- nodes[i].payload = (void *)payload; /* for simplicity */
+ /* for simplicity */
+ nodes[i].payload = CURLX_INTEGER_TO_POINTER_CAST(payload);
root = Curl_splayinsert(key, root, &nodes[i]);
}
@@ -98,7 +100,7 @@ UNITTEST_START
printf("Tree look:\n");
splayprint(root, 0, 1);
printf("remove pointer %d, payload %ld\n", rem,
- (long)(nodes[rem].payload));
+ CURLX_POINTER_TO_INTEGER_CAST(nodes[rem].payload));
rc = Curl_splayremovebyaddr(root, &nodes[rem], &root);
if(rc) {
/* failed! */
@@ -119,7 +121,8 @@ UNITTEST_START
/* add some nodes with the same key */
for(j = 0; j <= i % 3; j++) {
size_t payload = key.tv_usec*10 + j;
- nodes[i * 3 + j].payload = (void *)payload; /* for simplicity */
+ /* for simplicity */
+ nodes[i * 3 + j].payload = CURLX_INTEGER_TO_POINTER_CAST(payload);
root = Curl_splayinsert(key, root, &nodes[i * 3 + j]);
}
}
@@ -130,8 +133,9 @@ UNITTEST_START
tv_now.tv_usec = i;
root = Curl_splaygetbest(tv_now, root, &removed);
while(removed != NULL) {
- printf("removed payload %ld[%ld]\n", (long)(removed->payload) / 10,
- (long)(removed->payload) % 10);
+ printf("removed payload %ld[%ld]\n",
+ CURLX_POINTER_TO_INTEGER_CAST(removed->payload) / 10,
+ CURLX_POINTER_TO_INTEGER_CAST(removed->payload) % 10);
root = Curl_splaygetbest(tv_now, root, &removed);
}
}