tidy-up: miscellaneous

- examples: sync debug output printf masks.
- INSTALL-CMAKE.md: tidy up section for some options.
- curl_sha512_256: delete comment suggesting an optimization.
- vtls/keylog: scope a variable.
- vtls/openssl: make a source code URL a permalink.
- vtls/schannel: drop redundant parentheses.
- test1119.pl: robustify `$1` -> `$s`.
- sync arg names in comments to match the code.
- tidy up and minor fixes to comments.
- fix formatting/indenting/comment/newline/include nits.
- move `UNITTEST` protos next to definitions, sync their argument names.
- make variables static.
- add parentheses to Perl `open()` calls.
- drop unnecessary double quotes in Perl.
- clang-format.

Closes #21000
This commit is contained in:
Viktor Szakats 2026-03-09 12:27:12 +01:00
parent 3512b673dd
commit e0dd6eb4a4
No known key found for this signature in database
148 changed files with 612 additions and 684 deletions

View file

@ -8,7 +8,7 @@
Checks:
- clang-analyzer-*
- -clang-analyzer-optin.performance.Padding
- -clang-analyzer-security.ArrayBound # due to false positives with clang-tidy v21.1.0
- -clang-analyzer-security.ArrayBound # due to false positives with clang-tidy v21.1.0+
- -clang-analyzer-security.insecureAPI.bzero # for FD_ZERO() (seen on macOS)
- -clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling
- -clang-diagnostic-nullability-extension

View file

@ -427,7 +427,8 @@ jobs:
- name: 'openssl4'
install_steps: skipall
LDFLAGS: -Wl,-rpath,/home/runner/openssl4/build/lib
PKG_CONFIG_PATH: "/home/runner/openssl4/build/lib/pkgconfig:\
PKG_CONFIG_PATH: "\
/home/runner/openssl4/build/lib/pkgconfig:\
/home/runner/nghttp3/build/lib/pkgconfig:\
/home/runner/nghttp2-openssl4/build/lib/pkgconfig"
configure: >-
@ -435,7 +436,8 @@ jobs:
- name: 'openssl4'
tflags: '--min=1640'
PKG_CONFIG_PATH: "/home/runner/openssl4/build/lib/pkgconfig:\
PKG_CONFIG_PATH: "\
/home/runner/openssl4/build/lib/pkgconfig:\
/home/runner/nghttp3/build/lib/pkgconfig:\
/home/runner/ngtcp2-openssl4/build/lib/pkgconfig:\
/home/runner/nghttp2/build/lib/pkgconfig"
@ -483,7 +485,8 @@ jobs:
- name: 'boringssl'
tflags: '--min=1790'
PKG_CONFIG_PATH: "/home/runner/boringssl/build/lib/pkgconfig:\
PKG_CONFIG_PATH: "\
/home/runner/boringssl/build/lib/pkgconfig:\
/home/runner/nghttp3/build/lib/pkgconfig:\
/home/runner/ngtcp2-boringssl/build/lib/pkgconfig:\
/home/runner/nghttp2/build/lib/pkgconfig"
@ -503,7 +506,8 @@ jobs:
install_packages: libp11-kit-dev libssh-dev
tflags: '--min=1840'
LDFLAGS: -Wl,-rpath,/home/runner/gnutls/build/lib
PKG_CONFIG_PATH: "/home/runner/nettle/build/lib64/pkgconfig:\
PKG_CONFIG_PATH: "\
/home/runner/nettle/build/lib64/pkgconfig:\
/home/runner/gnutls/build/lib/pkgconfig:\
/home/runner/nghttp3/build/lib/pkgconfig:\
/home/runner/ngtcp2/build/lib/pkgconfig:\

View file

@ -309,7 +309,8 @@ jobs:
-Wl,-rpath,/home/runner/rustls/lib
-Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/gsasl/lib
PKG_CONFIG_PATH: "/home/runner/wolfssl-opensslextra/lib/pkgconfig:\
PKG_CONFIG_PATH: "\
/home/runner/wolfssl-opensslextra/lib/pkgconfig:\
/home/runner/mbedtls/lib/pkgconfig:\
/home/runner/rustls/lib/pkgconfig:\
/home/linuxbrew/.linuxbrew/opt/gsasl/lib/pkgconfig"
@ -330,7 +331,8 @@ jobs:
-Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/libnghttp3/lib
-Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/c-ares/lib
PKG_CONFIG_PATH: "/home/linuxbrew/.linuxbrew/opt/libngtcp2/lib/pkgconfig:\
PKG_CONFIG_PATH: "\
/home/linuxbrew/.linuxbrew/opt/libngtcp2/lib/pkgconfig:\
/home/linuxbrew/.linuxbrew/opt/libnghttp3/lib/pkgconfig:\
/home/linuxbrew/.linuxbrew/opt/c-ares/lib/pkgconfig"
generate: >-
@ -354,7 +356,8 @@ jobs:
CC: clang-20
CFLAGS: -fsanitize=address,undefined,signed-integer-overflow -fno-sanitize-recover=undefined,integer -Wformat -Werror=format-security -Werror=array-bounds -g
LDFLAGS: -fsanitize=address,undefined -fno-sanitize-recover=undefined,integer -ldl -lubsan -Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/c-ares/lib
PKG_CONFIG_PATH: "/home/linuxbrew/.linuxbrew/opt/libssh2/lib/pkgconfig:\
PKG_CONFIG_PATH: "\
/home/linuxbrew/.linuxbrew/opt/libssh2/lib/pkgconfig:\
/home/linuxbrew/.linuxbrew/opt/libngtcp2/lib/pkgconfig:\
/home/linuxbrew/.linuxbrew/opt/libnghttp3/lib/pkgconfig:\
/home/linuxbrew/.linuxbrew/opt/c-ares/lib/pkgconfig"

View file

@ -350,7 +350,7 @@ if(PICKY_COMPILER)
endif()
endif()
#
# Assemble list of flags
set(_picky_skipped "")
foreach(_ccopt IN LISTS _picky_enable)

View file

@ -247,7 +247,7 @@ target_link_libraries(my_target PRIVATE CURL::libcurl)
- `SHARE_LIB_OBJECT`: Build shared and static libcurl in a single pass (requires CMake 3.12 or newer). Default: `ON` for Windows
- `STATIC_LIB_SUFFIX`: Static library suffix. Default: (empty)
## CA bundle options
## Root CA options
- `CURL_CA_BUNDLE`: Absolute path to the CA bundle. Set `none` to disable or `auto` for auto-detection. Default: `auto`
- `CURL_CA_EMBED`: Absolute path to the CA bundle to embed in the curl tool. Default: (disabled)
@ -257,6 +257,7 @@ target_link_libraries(my_target PRIVATE CURL::libcurl)
- `CURL_CA_PATH`: Absolute path to a directory containing CA certificates stored individually.
Set `none` to disable or `auto` for auto-detection. Default: `auto`
- `CURL_CA_SEARCH_SAFE`: Enable safe CA bundle search (within the curl tool directory) on Windows. Default: `OFF`
- `USE_APPLE_SECTRUST`: Use Apple OS-native certificate verification. Default: `OFF`
## Enabling features
@ -267,9 +268,12 @@ target_link_libraries(my_target PRIVATE CURL::libcurl)
- `ENABLE_THREADED_RESOLVER`: Enable threaded DNS lookup. Default: `ON` if c-ares is not enabled and target supports threading.
- `ENABLE_UNICODE`: Use the Unicode version of the Windows API functions. Default: `OFF`
- `ENABLE_UNIX_SOCKETS`: Enable Unix domain sockets support. Default: `ON`
- `USE_APPLE_IDN`: Use Apple built-in IDN support. Default: `OFF`
- `USE_ECH`: Enable ECH support. Default: `OFF`
- `USE_HTTPSRR`: Enable HTTPS RR support. Default: `OFF`
- `USE_SSLS_EXPORT`: Enable experimental SSL session import/export. Default: `OFF`
- `USE_WIN32_IDN`: Use WinIDN for IDN support. Default: `OFF`
- `USE_WIN32_LDAP`: Use Windows LDAP implementation. Default: `ON`
## Disabling features
@ -369,14 +373,10 @@ Details via CMake
- `CURL_ZLIB`: Use zlib (`ON`, `OFF` or `AUTO`). Default: `AUTO`
- `CURL_ZSTD`: Use zstd (`ON`, `OFF` or `AUTO`). Default: `AUTO`
- `ENABLE_ARES`: Enable c-ares support. Default: `OFF`
- `USE_APPLE_IDN`: Use Apple built-in IDN support. Default: `OFF`
- `USE_APPLE_SECTRUST`: Use Apple OS-native certificate verification. Default: `OFF`
- `USE_LIBIDN2`: Use libidn2 for IDN support. Default: `ON`
- `USE_NGHTTP2`: Use nghttp2 library. Default: `ON`
- `USE_NGTCP2`: Use ngtcp2 and nghttp3 libraries for HTTP/3 support. Default: `OFF`
- `USE_QUICHE`: Use quiche library for HTTP/3 support. Default: `OFF`
- `USE_WIN32_IDN`: Use WinIDN for IDN support. Default: `OFF`
- `USE_WIN32_LDAP`: Use Windows LDAP implementation. Default: `ON`
## Dependency options (via CMake)

View file

@ -45,7 +45,7 @@ static void dump(const char *text, const unsigned char *ptr,
/* without the hex output, we can fit more on screen */
width = 0x40;
fprintf(stderr, "%s, %10.10lu bytes (0x%8.8lx)\n",
fprintf(stderr, "%s, %lu bytes (0x%lx)\n",
text, (unsigned long)size, (unsigned long)size);
for(i = 0; i < size; i += width) {

View file

@ -42,7 +42,7 @@ static void dump(const char *text, const unsigned char *ptr,
/* without the hex output, we can fit more on screen */
width = 0x40;
fprintf(stderr, "%s, %10.10lu bytes (0x%8.8lx)\n",
fprintf(stderr, "%s, %lu bytes (0x%lx)\n",
text, (unsigned long)size, (unsigned long)size);
for(i = 0; i < size; i += width) {

View file

@ -118,7 +118,7 @@ static void dump(const char *text,
size_t c;
unsigned int width = 0x10;
fprintf(stream, "%s, %10.10ld bytes (0x%8.8lx)\n",
fprintf(stream, "%s, %lu bytes (0x%lx)\n",
text, (long)size, (long)size);
for(i = 0; i < size; i += width) {

View file

@ -349,9 +349,10 @@ static timediff_t async_ares_poll_timeout(struct async_ares_ctx *ares,
return 1000;
}
static const struct Curl_addrinfo *
async_ares_get_ai(const struct Curl_addrinfo *ai,
int ai_family, unsigned int index)
static const struct Curl_addrinfo *async_ares_get_ai(
const struct Curl_addrinfo *ai,
int ai_family,
unsigned int index)
{
unsigned int i = 0;
for(i = 0; ai; ai = ai->ai_next) {
@ -364,10 +365,10 @@ async_ares_get_ai(const struct Curl_addrinfo *ai,
return NULL;
}
const struct Curl_addrinfo *
Curl_async_get_ai(struct Curl_easy *data,
const struct Curl_addrinfo *Curl_async_get_ai(struct Curl_easy *data,
struct Curl_resolv_async *async,
int ai_family, unsigned int index)
int ai_family,
unsigned int index)
{
struct async_ares_ctx *ares = &async->ares;
@ -388,8 +389,8 @@ Curl_async_get_ai(struct Curl_easy *data,
}
#ifdef USE_HTTPSRR
const struct Curl_https_rrinfo *
Curl_async_get_https(struct Curl_easy *data,
const struct Curl_https_rrinfo *Curl_async_get_https(
struct Curl_easy *data,
struct Curl_resolv_async *async)
{
if(Curl_async_knows_https(data, async))
@ -415,7 +416,7 @@ bool Curl_async_knows_https(struct Curl_easy *data,
* Waits for a resolve to finish. This function should be avoided since using
* this risk getting the multi interface to "hang".
*
* 'entry' MUST be non-NULL.
* 'pdns' MUST be non-NULL.
*
* Returns CURLE_COULDNT_RESOLVE_HOST if the host was not resolved,
* CURLE_OPERATION_TIMEDOUT if a time-out occurred, or other errors.
@ -479,8 +480,8 @@ CURLcode Curl_async_await(struct Curl_easy *data, uint32_t resolv_id,
* async_ares_node2addr() converts an address list provided by c-ares
* to an internal libcurl compatible list.
*/
static struct Curl_addrinfo *
async_ares_node2addr(struct ares_addrinfo_node *node)
static struct Curl_addrinfo *async_ares_node2addr(
struct ares_addrinfo_node *node)
{
/* traverse the ares_addrinfo_node list */
struct ares_addrinfo_node *ai;

View file

@ -135,8 +135,8 @@ static void async_thrdd_item_destroy(struct async_thrdd_item *item)
}
/* Initialize context for threaded resolver */
static struct async_thrdd_item *
async_thrdd_item_create(struct Curl_easy *data,
static struct async_thrdd_item *async_thrdd_item_create(
struct Curl_easy *data,
uint32_t resolv_id, uint8_t dns_queries,
const char *hostname, uint16_t port,
uint8_t transport)
@ -496,8 +496,7 @@ static void async_thrdd_report_item(struct Curl_easy *data,
}
}
infof(data, "Host %s:%u resolved IPv%c: %s",
item->hostname, item->port,
infof(data, "Host %s:%u resolved IPv%c: %s", item->hostname, item->port,
(item->dns_queries & CURL_DNSQ_AAAA) ? '6' : '4',
(curlx_dyn_len(&tmp) ? curlx_dyn_ptr(&tmp) : "(none)"));
out:
@ -758,8 +757,8 @@ out:
return result;
}
static const struct Curl_addrinfo *
async_thrdd_get_ai(const struct Curl_addrinfo *ai,
static const struct Curl_addrinfo *async_thrdd_get_ai(
const struct Curl_addrinfo *ai,
int ai_family, unsigned int index)
{
unsigned int i = 0;
@ -773,10 +772,10 @@ async_thrdd_get_ai(const struct Curl_addrinfo *ai,
return NULL;
}
const struct Curl_addrinfo *
Curl_async_get_ai(struct Curl_easy *data,
const struct Curl_addrinfo *Curl_async_get_ai(struct Curl_easy *data,
struct Curl_resolv_async *async,
int ai_family, unsigned int index)
int ai_family,
unsigned int index)
{
struct async_thrdd_ctx *thrdd = &async->thrdd;
@ -797,8 +796,8 @@ Curl_async_get_ai(struct Curl_easy *data,
}
#ifdef USE_HTTPSRR
const struct Curl_https_rrinfo *
Curl_async_get_https(struct Curl_easy *data,
const struct Curl_https_rrinfo *Curl_async_get_https(
struct Curl_easy *data,
struct Curl_resolv_async *async)
{
#ifdef USE_HTTPSRR_ARES

View file

@ -82,14 +82,14 @@ void Curl_async_global_cleanup(void);
CURLcode Curl_async_getaddrinfo(struct Curl_easy *data,
struct Curl_resolv_async *async);
const struct Curl_addrinfo *
Curl_async_get_ai(struct Curl_easy *data,
const struct Curl_addrinfo *Curl_async_get_ai(struct Curl_easy *data,
struct Curl_resolv_async *async,
int ai_family, unsigned int index);
int ai_family,
unsigned int index);
#ifdef USE_HTTPSRR
const struct Curl_https_rrinfo *
Curl_async_get_https(struct Curl_easy *data,
const struct Curl_https_rrinfo *Curl_async_get_https(
struct Curl_easy *data,
struct Curl_resolv_async *async);
bool Curl_async_knows_https(struct Curl_easy *data,
struct Curl_resolv_async *async);
@ -176,7 +176,7 @@ struct doh_probes;
* Waits for a resolve to finish. This function should be avoided since using
* this risk getting the multi interface to "hang".
*
* On return 'entry' is assigned the resolved dns (CURLE_OK or NULL otherwise.
* On return 'dns' is assigned the resolved dns (CURLE_OK or NULL otherwise.
*
* Returns CURLE_COULDNT_RESOLVE_HOST if the host was not resolved,
* CURLE_OPERATION_TIMEDOUT if a time-out occurred, or other errors.

View file

@ -47,9 +47,10 @@ struct cf_dns_ctx {
char hostname[1];
};
static struct cf_dns_ctx *
cf_dns_ctx_create(struct Curl_easy *data, uint8_t dns_queries,
const char *hostname, uint16_t port, uint8_t transport,
static struct cf_dns_ctx *cf_dns_ctx_create(struct Curl_easy *data,
uint8_t dns_queries,
const char *hostname,
uint16_t port, uint8_t transport,
bool abstract_unix_socket,
struct Curl_dns_entry *dns)
{
@ -500,8 +501,9 @@ CURLcode Curl_conn_dns_result(struct connectdata *conn, int sockindex)
return Curl_cf_dns_result(conn->cfilter[sockindex]);
}
static const struct Curl_addrinfo *
cf_dns_get_nth_ai(struct Curl_cfilter *cf, const struct Curl_addrinfo *ai,
static const struct Curl_addrinfo *cf_dns_get_nth_ai(
struct Curl_cfilter *cf,
const struct Curl_addrinfo *ai,
int ai_family, unsigned int index)
{
struct cf_dns_ctx *ctx = cf->ctx;
@ -551,8 +553,7 @@ bool Curl_conn_dns_has_any_ai(struct Curl_easy *data, int sockindex)
* first "resolve" filter underneath `cf`. If the DNS resolving is
* not done yet or if no address for the family exists, returns NULL.
*/
const struct Curl_addrinfo *
Curl_cf_dns_get_ai(struct Curl_cfilter *cf,
const struct Curl_addrinfo *Curl_cf_dns_get_ai(struct Curl_cfilter *cf,
struct Curl_easy *data,
int ai_family,
unsigned int index)
@ -576,15 +577,12 @@ Curl_cf_dns_get_ai(struct Curl_cfilter *cf,
* first "resolve" filter at the connection. If the DNS resolving is
* not done yet or if no address for the family exists, returns NULL.
*/
const struct Curl_addrinfo *
Curl_conn_dns_get_ai(struct Curl_easy *data,
int sockindex,
int ai_family,
const struct Curl_addrinfo *Curl_conn_dns_get_ai(struct Curl_easy *data,
int sockindex, int ai_family,
unsigned int index)
{
struct connectdata *conn = data->conn;
return Curl_cf_dns_get_ai(conn->cfilter[sockindex], data,
ai_family, index);
return Curl_cf_dns_get_ai(conn->cfilter[sockindex], data, ai_family, index);
}
#ifdef USE_HTTPSRR
@ -592,8 +590,8 @@ Curl_conn_dns_get_ai(struct Curl_easy *data,
* connection. If the DNS resolving is not done yet or if there
* is no HTTPS-RR info, returns NULL.
*/
const struct Curl_https_rrinfo *
Curl_conn_dns_get_https(struct Curl_easy *data, int sockindex)
const struct Curl_https_rrinfo *Curl_conn_dns_get_https(struct Curl_easy *data,
int sockindex)
{
struct Curl_cfilter *cf = data->conn->cfilter[sockindex];
for(; cf; cf = cf->next) {

View file

@ -51,28 +51,25 @@ CURLcode Curl_cf_dns_result(struct Curl_cfilter *cf);
* `Curl_conn_dns_get_ai()`. */
bool Curl_conn_dns_has_any_ai(struct Curl_easy *data, int sockindex);
const struct Curl_addrinfo *
Curl_conn_dns_get_ai(struct Curl_easy *data,
const struct Curl_addrinfo *Curl_conn_dns_get_ai(struct Curl_easy *data,
int sockindex,
int ai_family,
unsigned int index);
const struct Curl_addrinfo *
Curl_cf_dns_get_ai(struct Curl_cfilter *cf,
const struct Curl_addrinfo *Curl_cf_dns_get_ai(struct Curl_cfilter *cf,
struct Curl_easy *data,
int ai_family,
unsigned int index);
#ifdef USE_HTTPSRR
const struct Curl_https_rrinfo *
Curl_conn_dns_get_https(struct Curl_easy *data, int sockindex);
const struct Curl_https_rrinfo *Curl_conn_dns_get_https(struct Curl_easy *data,
int sockindex);
bool Curl_conn_dns_resolved_https(struct Curl_easy *data, int sockindex);
#else
#define Curl_conn_dns_get_https(a, b) NULL
#define Curl_conn_dns_resolved_https(a, b) TRUE
#endif
extern struct Curl_cftype Curl_cft_dns;
#endif /* HEADER_CURL_CF_DNS_H */

View file

@ -685,7 +685,8 @@ static int proxy_h2_on_stream_close(nghttp2_session *session,
return 0;
}
static CURLcode proxy_h2_submit(int32_t *pstream_id,
static CURLcode proxy_h2_submit(
int32_t *pstream_id,
struct Curl_cfilter *cf,
struct Curl_easy *data,
nghttp2_session *h2,

View file

@ -123,8 +123,7 @@ static void cf_ai_iter_init(struct cf_ai_iter *iter,
iter->n = 0;
}
static const struct Curl_addrinfo *
cf_ai_iter_next(struct cf_ai_iter *iter,
static const struct Curl_addrinfo *cf_ai_iter_next(struct cf_ai_iter *iter,
struct Curl_easy *data)
{
const struct Curl_addrinfo *addr;

View file

@ -30,7 +30,6 @@
#pragma enum(int)
/* ---------------------------------------------------------------- */
/* Global configuration parameters: normally generated by autoconf. */
/* ---------------------------------------------------------------- */

View file

@ -423,8 +423,8 @@ static CURLcode storecookie(struct Cookie *co, struct Curl_str *cp,
/* this function return errors on OOM etc, not on plain cookie format
problems */
static CURLcode
parse_cookie_header(struct Curl_easy *data,
static CURLcode parse_cookie_header(
struct Curl_easy *data,
struct Cookie *co,
struct CookieInfo *ci,
bool *okay, /* if the cookie was fine */
@ -433,8 +433,7 @@ parse_cookie_header(struct Curl_easy *data,
const char *path, /* full path used when this cookie is
set, used to get default path for
the cookie unless set */
bool secure) /* TRUE if connection is over secure
origin */
bool secure) /* TRUE if connection is over secure origin */
{
/* This line was read off an HTTP-header */
time_t now = 0;
@ -930,16 +929,15 @@ static bool replace_existing(struct Curl_easy *data,
* IPv6 address.
*
*/
CURLcode
Curl_cookie_add(struct Curl_easy *data,
CURLcode Curl_cookie_add(
struct Curl_easy *data,
struct CookieInfo *ci,
bool httpheader, /* TRUE if HTTP header-style line */
bool noexpire, /* if TRUE, skip remove_expired() */
const char *lineptr, /* first character of the line */
const char *domain, /* default domain */
const char *path, /* full path used when this cookie is set,
used to get default path for the cookie
unless set */
const char *path, /* full path used when this cookie is set, used
to get default path for the cookie unless set */
bool secure) /* TRUE if connection is over secure origin */
{
struct Cookie comem;

View file

@ -44,8 +44,8 @@
#define ISDIGIT(x) (((x) >= '0') && ((x) <= '9'))
#define ISBLANK(x) (((x) == ' ') || ((x) == '\t'))
#define ISSPACE(x) (ISBLANK(x) || (((x) >= 0xa) && ((x) <= 0x0d)))
#define ISURLPUNTCS(x) (((x) == '-') || ((x) == '.') || ((x) == '_') || \
((x) == '~'))
#define ISURLPUNTCS(x) \
(((x) == '-') || ((x) == '.') || ((x) == '_') || ((x) == '~'))
#define ISUNRESERVED(x) (ISALNUM(x) || ISURLPUNTCS(x))
#define ISNEWLINE(x) (((x) == '\n') || (x) == '\r')

View file

@ -93,8 +93,8 @@ struct stub_gss_ctx_id_t_desc {
char creds[250];
};
static OM_uint32
stub_gss_init_sec_context(OM_uint32 *min,
static OM_uint32 stub_gss_init_sec_context(
OM_uint32 *min,
gss_cred_id_t initiator_cred_handle,
struct stub_gss_ctx_id_t_desc **context,
gss_name_t target_name,
@ -283,8 +283,8 @@ stub_gss_init_sec_context(OM_uint32 *min,
return GSS_S_CONTINUE_NEEDED;
}
static OM_uint32
stub_gss_delete_sec_context(OM_uint32 *min,
static OM_uint32 stub_gss_delete_sec_context(
OM_uint32 *min,
struct stub_gss_ctx_id_t_desc **context,
gss_buffer_t output_token)
{

View file

@ -370,11 +370,9 @@
defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \
!defined(CURL_NO_FMT_CHECKS)
#if defined(__MINGW32__) && !defined(__clang__)
#define CURL_PRINTF(fmt, arg) \
__attribute__((format(gnu_printf, fmt, arg)))
#define CURL_PRINTF(fmt, arg) __attribute__((format(gnu_printf, fmt, arg)))
#else
#define CURL_PRINTF(fmt, arg) \
__attribute__((format(__printf__, fmt, arg)))
#define CURL_PRINTF(fmt, arg) __attribute__((format(__printf__, fmt, arg)))
#endif
#else
#define CURL_PRINTF(fmt, arg)
@ -733,8 +731,7 @@
#endif
#if defined(USE_GNUTLS) || defined(USE_OPENSSL) || defined(USE_MBEDTLS) || \
defined(USE_WOLFSSL) || defined(USE_SCHANNEL) || \
defined(USE_RUSTLS)
defined(USE_WOLFSSL) || defined(USE_SCHANNEL) || defined(USE_RUSTLS)
#define USE_SSL /* SSL support has been enabled */
#endif

View file

@ -291,10 +291,7 @@ static CURLcode Curl_sha512_256_finish(unsigned char *digest, void *context)
/* ** This implementation of SHA-512/256 hash calculation was originally ** *
* ** written by Evgeny Grin (Karlson2k) for GNU libmicrohttpd. ** *
* ** The author ported the code to libcurl. The ported code is provided ** *
* ** under curl license. ** *
* ** This is a minimal version with minimal optimizations. Performance ** *
* ** can be significantly improved. Big-endian store and load macros ** *
* ** are obvious targets for optimization. ** */
* ** under curl license. ** */
#ifdef __GNUC__
# if defined(__has_attribute) && defined(__STDC_VERSION__)

View file

@ -47,8 +47,8 @@ static void *curl_thread_create_thunk(void *arg)
return 0;
}
curl_thread_t Curl_thread_create(CURL_THREAD_RETURN_T
(CURL_STDCALL *func) (void *), void *arg)
curl_thread_t Curl_thread_create(
CURL_THREAD_RETURN_T(CURL_STDCALL *func)(void *), void *arg)
{
curl_thread_t t = curlx_malloc(sizeof(pthread_t));
struct Curl_actual_call *ac = NULL;
@ -97,8 +97,8 @@ int Curl_thread_join(curl_thread_t *hnd)
#elif defined(_WIN32)
curl_thread_t Curl_thread_create(CURL_THREAD_RETURN_T
(CURL_STDCALL *func) (void *), void *arg)
curl_thread_t Curl_thread_create(
CURL_THREAD_RETURN_T(CURL_STDCALL *func)(void *), void *arg)
{
curl_thread_t t = CreateThread(NULL, 0, func, arg, 0, NULL);
if(!t) {

View file

@ -65,8 +65,8 @@ CURLcode Curl_cond_timedwait(curl_cond_t *c, curl_mutex_t *m,
#ifdef USE_THREADS
curl_thread_t Curl_thread_create(CURL_THREAD_RETURN_T
(CURL_STDCALL *func) (void *), void *arg);
curl_thread_t Curl_thread_create(
CURL_THREAD_RETURN_T(CURL_STDCALL *func)(void *), void *arg);
void Curl_thread_destroy(curl_thread_t *hnd);

View file

@ -64,7 +64,6 @@
#define DICT_DEFINE2 "/D:"
#define DICT_DEFINE3 "/LOOKUP:"
#define DYN_DICT_WORD 10000
static char *unescape_word(const char *input)
{

View file

@ -329,8 +329,6 @@ static int num_addresses(const struct Curl_addrinfo *addr)
return i;
}
UNITTEST CURLcode Curl_shuffle_addr(struct Curl_easy *data,
struct Curl_addrinfo **addr);
/*
* Curl_shuffle_addr() shuffles the order of addresses in a 'Curl_addrinfo'
* struct by re-linking its linked list.
@ -343,6 +341,8 @@ UNITTEST CURLcode Curl_shuffle_addr(struct Curl_easy *data,
*
* @unittest: 1608
*/
UNITTEST CURLcode Curl_shuffle_addr(struct Curl_easy *data,
struct Curl_addrinfo **addr);
UNITTEST CURLcode Curl_shuffle_addr(struct Curl_easy *data,
struct Curl_addrinfo **addr)
{
@ -407,8 +407,8 @@ static bool dnscache_ai_has_family(struct Curl_addrinfo *ai,
return FALSE;
}
static struct Curl_dns_entry *
dnscache_entry_create(struct Curl_easy *data,
static struct Curl_dns_entry *dnscache_entry_create(
struct Curl_easy *data,
uint8_t dns_queries,
struct Curl_addrinfo **paddr1,
struct Curl_addrinfo **paddr2,
@ -488,8 +488,7 @@ out:
return dns;
}
struct Curl_dns_entry *
Curl_dnscache_mk_entry(struct Curl_easy *data,
struct Curl_dns_entry *Curl_dnscache_mk_entry(struct Curl_easy *data,
uint8_t dns_queries,
struct Curl_addrinfo **paddr,
const char *hostname,
@ -500,8 +499,7 @@ Curl_dnscache_mk_entry(struct Curl_easy *data,
port, FALSE);
}
struct Curl_dns_entry *
Curl_dnscache_mk_entry2(struct Curl_easy *data,
struct Curl_dns_entry *Curl_dnscache_mk_entry2(struct Curl_easy *data,
uint8_t dns_queries,
struct Curl_addrinfo **paddr1,
struct Curl_addrinfo **paddr2,
@ -530,8 +528,7 @@ void Curl_dns_entry_set_https_rr(struct Curl_dns_entry *dns,
}
#endif /* USE_HTTPSRR */
static struct Curl_dns_entry *
dnscache_add_addr(struct Curl_easy *data,
static struct Curl_dns_entry *dnscache_add_addr(struct Curl_easy *data,
struct Curl_dnscache *dnscache,
uint8_t dns_queries,
struct Curl_addrinfo **paddr,

View file

@ -57,20 +57,18 @@ struct Curl_dns_entry {
* Create a `Curl_dns_entry` with a reference count of 1.
* Use `Curl_dns_entry_unlink()` to release your hold on it.
*
* The call takes ownership of `addr`, even in case of failure, and always
* The call takes ownership of `paddr`, even in case of failure, and always
* clears `*paddr`. It makes a copy of `hostname`.
*
* Returns entry or NULL on OOM.
*/
struct Curl_dns_entry *
Curl_dnscache_mk_entry(struct Curl_easy *data,
struct Curl_dns_entry *Curl_dnscache_mk_entry(struct Curl_easy *data,
uint8_t dns_queries,
struct Curl_addrinfo **paddr,
const char *hostname,
uint16_t port);
struct Curl_dns_entry *
Curl_dnscache_mk_entry2(struct Curl_easy *data,
struct Curl_dns_entry *Curl_dnscache_mk_entry2(struct Curl_easy *data,
uint8_t dns_queries,
struct Curl_addrinfo **paddr1,
struct Curl_addrinfo **paddr2,
@ -92,7 +90,6 @@ struct Curl_dns_entry *Curl_dns_entry_link(struct Curl_easy *data,
void Curl_dns_entry_unlink(struct Curl_easy *data,
struct Curl_dns_entry **pdns);
struct Curl_dnscache {
struct Curl_hash entries;
};

View file

@ -714,7 +714,7 @@ static DOHcode doh_rdata(const unsigned char *doh,
return DOH_OK;
}
UNITTEST void de_init(struct dohentry *d);
UNITTEST void de_init(struct dohentry *de);
UNITTEST void de_init(struct dohentry *de)
{
int i;
@ -1117,11 +1117,10 @@ static CURLcode doh_decode_rdata_name(const unsigned char **buf,
return CURLE_OK;
}
/* @unittest 1658 */
UNITTEST CURLcode doh_resp_decode_httpsrr(struct Curl_easy *data,
const unsigned char *cp, size_t len,
struct Curl_https_rrinfo **hrr);
/* @unittest 1658 */
UNITTEST CURLcode doh_resp_decode_httpsrr(struct Curl_easy *data,
const unsigned char *cp, size_t len,
struct Curl_https_rrinfo **hrr)

View file

@ -62,8 +62,8 @@ const struct curl_easyoption *curl_easy_option_by_id(CURLoption id)
}
/* Iterates over available options */
const struct curl_easyoption *
curl_easy_option_next(const struct curl_easyoption *prev)
const struct curl_easyoption *curl_easy_option_next(
const struct curl_easyoption *prev)
{
if(prev && prev->name) {
prev++;
@ -88,8 +88,8 @@ const struct curl_easyoption *curl_easy_option_by_id(CURLoption id)
return NULL;
}
const struct curl_easyoption *
curl_easy_option_next(const struct curl_easyoption *prev)
const struct curl_easyoption *curl_easy_option_next(
const struct curl_easyoption *prev)
{
(void)prev;
return NULL;

View file

@ -1686,17 +1686,17 @@ static CURLcode ftp_state_ul_setup(struct Curl_easy *data,
if((data->state.resume_from && !sizechecked) ||
((data->state.resume_from > 0) && sizechecked)) {
/* we are about to continue the uploading of a file */
/* 1. get already existing file's size. We use the SIZE command for this
/* we are about to continue the uploading of a file
1. get already existing file's size. We use the SIZE command for this
which may not exist in the server! The SIZE command is not in
RFC959. */
RFC959.
/* 2. This used to set REST, but since we can do append, we issue no
another ftp command. Skip the source file offset and APPEND the rest on
the file instead */
2. This used to set REST, but since we can do append, we issue no
another ftp command. Skip the source file offset and APPEND the rest
on the file instead
/* 3. pass file-size number of bytes in the source file */
/* 4. lower the infilesize counter */
3. pass file-size number of bytes in the source file
4. lower the infilesize counter */
/* => transfer as usual */
int seekerr = CURL_SEEKFUNC_OK;
@ -2507,7 +2507,6 @@ static bool twodigit(const char *p, int *val)
/*
* Unittest @1668
*/
UNITTEST bool ftp_213_date(const char *p, int *year, int *month, int *day,
int *hour, int *minute, int *second);
UNITTEST bool ftp_213_date(const char *p, int *year, int *month, int *day,
@ -3888,8 +3887,8 @@ static CURLcode ftp_nb_type(struct Curl_easy *data,
* This is the actual DO function for FTP. Get a file/directory according to
* the options previously setup.
*/
static
CURLcode ftp_perform(struct Curl_easy *data,
static CURLcode ftp_perform(
struct Curl_easy *data,
struct ftp_conn *ftpc,
struct FTP *ftp,
bool *connected, /* connect status after PASV / PORT */

View file

@ -325,8 +325,7 @@ static CURLcode ftp_pl_insert_finfo(struct Curl_easy *data,
/* filter pattern-corresponding filenames */
Curl_set_in_callback(data, TRUE);
if(compare(data->set.fnmatch_data, wc->pattern,
finfo->filename) == 0) {
if(compare(data->set.fnmatch_data, wc->pattern, finfo->filename) == 0) {
/* discard symlink which is containing multiple " -> " */
if((finfo->filetype == CURLFILETYPE_SYMLINK) && finfo->strings.target &&
(strstr(finfo->strings.target, " -> "))) {

View file

@ -359,8 +359,8 @@ void Curl_hash_start_iterate(struct Curl_hash *hash,
#endif
}
struct Curl_hash_element *
Curl_hash_next_element(struct Curl_hash_iterator *iter)
struct Curl_hash_element *Curl_hash_next_element(
struct Curl_hash_iterator *iter)
{
struct Curl_hash *h;
DEBUGASSERT(iter->init == ITERINIT);

View file

@ -97,8 +97,8 @@ size_t curlx_str_key_compare(void *k1, size_t key1_len, void *k2,
size_t key2_len);
void Curl_hash_start_iterate(struct Curl_hash *hash,
struct Curl_hash_iterator *iter);
struct Curl_hash_element *
Curl_hash_next_element(struct Curl_hash_iterator *iter);
struct Curl_hash_element *Curl_hash_next_element(
struct Curl_hash_iterator *iter);
void Curl_hash_print(struct Curl_hash *h, void (*func)(void *));

View file

@ -111,14 +111,6 @@
* CURLRES_* defines based on the config*.h and curl_setup.h defines.
*/
/*
* Curl_printable_address() stores a printable version of the 1st address
* given in the 'ai' argument. The result will be stored in the buf that is
* bufsize bytes big.
*
* If the conversion fails, the target buffer is empty.
*/
uint8_t Curl_resolv_dns_queries(struct Curl_easy *data, uint8_t ip_version)
{
(void)data;
@ -162,6 +154,13 @@ const char *Curl_resolv_query_str(uint8_t dns_queries)
}
#endif
/*
* Curl_printable_address() stores a printable version of the 1st address
* given in the 'ai' argument. The result will be stored in the buf that is
* bufsize bytes big.
*
* If the conversion fails, the target buffer is empty.
*/
void Curl_printable_address(const struct Curl_addrinfo *ai, char *buf,
size_t bufsize)
{
@ -360,8 +359,7 @@ CURLcode Curl_resolv_announce_start(struct Curl_easy *data,
}
#ifdef USE_CURL_ASYNC
static struct Curl_resolv_async *
hostip_async_new(struct Curl_easy *data,
static struct Curl_resolv_async *hostip_async_new(struct Curl_easy *data,
uint8_t dns_queries,
const char *hostname,
uint16_t port,
@ -442,9 +440,10 @@ static CURLcode hostip_resolv_take_result(struct Curl_easy *data,
return result;
}
const struct Curl_addrinfo *
Curl_resolv_get_ai(struct Curl_easy *data, uint32_t resolv_id,
int ai_family, unsigned int index)
const struct Curl_addrinfo *Curl_resolv_get_ai(struct Curl_easy *data,
uint32_t resolv_id,
int ai_family,
unsigned int index)
{
#ifdef CURLRES_ASYNCH
struct Curl_resolv_async *async = Curl_async_get(data, resolv_id);
@ -959,7 +958,6 @@ CURLcode Curl_resolv(struct Curl_easy *data,
timeout_ms, TRUE, presolv_id, entry);
}
#ifdef USE_CURL_ASYNC
struct Curl_resolv_async *Curl_async_get(struct Curl_easy *data,

View file

@ -88,10 +88,10 @@ struct Curl_addrinfo *Curl_ipv4_resolve_r(const char *hostname, uint16_t port);
/*
* Curl_printable_address() returns a printable version of the 1st address
* given in the 'ip' argument. The result will be stored in the buf that is
* given in the 'ai' argument. The result will be stored in the buf that is
* bufsize bytes big.
*/
void Curl_printable_address(const struct Curl_addrinfo *ip,
void Curl_printable_address(const struct Curl_addrinfo *ai,
char *buf, size_t bufsize);
/* Start DNS resolving for the given parameters. Returns
@ -142,16 +142,17 @@ CURLcode Curl_resolv_take_result(struct Curl_easy *data, uint32_t resolv_id,
void Curl_resolv_destroy(struct Curl_easy *data, uint32_t resolv_id);
const struct Curl_addrinfo *
Curl_resolv_get_ai(struct Curl_easy *data, uint32_t resolv_id,
int ai_family, unsigned int index);
const struct Curl_addrinfo *Curl_resolv_get_ai(struct Curl_easy *data,
uint32_t resolv_id,
int ai_family,
unsigned int index);
#ifdef USE_HTTPSRR
const struct Curl_https_rrinfo *
Curl_resolv_get_https(struct Curl_easy *data, uint32_t resolv_id);
const struct Curl_https_rrinfo *Curl_resolv_get_https(struct Curl_easy *data,
uint32_t resolv_id);
bool Curl_resolv_knows_https(struct Curl_easy *data, uint32_t resolv_id);
#endif /* USE_HTTPSRR */
#else /* USE_CURL_ASYNC */
#else /* !USE_CURL_ASYNC */
#define Curl_resolv_shutdown_all(x) Curl_nop_stmt
#define Curl_resolv_destroy_all(x) Curl_nop_stmt
#define Curl_resolv_take_result(x, y, z) CURLE_NOT_BUILT_IN
@ -160,7 +161,7 @@ bool Curl_resolv_knows_https(struct Curl_easy *data, uint32_t resolv_id);
#define Curl_resolv_knows_https(x, y) TRUE
#define Curl_resolv_pollset(x, y) CURLE_OK
#define Curl_resolv_destroy(x, y) Curl_nop_stmt
#endif /* USE_CURL_ASYNC, else */
#endif /* USE_CURL_ASYNC */
CURLcode Curl_resolver_error(struct Curl_easy *data, const char *detail);

View file

@ -472,52 +472,52 @@ static bool http_should_fail(struct Curl_easy *data, int httpcode)
DEBUGASSERT(data->conn);
/*
** If we have not been asked to fail on error,
** do not fail.
* If we have not been asked to fail on error,
* do not fail.
*/
if(!data->set.http_fail_on_error)
return FALSE;
/*
** Any code < 400 is never terminal.
* Any code < 400 is never terminal.
*/
if(httpcode < 400)
return FALSE;
/*
** A 416 response to a resume request is presumably because the file is
** already completely downloaded and thus not actually a fail.
* A 416 response to a resume request is presumably because the file is
* already completely downloaded and thus not actually a fail.
*/
if(data->state.resume_from && data->state.httpreq == HTTPREQ_GET &&
httpcode == 416)
return FALSE;
/*
** Any code >= 400 that is not 401 or 407 is always
** a terminal error
* Any code >= 400 that is not 401 or 407 is always
* a terminal error
*/
if((httpcode != 401) && (httpcode != 407))
return TRUE;
/*
** All we have left to deal with is 401 and 407
* All we have left to deal with is 401 and 407
*/
DEBUGASSERT((httpcode == 401) || (httpcode == 407));
/*
** Examine the current authentication state to see if this is an error. The
** idea is for this function to get called after processing all the headers
** in a response message. If we have been to asked to authenticate
** a particular stage, and we have done it, we are OK. If we are already
** completely authenticated, it is not OK to get another 401 or 407.
**
** It is possible for authentication to go stale such that the client needs
** to reauthenticate. Once that info is available, use it here.
* Examine the current authentication state to see if this is an error. The
* idea is for this function to get called after processing all the headers
* in a response message. If we have been to asked to authenticate
* a particular stage, and we have done it, we are OK. If we are already
* completely authenticated, it is not OK to get another 401 or 407.
*
* It is possible for authentication to go stale such that the client needs
* to reauthenticate. Once that info is available, use it here.
*/
/*
** Either we are not authenticating, or we are supposed to be authenticating
** something else. This is an error.
* Either we are not authenticating, or we are supposed to be authenticating
* something else. This is an error.
*/
if((httpcode == 401) && !data->state.aptr.user)
return TRUE;
@ -766,14 +766,14 @@ static CURLcode output_auth_headers(struct Curl_easy *data,
*
* @returns CURLcode
*/
CURLcode
Curl_http_output_auth(struct Curl_easy *data,
CURLcode Curl_http_output_auth(struct Curl_easy *data,
struct connectdata *conn,
const char *request,
Curl_HttpReq httpreq,
const char *path,
bool proxytunnel) /* TRUE if this is the request setting
up the proxy tunnel */
bool proxytunnel) /* TRUE if this is
the request setting up
the proxy tunnel */
{
CURLcode result = CURLE_OK;
struct auth *authhost;

View file

@ -185,14 +185,14 @@ CURLcode Curl_http_write_resp_hds(struct Curl_easy *data,
*
* @returns CURLcode
*/
CURLcode
Curl_http_output_auth(struct Curl_easy *data,
CURLcode Curl_http_output_auth(struct Curl_easy *data,
struct connectdata *conn,
const char *request,
Curl_HttpReq httpreq,
const char *path,
bool proxytunnel); /* TRUE if this is the request setting
up the proxy tunnel */
bool proxytunnel); /* TRUE if this is
the request setting up
the proxy tunnel */
/* Decode HTTP status code string. */
CURLcode Curl_http_decode_status(int *pstatus, const char *s, size_t len);

View file

@ -680,7 +680,8 @@ static int compare_func(const void *a, const void *b)
}
UNITTEST CURLcode canon_path(const char *q, size_t len,
struct dynbuf *new_path, bool normalize);
struct dynbuf *new_path,
bool do_uri_encode);
UNITTEST CURLcode canon_path(const char *q, size_t len,
struct dynbuf *new_path,
bool do_uri_encode)

View file

@ -194,8 +194,8 @@ CURLcode Curl_httpsrr_set(struct Curl_https_rrinfo *hi,
return result;
}
struct Curl_https_rrinfo *
Curl_httpsrr_dup_move(struct Curl_https_rrinfo *rrinfo)
struct Curl_https_rrinfo *Curl_httpsrr_dup_move(
struct Curl_https_rrinfo *rrinfo)
{
struct Curl_https_rrinfo *dup = curlx_memdup(rrinfo, sizeof(*rrinfo));
if(dup)

View file

@ -62,8 +62,8 @@ struct Curl_https_rrinfo {
CURLcode Curl_httpsrr_set(struct Curl_https_rrinfo *hi,
uint16_t rrkey, const uint8_t *val, size_t vlen);
struct Curl_https_rrinfo *
Curl_httpsrr_dup_move(struct Curl_https_rrinfo *rrinfo);
struct Curl_https_rrinfo *Curl_httpsrr_dup_move(
struct Curl_https_rrinfo *rrinfo);
void Curl_httpsrr_cleanup(struct Curl_https_rrinfo *rrinfo);

View file

@ -33,7 +33,7 @@
/* OpenSSL 3.0.0 marks the MD4 functions as deprecated */
#define OPENSSL_NO_MD4
#else
/* Cover also OPENSSL_NO_MD4 configured in openssl */
/* Cover also OPENSSL_NO_MD4 configured in OpenSSL */
#include <openssl/opensslconf.h>
#endif
#endif /* USE_OPENSSL */

View file

@ -74,7 +74,6 @@
#define CURL_MULTI_HANDLE 0x000bab1e
#ifdef DEBUGBUILD
/* On a debug build, we want to fail hard on multi handles that
* are not NULL, but no longer have the MAGIC touch. This gives

View file

@ -361,7 +361,6 @@ void Curl_pgrs_deliver_inc(struct Curl_easy *data, size_t delta)
data->progress.deliver += delta;
}
void Curl_pgrs_download_inc(struct Curl_easy *data, size_t delta)
{
if(delta) {

View file

@ -322,8 +322,7 @@ const struct Curl_scheme Curl_scheme_smb = {
const struct Curl_scheme Curl_scheme_smbs = {
"smbs", /* scheme */
#if defined(CURL_ENABLE_SMB) && defined(USE_CURL_NTLM_CORE) && \
defined(USE_SSL)
#if defined(CURL_ENABLE_SMB) && defined(USE_CURL_NTLM_CORE) && defined(USE_SSL)
&Curl_protocol_smb,
#else
ZERO_NULL,

View file

@ -38,7 +38,8 @@ struct UserDefined;
/* Low level request receive/send io_flags checks. */
#define CURL_REQ_WANT_SEND(d) ((d)->req.io_flags & REQ_IO_SEND)
#define CURL_REQ_WANT_RECV(d) ((d)->req.io_flags & REQ_IO_RECV)
#define CURL_REQ_WANT_IO(d) ((d)->req.io_flags & (REQ_IO_RECV|REQ_IO_SEND))
#define CURL_REQ_WANT_IO(d) \
((d)->req.io_flags & (REQ_IO_RECV | REQ_IO_SEND))
/* Low level request receive/send io_flags manipulations. */
#define CURL_REQ_SET_SEND(d) ((d)->req.io_flags |= REQ_IO_SEND)
#define CURL_REQ_SET_RECV(d) ((d)->req.io_flags |= REQ_IO_RECV)

View file

@ -35,9 +35,7 @@
* Definition of pollfd struct and constants for platforms lacking them.
*/
#if !defined(HAVE_SYS_POLL_H) && \
!defined(HAVE_POLL_H) && \
!defined(POLLIN)
#if !defined(HAVE_SYS_POLL_H) && !defined(HAVE_POLL_H) && !defined(POLLIN)
#define POLLIN 0x01
#define POLLPRI 0x02

View file

@ -372,8 +372,8 @@ static CURLcode do_init_writer_stack(struct Curl_easy *data)
The bit pattern defines to what "streams" to write to. Body and/or header.
The defines are in sendf.h of course.
*/
CURLcode Curl_client_write(struct Curl_easy *data,
int type, const char *buf, size_t len)
CURLcode Curl_client_write(struct Curl_easy *data, int type, const char *buf,
size_t len)
{
CURLcode result;

View file

@ -228,7 +228,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(struct Curl_cfilter *cf,
if(gss_major_status != GSS_S_CONTINUE_NEEDED)
break;
/* analyse response */
/* analyze response */
/* GSS-API response looks like
* +----+------+-----+----------------+

View file

@ -1266,8 +1266,8 @@ static CURLcode telnet_do(struct Curl_easy *data, bool *done)
#ifdef USE_WINSOCK
/* We want to wait for both stdin and the socket. Since
** the select() function in Winsock only works on sockets
** we have to use the WaitForMultipleObjects() call.
* the select() function in Winsock only works on sockets
* we have to use the WaitForMultipleObjects() call.
*/
/* First, create a sockets event object */

View file

@ -30,9 +30,6 @@
#define CURL_UINT32_SPBSET_MAGIC 0x70737362
#endif
/* Clear the bitset, making it empty. */
UNITTEST void Curl_uint32_spbset_clear(struct uint32_spbset *bset);
void Curl_uint32_spbset_init(struct uint32_spbset *bset)
{
memset(bset, 0, sizeof(*bset));
@ -41,6 +38,19 @@ void Curl_uint32_spbset_init(struct uint32_spbset *bset)
#endif
}
/* Clear the bitset, making it empty. */
UNITTEST void Curl_uint32_spbset_clear(struct uint32_spbset *bset);
UNITTEST void Curl_uint32_spbset_clear(struct uint32_spbset *bset)
{
struct uint32_spbset_chunk *next, *chunk;
for(chunk = bset->head.next; chunk; chunk = next) {
next = chunk->next;
curlx_free(chunk);
}
memset(&bset->head, 0, sizeof(bset->head));
}
void Curl_uint32_spbset_destroy(struct uint32_spbset *bset)
{
DEBUGASSERT(bset->init == CURL_UINT32_SPBSET_MAGIC);
@ -61,19 +71,8 @@ uint32_t Curl_uint32_spbset_count(struct uint32_spbset *bset)
return n;
}
UNITTEST void Curl_uint32_spbset_clear(struct uint32_spbset *bset)
{
struct uint32_spbset_chunk *next, *chunk;
for(chunk = bset->head.next; chunk; chunk = next) {
next = chunk->next;
curlx_free(chunk);
}
memset(&bset->head, 0, sizeof(bset->head));
}
static struct uint32_spbset_chunk *
uint32_spbset_get_chunk(struct uint32_spbset *bset, uint32_t i, bool grow)
static struct uint32_spbset_chunk *uint32_spbset_get_chunk(
struct uint32_spbset *bset, uint32_t i, bool grow)
{
struct uint32_spbset_chunk *chunk, **panchor = NULL;
uint32_t i_offset = (i & ~CURL_UINT32_SPBSET_CH_MASK);

View file

@ -29,9 +29,6 @@
#define CURL_UINT32_TBL_MAGIC 0x62757473
#endif
/* Clear the table, making it empty. */
UNITTEST void Curl_uint32_tbl_clear(struct uint32_tbl *tbl);
void Curl_uint32_tbl_init(struct uint32_tbl *tbl,
Curl_uint32_tbl_entry_dtor *entry_dtor)
{
@ -82,14 +79,8 @@ CURLcode Curl_uint32_tbl_resize(struct uint32_tbl *tbl, uint32_t nrows)
return CURLE_OK;
}
void Curl_uint32_tbl_destroy(struct uint32_tbl *tbl)
{
DEBUGASSERT(tbl->init == CURL_UINT32_TBL_MAGIC);
Curl_uint32_tbl_clear(tbl);
curlx_free(tbl->rows);
memset(tbl, 0, sizeof(*tbl));
}
/* Clear the table, making it empty. */
UNITTEST void Curl_uint32_tbl_clear(struct uint32_tbl *tbl);
UNITTEST void Curl_uint32_tbl_clear(struct uint32_tbl *tbl)
{
DEBUGASSERT(tbl->init == CURL_UINT32_TBL_MAGIC);
@ -98,6 +89,14 @@ UNITTEST void Curl_uint32_tbl_clear(struct uint32_tbl *tbl)
tbl->last_key_added = UINT32_MAX;
}
void Curl_uint32_tbl_destroy(struct uint32_tbl *tbl)
{
DEBUGASSERT(tbl->init == CURL_UINT32_TBL_MAGIC);
Curl_uint32_tbl_clear(tbl);
curlx_free(tbl->rows);
memset(tbl, 0, sizeof(*tbl));
}
uint32_t Curl_uint32_tbl_capacity(struct uint32_tbl *tbl)
{
return tbl->nrows;

View file

@ -243,11 +243,9 @@ char *curl_version(void)
#endif
#ifdef HAVE_GSSAPI
#ifdef HAVE_GSSGNU
curl_msnprintf(gss_buf, sizeof(gss_buf), "libgss/%s",
GSS_VERSION);
curl_msnprintf(gss_buf, sizeof(gss_buf), "libgss/%s", GSS_VERSION);
#elif defined(CURL_KRB5_VERSION)
curl_msnprintf(gss_buf, sizeof(gss_buf), "mit-krb5/%s",
CURL_KRB5_VERSION);
curl_msnprintf(gss_buf, sizeof(gss_buf), "mit-krb5/%s", CURL_KRB5_VERSION);
#else
curl_msnprintf(gss_buf, sizeof(gss_buf), "mit-krb5");
#endif

View file

@ -147,7 +147,7 @@ static int myssh_is_known(struct Curl_easy *data, struct ssh_conn *sshc)
rc = ssh_get_publickey_hash(pubkey, SSH_PUBLICKEY_HASH_MD5, &hash, &hlen);
if(rc != SSH_OK || hlen != 16) {
failf(data,
"Denied establishing ssh session: md5 fingerprint not available");
"Denied establishing ssh session: MD5 fingerprint not available");
goto cleanup;
}
@ -158,7 +158,7 @@ static int myssh_is_known(struct Curl_easy *data, struct ssh_conn *sshc)
if(!curl_strequal(md5buffer, pubkey_md5)) {
failf(data,
"Denied establishing ssh session: mismatch md5 fingerprint. "
"Denied establishing ssh session: mismatch MD5 fingerprint. "
"Remote %s is not equal to %s", md5buffer, pubkey_md5);
rc = SSH_ERROR;
goto cleanup;

View file

@ -476,7 +476,7 @@ static CURLcode ssh_check_fingerprint(struct Curl_easy *data,
LIBSSH2_HOSTKEY_HASH_SHA256);
if(!fingerprint) {
failf(data,
"Denied establishing ssh session: sha256 fingerprint "
"Denied establishing ssh session: SHA256 fingerprint "
"not available");
myssh_to(data, sshc, SSH_SESSION_FREE);
return CURLE_PEER_FAILED_VERIFICATION;
@ -491,7 +491,7 @@ static CURLcode ssh_check_fingerprint(struct Curl_easy *data,
}
if(!fingerprint_b64) {
failf(data, "sha256 fingerprint could not be encoded");
failf(data, "SHA256 fingerprint could not be encoded");
myssh_to(data, sshc, SSH_SESSION_FREE);
return CURLE_PEER_FAILED_VERIFICATION;
}
@ -509,13 +509,13 @@ static CURLcode ssh_check_fingerprint(struct Curl_easy *data,
b64_pos++;
}
/* Before we authenticate we check the hostkey's sha256 fingerprint
/* Before we authenticate we check the hostkey's SHA256 fingerprint
* against a known fingerprint, if available.
*/
if((pub_pos != b64_pos) ||
strncmp(fingerprint_b64, pubkey_sha256, pub_pos)) {
failf(data,
"Denied establishing ssh session: mismatch sha256 fingerprint. "
"Denied establishing ssh session: mismatch SHA256 fingerprint. "
"Remote %s is not equal to %s", fingerprint_b64, pubkey_sha256);
curlx_free(fingerprint_b64);
myssh_to(data, sshc, SSH_SESSION_FREE);
@ -550,12 +550,12 @@ static CURLcode ssh_check_fingerprint(struct Curl_easy *data,
if(!fingerprint || !curl_strequal(md5buffer, pubkey_md5)) {
if(fingerprint) {
failf(data,
"Denied establishing ssh session: mismatch md5 fingerprint. "
"Denied establishing ssh session: mismatch MD5 fingerprint. "
"Remote %s is not equal to %s", md5buffer, pubkey_md5);
}
else {
failf(data,
"Denied establishing ssh session: md5 fingerprint "
"Denied establishing ssh session: MD5 fingerprint "
"not available");
}
myssh_to(data, sshc, SSH_SESSION_FREE);

View file

@ -35,10 +35,8 @@ static FILE *keylog_file_fp;
void Curl_tls_keylog_open(void)
{
char *keylog_file_name;
if(!keylog_file_fp) {
keylog_file_name = curl_getenv("SSLKEYLOGFILE");
char *keylog_file_name = curl_getenv("SSLKEYLOGFILE");
if(keylog_file_name) {
keylog_file_fp = curlx_fopen(keylog_file_name, FOPEN_APPENDTEXT);
if(keylog_file_fp) {

View file

@ -2946,7 +2946,7 @@ static CURLcode ossl_windows_load_anchors(struct Curl_cfilter *cf,
/* Import certificates from the Windows root certificate store if
requested.
https://stackoverflow.com/questions/9507184/
https://github.com/d3x0r/SACK/blob/master/src/netlib/ssl_layer.c#L1037
https://github.com/d3x0r/SACK/blob/ff15424d3c581b86d40f818532e5a400c516d39d/src/netlib/ssl_layer.c#L1410
https://datatracker.ietf.org/doc/html/rfc5280 */
const char *win_stores[] = {
"ROOT", /* Trusted Root Certification Authorities */

View file

@ -175,20 +175,20 @@ static CURLcode schannel_set_ssl_version_min_max(DWORD *enabled_protocols,
for(; i <= (ssl_version_max >> 16); ++i) {
switch(i) {
case CURL_SSLVERSION_TLSv1_0:
(*enabled_protocols) |= SP_PROT_TLS1_0_CLIENT;
*enabled_protocols |= SP_PROT_TLS1_0_CLIENT;
break;
case CURL_SSLVERSION_TLSv1_1:
(*enabled_protocols) |= SP_PROT_TLS1_1_CLIENT;
*enabled_protocols |= SP_PROT_TLS1_1_CLIENT;
break;
case CURL_SSLVERSION_TLSv1_2:
(*enabled_protocols) |= SP_PROT_TLS1_2_CLIENT;
*enabled_protocols |= SP_PROT_TLS1_2_CLIENT;
break;
case CURL_SSLVERSION_TLSv1_3:
/* Windows Server 2022 and newer */
if(curlx_verify_windows_version(10, 0, 20348, PLATFORM_WINNT,
VERSION_GREATER_THAN_EQUAL)) {
(*enabled_protocols) |= SP_PROT_TLS1_3_CLIENT;
*enabled_protocols |= SP_PROT_TLS1_3_CLIENT;
break;
}
else { /* Windows 10 and older */
@ -277,7 +277,7 @@ static int get_alg_id_by_name(const char *name)
return 0; /* not found */
}
#define NUM_CIPHERS 47 /* There are 47 options listed above */
#define NUM_CIPHERS 47 /* There are a maximum of 47 options listed above */
static CURLcode set_ssl_ciphers(SCHANNEL_CRED *schannel_cred, char *ciphers,
ALG_ID *algIds)

View file

@ -403,7 +403,8 @@ static CURLcode utf8asn1str(struct dynbuf *to, int type, const char *from,
*
* @unittest 1666
*/
UNITTEST CURLcode encodeOID(struct dynbuf *buf, const char *b, const char *e);
UNITTEST CURLcode encodeOID(struct dynbuf *store,
const char *beg, const char *end);
UNITTEST CURLcode encodeOID(struct dynbuf *store,
const char *beg, const char *end)
{

View file

@ -219,9 +219,8 @@ if(@exact) {
}
# Build a single combined regex for removing whitelisted content
my $re_wl;
my $pat = join('|', map { $_ } @whitelist);
$re_wl = qr/($pat)/;
my $re_wl = qr/($pat)/;
my $errors = 0;

View file

@ -21,9 +21,10 @@
* SPDX-License-Identifier: curl
*
***************************************************************************/
#include <stddef.h>
#include "tool_setup.h"
#include <stddef.h>
#include "tool_cfgable.h"
#include "tool_formparse.h"
#include "tool_libinfo.h"

View file

@ -62,7 +62,7 @@ static const struct finder conf_list[] = {
static char *checkhome(const char *home, const char *fname, bool dotscore)
{
const char pref[2] = { '.', '_' };
static const char pref[2] = { '.', '_' };
int i;
for(i = 0; i < (dotscore ? 2 : 1); i++) {
char *c;

View file

@ -246,7 +246,8 @@ static const struct LongShort aliases[]= {
{"proxy-ca-native", ARG_BOOL|ARG_TLS, ' ', C_PROXY_CA_NATIVE},
{"proxy-cacert", ARG_FILE|ARG_TLS, ' ', C_PROXY_CACERT},
{"proxy-capath", ARG_FILE|ARG_TLS, ' ', C_PROXY_CAPATH},
{"proxy-cert", ARG_FILE|ARG_TLS|ARG_CLEAR, ' ', C_PROXY_CERT},
{"proxy-cert", ARG_FILE|ARG_TLS|ARG_CLEAR, ' ',
C_PROXY_CERT},
{"proxy-cert-type", ARG_STRG|ARG_TLS, ' ', C_PROXY_CERT_TYPE},
{"proxy-ciphers", ARG_STRG|ARG_TLS, ' ', C_PROXY_CIPHERS},
{"proxy-crlfile", ARG_FILE|ARG_TLS, ' ', C_PROXY_CRLFILE},

View file

@ -132,7 +132,6 @@ size_t feature_count;
* the latter is not returned by curl_version_info(), it is built from
* the returned features bit mask.
*/
CURLcode get_libcurl_info(void)
{
CURLcode result = CURLE_OK;
@ -197,7 +196,6 @@ CURLcode get_libcurl_info(void)
* a given protocol and thus allows comparing pointers rather than strings.
* In addition, the returned pointer is not deallocated until the program ends.
*/
const char *proto_token(const char *proto)
{
const char * const *builtin;

View file

@ -576,8 +576,8 @@ static CURLcode retrycheck(struct OperationConfig *config,
/* We have written data to an output file, we truncate file */
fflush(outs->stream);
notef("Throwing away %" CURL_FORMAT_CURL_OFF_T " bytes", outs->bytes);
/* truncate file at the position where we started appending */
/* truncate file at the position where we started appending */
if(toolx_ftruncate(fileno(outs->stream), outs->init)) {
/* when truncate fails, we cannot append as then we
create something strange, bail out */

View file

@ -96,7 +96,7 @@ int toolx_ftruncate_win32(int fd, curl_off_t where)
}
#elif defined(__DJGPP__)
/*
* Only supports 'off_t' (signed 32 bit) as file size.
* Only supports 'off_t' (signed 32-bit) as file size.
*/
int toolx_ftruncate_djgpp(int fd, curl_off_t where)
{

View file

@ -27,7 +27,7 @@ static CURLcode test_lib1965(const char *URL)
{
CURLcode result = CURLE_OK;
CURLUcode rc;
const char *schemes[] = {
static const char *schemes[] = {
"bad!", "bad{", "bad/", "bad\\", "a!",
"a+123", "http-2", "http.1",
"a+-.123", "http-+++2", "http.1--",

View file

@ -34,7 +34,7 @@ static bool is_chain_in_order(struct curl_certinfo *cert_info)
/* Chains with only a single certificate are always in order */
if(cert_info->num_of_certs <= 1)
return 1;
return true;
/* Enumerate each certificate in the chain */
for(cert = 0; cert < cert_info->num_of_certs; cert++) {

View file

@ -455,7 +455,7 @@ while(<STDIN>) {
"${w3} curl_easy_setopt(curl, $name,";
my $ignoreset = "${w3}/* set string again to check for leaks */\n".
"${w3}(void)curl_easy_setopt(curl, $name,";
my $i = ' ' x (length($w) + 25);
my $i = ' ' x (length($w) + 21);
my $fcheck = <<MOO
if(first && present(first)) /* first setopt check only */
err("$name", first, __LINE__);
@ -515,7 +515,7 @@ MOO
elsif($type eq "CURLOPTTYPE_OFF_T") {
print $fh "${fpref} OFF_NO);\n$flongcheckzero";
print $fh "$ifpresent";
my $lvl = " " x 29;
my $lvl = " " x 25;
print $fh "${pref}\n${lvl}(curl_off_t)22);\n$longcheck";
print $fh "${pref} OFF_HI);\n$longcheck";
print $fh "${pref} OFF_LO);\n$longcheck";

View file

@ -36,7 +36,7 @@ my $what=$ARGV[2];
# Read the output of curl --version
my $curl_protocols="";
open(CURL, "$ARGV[1]") || die "Cannot get curl $what list\n";
open(CURL, $ARGV[1]) || die "Cannot get curl $what list\n";
while(<CURL>) {
$curl_protocols = $_ if(/$what:/i);
}

View file

@ -34,7 +34,7 @@ if($#ARGV != 2) {
my $what=$ARGV[2];
# Read the output of curl --version
open(CURL, "$ARGV[1]") || die "Cannot open curl --version list in $ARGV[1]\n";
open(CURL, $ARGV[1]) || die "Cannot open curl --version list in $ARGV[1]\n";
$_ = <CURL>;
chomp;
/libcurl\/([\.\d]+((-DEV)|(-rc\d)|(-\d+))?)/;

View file

@ -1899,7 +1899,7 @@ sub runsshserver {
!close($hostfile) ||
($SSHSRVMD5 !~ /^[a-f0-9]{32}$/i))
{
my $msg = "Fatal: $srvrname pubkey md5 missing : \"$hstpubmd5f\" : $!";
my $msg = "Fatal: $srvrname pubkey MD5 missing : \"$hstpubmd5f\" : $!";
logmsg "$msg\n";
stopservers($verb);
die $msg;
@ -1909,7 +1909,7 @@ sub runsshserver {
(read($hostfile, $SSHSRVSHA256, 48) == 0) ||
!close($hostfile))
{
my $msg = "Fatal: $srvrname pubkey sha256 missing : \"$hstpubsha256f\" : $!";
my $msg = "Fatal: $srvrname pubkey SHA256 missing : \"$hstpubsha256f\" : $!";
logmsg "$msg\n";
stopservers($verb);
die $msg;

View file

@ -446,21 +446,21 @@ if((! -e pp($hstprvkeyf)) || (! -s pp($hstprvkeyf)) ||
my @rsahostkey = do { local $/ = ' '; <$rsakeyfile> };
close($rsakeyfile);
if(!$rsahostkey[1]) {
logmsg "Failed parsing base64 encoded RSA host key\n";
logmsg "Failed parsing base64 encoded SSH host key\n";
exit 1;
}
open(my $pubmd5file, ">", pp($hstpubmd5f));
print $pubmd5file md5_hex(decode_base64($rsahostkey[1]));
close($pubmd5file);
if((! -e pp($hstpubmd5f)) || (! -s pp($hstpubmd5f))) {
logmsg "Failed writing md5 hash of RSA host key\n";
logmsg "Failed writing MD5 hash of SSH host key\n";
exit 1;
}
open(my $pubsha256file, ">", pp($hstpubsha256f));
print $pubsha256file sha256_base64(decode_base64($rsahostkey[1]));
close($pubsha256file);
if((! -e pp($hstpubsha256f)) || (! -s pp($hstpubsha256f))) {
logmsg "Failed writing sha256 hash of RSA host key\n";
logmsg "Failed writing SHA256 hash of SSH host key\n";
exit 1;
}
}

View file

@ -81,7 +81,7 @@ sub scanenum {
sub scanheader {
my ($f)=@_;
open my $h, "<", $f;
open(my $h, "<", $f);
while(<$h>) {
if(/^#define ((LIB|)CURL[A-Za-z0-9_]*)/) {
push @syms, $1;
@ -120,7 +120,7 @@ sub checkmanpage {
my $s = $1;
# skip two "special" ones
if($s !~ /(^(CURLE_OBSOLETE|CURLOPT_TEMPLATE))|_$/) {
push @manrefs, "$1:$m:$line";
push @manrefs, "$s:$m:$line";
}
}
$line++;
@ -143,7 +143,7 @@ scanallheaders();
scanman_md_dir("$root/docs/libcurl");
scanman_md_dir("$root/docs/libcurl/opts");
open my $s, "<", "$root/docs/libcurl/symbols-in-versions";
open(my $s, "<", "$root/docs/libcurl/symbols-in-versions");
while(<$s>) {
if(/(^[^ \n]+) +(.*)/) {
my ($sym, $rest)=($1, $2);

View file

@ -119,7 +119,7 @@ sub scanenums {
sub scanheader {
my ($f)=@_;
scanenums($f);
open H, "<$f";
open(H, '<', $f);
while(<H>) {
my ($line, $linenum) = ($_, $.);
if(/^ *# *define +([^ \n]*)/) {

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "tool_getparam.h"
static CURLcode test_tool1394(const char *arg)

View file

@ -24,7 +24,6 @@
#include "unitcheck.h"
#if defined(_WIN32) || defined(MSDOS)
#include "tool_cfgable.h"
#include "tool_doswin.h"

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "tool_xattr.h"
static CURLcode test_tool1621(const char *arg)

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "tool_progress.h"
static CURLcode test_tool1622(const char *arg)

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "tool_getparam.h"
struct check1623 {

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "llist.h"
static void test_Curl_llist_dtor(void *key, void *value)

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "urldata.h"
#include "url.h" /* for curlx_safefree */

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "urldata.h"
#include "connect.h"

View file

@ -24,7 +24,6 @@
#include "unitcheck.h"
#ifndef CURL_DISABLE_NETRC
#include "netrc.h"
static void t1304_stop(char **password, char **login)

View file

@ -24,7 +24,6 @@
#include "unitcheck.h"
#ifndef CURL_DISABLE_FTP
#include "curl_fnmatch.h"
/*

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "splay.h"
static void splayprint(struct Curl_tree *t, int d, char output)

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "vtls/hostcheck.h"
static CURLcode test_unit1397(const char *arg)

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "urldata.h"
#include "progress.h"

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "urldata.h"
#include "curl_ntlm_core.h"

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "curl_md5.h"
static CURLcode test_unit1601(const char *arg)

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "hash.h"
static void t1602_mydtor(void *p)

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "hash.h"
static const size_t slots = 3;

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "llist.h"
static CURLcode t1605_setup(CURL **easy)

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "urldata.h"
#include "connect.h"
#include "curl_addrinfo.h"

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "urldata.h"
#include "connect.h"
#include "curl_addrinfo.h"

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "curl_sha256.h"
static CURLcode t1610_setup(void)

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "curl_md4.h"
static CURLcode test_unit1611(const char *arg)

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "curl_hmac.h"
#include "curl_md5.h"

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "noproxy.h"
static CURLcode test_unit1614(const char *arg)

View file

@ -23,7 +23,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "curl_sha512_256.h"
static CURLcode test_unit1615(const char *arg)

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "urldata.h"
#include "url.h"

View file

@ -24,7 +24,6 @@
#include "unitcheck.h"
#ifndef CURL_DISABLE_HTTP
#include "urldata.h"
#include "url.h"
@ -126,8 +125,7 @@ static CURLcode test_unit1625(const char *arg)
return CURLE_OK;
}
#else
/* for HTTP-disabled builds */
#else /* CURL_DISABLE_HTTP */
static CURLcode test_unit1625(const char *arg)
{
(void)arg;

Some files were not shown because too many files have changed in this diff Show more