tidy-up: more whitespace/indent, comments

Also a couple of minor formatting updates in the root `CMakeLists.txt`.
One swap to `#ifdef`.

Closes #17929
This commit is contained in:
Viktor Szakats 2025-07-14 17:08:05 +02:00
parent 63a8167f3e
commit 4d977fe552
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
82 changed files with 351 additions and 378 deletions

View file

@ -159,7 +159,7 @@ addr_ctx_create(const char *hostname, int port,
DEBUGASSERT(hints);
addr_ctx->hints = *hints;
#else
(void) hints;
(void)hints;
#endif
Curl_mutex_init(&addr_ctx->mutx);

View file

@ -96,7 +96,7 @@ struct zlib_writer {
static voidpf
zalloc_cb(voidpf opaque, unsigned int items, unsigned int size)
{
(void) opaque;
(void)opaque;
/* not a typo, keep it calloc() */
return (voidpf) calloc(items, size);
}
@ -104,7 +104,7 @@ zalloc_cb(voidpf opaque, unsigned int items, unsigned int size)
static void
zfree_cb(voidpf opaque, voidpf ptr)
{
(void) opaque;
(void)opaque;
free(ptr);
}
@ -411,7 +411,7 @@ static CURLcode brotli_do_init(struct Curl_easy *data,
struct Curl_cwriter *writer)
{
struct brotli_writer *bp = (struct brotli_writer *) writer;
(void) data;
(void)data;
bp->br = BrotliDecoderCreateInstance(NULL, NULL, NULL);
return bp->br ? CURLE_OK : CURLE_OUT_OF_MEMORY;
@ -466,7 +466,7 @@ static void brotli_do_close(struct Curl_easy *data,
struct Curl_cwriter *writer)
{
struct brotli_writer *bp = (struct brotli_writer *) writer;
(void) data;
(void)data;
if(bp->br) {
BrotliDecoderDestroyInstance(bp->br);
@ -671,9 +671,9 @@ static CURLcode error_do_write(struct Curl_easy *data,
struct Curl_cwriter *writer, int type,
const char *buf, size_t nbytes)
{
(void) writer;
(void) buf;
(void) nbytes;
(void)writer;
(void)buf;
(void)nbytes;
if(!(type & CLIENTWRITE_BODY) || !nbytes)
return Curl_cwriter_write(data, writer->next, type, buf, nbytes);
@ -689,8 +689,8 @@ static CURLcode error_do_write(struct Curl_easy *data,
static void error_do_close(struct Curl_easy *data,
struct Curl_cwriter *writer)
{
(void) data;
(void) writer;
(void)data;
(void)writer;
}
static const struct Curl_cwtype error_writer = {
@ -843,9 +843,9 @@ CURLcode Curl_build_unencoding_stack(struct Curl_easy *data,
CURLcode Curl_build_unencoding_stack(struct Curl_easy *data,
const char *enclist, int is_transfer)
{
(void) data;
(void) enclist;
(void) is_transfer;
(void)data;
(void)enclist;
(void)is_transfer;
return CURLE_NOT_BUILT_IN;
}

View file

@ -46,8 +46,8 @@ int Curl_gethostname(char * const name, GETHOSTNAME_TYPE_ARG2 namelen)
#ifndef HAVE_GETHOSTNAME
/* Allow compilation and return failure when unavailable */
(void) name;
(void) namelen;
(void)name;
(void)namelen;
return -1;
#else

View file

@ -24,8 +24,8 @@
*
***************************************************************************/
#if (defined(USE_CURL_NTLM_CORE) && !defined(USE_WINDOWS_SSPI)) \
|| !defined(CURL_DISABLE_DIGEST_AUTH)
#if (defined(USE_CURL_NTLM_CORE) && !defined(USE_WINDOWS_SSPI)) || \
!defined(CURL_DISABLE_DIGEST_AUTH)
#include "curl_hmac.h"

View file

@ -222,7 +222,7 @@ static void sasl_state(struct SASL *sasl, struct Curl_easy *data,
infof(data, "SASL %p state change from %s to %s",
(void *)sasl, names[sasl->state], names[newstate]);
#else
(void) data;
(void)data;
#endif
sasl->state = newstate;
@ -615,8 +615,8 @@ CURLcode Curl_sasl_continue(struct SASL *sasl, struct Curl_easy *data,
struct bufref resp;
const char *hostname;
int port;
#if defined(USE_KERBEROS5) || defined(USE_NTLM) \
|| !defined(CURL_DISABLE_DIGEST_AUTH)
#if defined(USE_KERBEROS5) || defined(USE_NTLM) || \
!defined(CURL_DISABLE_DIGEST_AUTH)
const char *service = data->set.str[STRING_SERVICE_NAME] ?
data->set.str[STRING_SERVICE_NAME] :
sasl->params->service;

View file

@ -25,8 +25,8 @@
*
***************************************************************************/
#if !defined(CURL_DISABLE_AWS) || !defined(CURL_DISABLE_DIGEST_AUTH) \
|| defined(USE_LIBSSH2) || defined(USE_SSL)
#if !defined(CURL_DISABLE_AWS) || !defined(CURL_DISABLE_DIGEST_AUTH) || \
defined(USE_LIBSSH2) || defined(USE_SSL)
#include <curl/curl.h>
#include "curl_hmac.h"

View file

@ -110,8 +110,7 @@ typedef EVP_MD_CTX *Curl_sha512_256_ctx;
* @return CURLE_OK if succeed,
* error code otherwise
*/
static CURLcode
Curl_sha512_256_init(void *context)
static CURLcode Curl_sha512_256_init(void *context)
{
Curl_sha512_256_ctx *const ctx = (Curl_sha512_256_ctx *)context;
@ -142,10 +141,9 @@ Curl_sha512_256_init(void *context)
* @return CURLE_OK if succeed,
* error code otherwise
*/
static CURLcode
Curl_sha512_256_update(void *context,
const unsigned char *data,
size_t length)
static CURLcode Curl_sha512_256_update(void *context,
const unsigned char *data,
size_t length)
{
Curl_sha512_256_ctx *const ctx = (Curl_sha512_256_ctx *)context;
@ -165,9 +163,7 @@ Curl_sha512_256_update(void *context,
* @return CURLE_OK if succeed,
* error code otherwise
*/
static CURLcode
Curl_sha512_256_finish(unsigned char *digest,
void *context)
static CURLcode Curl_sha512_256_finish(unsigned char *digest, void *context)
{
CURLcode ret;
Curl_sha512_256_ctx *const ctx = (Curl_sha512_256_ctx *)context;
@ -207,8 +203,7 @@ typedef struct sha512_256_ctx Curl_sha512_256_ctx;
* @param context the calculation context
* @return always CURLE_OK
*/
static CURLcode
Curl_sha512_256_init(void *context)
static CURLcode Curl_sha512_256_init(void *context)
{
Curl_sha512_256_ctx *const ctx = (Curl_sha512_256_ctx *)context;
@ -229,10 +224,9 @@ Curl_sha512_256_init(void *context)
* @param length number of bytes in @a data
* @return always CURLE_OK
*/
static CURLcode
Curl_sha512_256_update(void *context,
const unsigned char *data,
size_t length)
static CURLcode Curl_sha512_256_update(void *context,
const unsigned char *data,
size_t length)
{
Curl_sha512_256_ctx *const ctx = (Curl_sha512_256_ctx *)context;
@ -252,9 +246,8 @@ Curl_sha512_256_update(void *context,
# bytes
* @return always CURLE_OK
*/
static CURLcode
Curl_sha512_256_finish(unsigned char *digest,
void *context)
static CURLcode Curl_sha512_256_finish(unsigned char *digest,
void *context)
{
Curl_sha512_256_ctx *const ctx = (Curl_sha512_256_ctx *)context;
@ -284,13 +277,13 @@ Curl_sha512_256_finish(unsigned char *digest,
#if !defined(CURL_FORCEINLINE) && \
defined(_MSC_VER) && !defined(__GNUC__) && !defined(__clang__)
# define CURL_FORCEINLINE __forceinline
#define CURL_FORCEINLINE __forceinline
#endif
#if !defined(CURL_FORCEINLINE)
/* Assume that 'CURL_INLINE' keyword works or the
* macro was already defined correctly. */
# define CURL_FORCEINLINE CURL_INLINE
/* Assume that 'CURL_INLINE' keyword works or the
* macro was already defined correctly. */
#ifndef CURL_FORCEINLINE
#define CURL_FORCEINLINE CURL_INLINE
#endif
/* Bits manipulation macros and functions.
@ -320,8 +313,8 @@ Curl_sha512_256_finish(unsigned char *digest,
/* Defined as a function. The macro version may duplicate the binary code
* size as each argument is used twice, so if any calculation is used
* as an argument, the calculation could be done twice. */
static CURL_FORCEINLINE curl_uint64_t
Curl_rotr64(curl_uint64_t value, unsigned int bits)
static CURL_FORCEINLINE curl_uint64_t Curl_rotr64(curl_uint64_t value,
unsigned int bits)
{
bits %= 64;
if(0 == bits)
@ -380,8 +373,7 @@ Curl_rotr64(curl_uint64_t value, unsigned int bits)
/**
* SHA-512/256 calculation context
*/
struct Curl_sha512_256ctx
{
struct Curl_sha512_256ctx {
/**
* Intermediate hash value. The variable is properly aligned. Smart
* compilers may automatically use fast load/store instruction for big
@ -417,8 +409,7 @@ typedef struct Curl_sha512_256ctx Curl_sha512_256_ctx;
* @param context the calculation context
* @return always CURLE_OK
*/
static CURLcode
Curl_sha512_256_init(void *context)
static CURLcode Curl_sha512_256_init(void *context)
{
struct Curl_sha512_256ctx *const ctx = (struct Curl_sha512_256ctx *)context;
@ -453,9 +444,9 @@ Curl_sha512_256_init(void *context)
* @param H hash values
* @param data the data buffer with #CURL_SHA512_256_BLOCK_SIZE bytes block
*/
static void
Curl_sha512_256_transform(curl_uint64_t H[SHA512_256_HASH_SIZE_WORDS],
const void *data)
static
void Curl_sha512_256_transform(curl_uint64_t H[SHA512_256_HASH_SIZE_WORDS],
const void *data)
{
/* Working variables,
see FIPS PUB 180-4 section 6.7, 6.4. */
@ -619,10 +610,9 @@ Curl_sha512_256_transform(curl_uint64_t H[SHA512_256_HASH_SIZE_WORDS],
* @param length number of bytes in @a data
* @return always CURLE_OK
*/
static CURLcode
Curl_sha512_256_update(void *context,
const unsigned char *data,
size_t length)
static CURLcode Curl_sha512_256_update(void *context,
const unsigned char *data,
size_t length)
{
unsigned int bytes_have; /**< Number of bytes in the context buffer */
struct Curl_sha512_256ctx *const ctx = (struct Curl_sha512_256ctx *)context;
@ -696,9 +686,7 @@ Curl_sha512_256_update(void *context,
# bytes
* @return always CURLE_OK
*/
static CURLcode
Curl_sha512_256_finish(unsigned char *digest,
void *context)
static CURLcode Curl_sha512_256_finish(unsigned char *digest, void *context)
{
struct Curl_sha512_256ctx *const ctx = (struct Curl_sha512_256ctx *)context;
curl_uint64_t num_bits; /**< Number of processed bits */
@ -746,14 +734,14 @@ Curl_sha512_256_finish(unsigned char *digest,
part of number of bits as big-endian values.
See FIPS PUB 180-4 section 5.1.2. */
/* Note: the target location is predefined and buffer is always aligned */
CURL_PUT_64BIT_BE(((unsigned char *) ctx_buf) \
CURL_PUT_64BIT_BE(((unsigned char *) ctx_buf) \
+ CURL_SHA512_256_BLOCK_SIZE \
- SHA512_256_SIZE_OF_LEN_ADD, \
ctx->count_bits_hi);
CURL_PUT_64BIT_BE(((unsigned char *) ctx_buf) \
+ CURL_SHA512_256_BLOCK_SIZE \
- SHA512_256_SIZE_OF_LEN_ADD \
+ SHA512_256_BYTES_IN_WORD, \
CURL_PUT_64BIT_BE(((unsigned char *) ctx_buf) \
+ CURL_SHA512_256_BLOCK_SIZE \
- SHA512_256_SIZE_OF_LEN_ADD \
+ SHA512_256_BYTES_IN_WORD, \
num_bits);
/* Process the full final block. */
Curl_sha512_256_transform(ctx->H, ctx->buffer);
@ -782,9 +770,8 @@ Curl_sha512_256_finish(unsigned char *digest,
* @param input_size the size of the data pointed by @a input
* @return always #CURLE_OK
*/
CURLcode
Curl_sha512_256it(unsigned char *output, const unsigned char *input,
size_t input_size)
CURLcode Curl_sha512_256it(unsigned char *output, const unsigned char *input,
size_t input_size)
{
Curl_sha512_256_ctx ctx;
CURLcode res;
@ -796,7 +783,7 @@ Curl_sha512_256it(unsigned char *output, const unsigned char *input,
res = Curl_sha512_256_update(&ctx, (const void *) input, input_size);
if(res != CURLE_OK) {
(void) Curl_sha512_256_finish(output, &ctx);
(void)Curl_sha512_256_finish(output, &ctx);
return res;
}
@ -804,22 +791,19 @@ Curl_sha512_256it(unsigned char *output, const unsigned char *input,
}
/* Wrapper function, takes 'unsigned int' as length type, returns void */
static void
Curl_sha512_256_update_i(void *context,
const unsigned char *data,
unsigned int length)
static void Curl_sha512_256_update_i(void *context,
const unsigned char *data,
unsigned int length)
{
/* Hypothetically the function may fail, but assume it does not */
(void) Curl_sha512_256_update(context, data, length);
(void)Curl_sha512_256_update(context, data, length);
}
/* Wrapper function, returns void */
static void
Curl_sha512_256_finish_v(unsigned char *result,
void *context)
static void Curl_sha512_256_finish_v(unsigned char *result, void *context)
{
/* Hypothetically the function may fail, but assume it does not */
(void) Curl_sha512_256_finish(result, context);
(void)Curl_sha512_256_finish(result, context);
}
/* Wrapper function, takes 'unsigned int' as length type, returns void */

View file

@ -289,13 +289,13 @@ extern PSecurityFunctionTable Curl_pSecFn;
#endif
#endif /* __MINGW32CE__ */
#ifndef SEC_E_INVALID_PARAMETER
# define SEC_E_INVALID_PARAMETER ((HRESULT)0x8009035DL)
#define SEC_E_INVALID_PARAMETER ((HRESULT)0x8009035DL)
#endif
#ifndef SEC_E_DELEGATION_POLICY
# define SEC_E_DELEGATION_POLICY ((HRESULT)0x8009035EL)
#define SEC_E_DELEGATION_POLICY ((HRESULT)0x8009035EL)
#endif
#ifndef SEC_E_POLICY_NLTM_ONLY
# define SEC_E_POLICY_NLTM_ONLY ((HRESULT)0x8009035FL)
#define SEC_E_POLICY_NLTM_ONLY ((HRESULT)0x8009035FL)
#endif
#ifdef __MINGW32CE__

View file

@ -26,14 +26,10 @@
#include "../curl_setup.h"
#ifdef _WIN32
/*
* MultiByte conversions using Windows kernel32 library.
*/
/* MultiByte conversions using Windows kernel32 library. */
wchar_t *curlx_convert_UTF8_to_wchar(const char *str_utf8);
char *curlx_convert_wchar_to_UTF8(const wchar_t *str_w);
#endif /* _WIN32 */
#endif
/*
* Macros curlx_convert_UTF8_to_tchar(), curlx_convert_tchar_to_UTF8()

View file

@ -169,7 +169,7 @@ struct curltime curlx_now(void)
uint64_t usecs;
if(0 == timebase.denom)
(void) mach_timebase_info(&timebase);
(void)mach_timebase_info(&timebase);
usecs = mach_absolute_time();
usecs *= timebase.numer; /* spellchecker:disable-line */

View file

@ -466,7 +466,7 @@ static int events_socket(CURL *easy, /* easy handle */
struct Curl_easy *data = easy;
#if defined(CURL_DISABLE_VERBOSE_STRINGS)
(void) easy;
(void)easy;
#endif
(void)socketp;

View file

@ -82,7 +82,7 @@ const struct curl_easyoption *curl_easy_option_by_name(const char *name)
return NULL;
}
const struct curl_easyoption *curl_easy_option_by_id (CURLoption id)
const struct curl_easyoption *curl_easy_option_by_id(CURLoption id)
{
(void)id;
return NULL;

View file

@ -186,22 +186,24 @@ static void free_formlist(struct FormInfo *ptr)
* Examples:
*
* Simple name/value pair with copied contents:
* curl_formadd (&post, &last, CURLFORM_COPYNAME, "name",
* CURLFORM_COPYCONTENTS, "value", CURLFORM_END);
* curl_formadd(&post, &last, CURLFORM_COPYNAME, "name",
* CURLFORM_COPYCONTENTS, "value", CURLFORM_END);
*
* name/value pair where only the content pointer is remembered:
* curl_formadd (&post, &last, CURLFORM_COPYNAME, "name",
* CURLFORM_PTRCONTENTS, ptr, CURLFORM_CONTENTSLENGTH, 10, CURLFORM_END);
* curl_formadd(&post, &last, CURLFORM_COPYNAME, "name",
* CURLFORM_PTRCONTENTS, ptr, CURLFORM_CONTENTSLENGTH, 10,
* CURLFORM_END);
* (if CURLFORM_CONTENTSLENGTH is missing strlen () is used)
*
* storing a filename (CONTENTTYPE is optional!):
* curl_formadd (&post, &last, CURLFORM_COPYNAME, "name",
* CURLFORM_FILE, "filename1", CURLFORM_CONTENTTYPE, "plain/text",
* CURLFORM_END);
* curl_formadd(&post, &last, CURLFORM_COPYNAME, "name",
* CURLFORM_FILE, "filename1", CURLFORM_CONTENTTYPE, "plain/text",
* CURLFORM_END);
*
* storing multiple filenames:
* curl_formadd (&post, &last, CURLFORM_COPYNAME, "name",
* CURLFORM_FILE, "filename1", CURLFORM_FILE, "filename2", CURLFORM_END);
* curl_formadd(&post, &last, CURLFORM_COPYNAME, "name",
* CURLFORM_FILE, "filename1", CURLFORM_FILE, "filename2",
* CURLFORM_END);
*
* Returns:
* CURL_FORMADD_OK on success
@ -926,9 +928,9 @@ CURLFORMcode curl_formadd(struct curl_httppost **httppost,
int curl_formget(struct curl_httppost *form, void *arg,
curl_formget_callback append)
{
(void) form;
(void) arg;
(void) append;
(void)form;
(void)arg;
(void)append;
return CURL_FORMADD_DISABLED;
}

View file

@ -3015,15 +3015,15 @@ void *Curl_nghttp2_realloc(void *ptr, size_t size, void *user_data)
char *curl_pushheader_bynum(struct curl_pushheaders *h, size_t num)
{
(void) h;
(void) num;
(void)h;
(void)num;
return NULL;
}
char *curl_pushheader_byname(struct curl_pushheaders *h, const char *header)
{
(void) h;
(void) header;
(void)h;
(void)header;
return NULL;
}

View file

@ -109,7 +109,7 @@ if2ip_result_t Curl_if2ip(int af,
#if defined(USE_IPV6) && \
!defined(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID)
(void) local_scope_id;
(void)local_scope_id;
#endif
if(getifaddrs(&head) >= 0) {
@ -252,14 +252,14 @@ if2ip_result_t Curl_if2ip(int af,
const char *interf,
char *buf, size_t buf_size)
{
(void) af;
(void)af;
#ifdef USE_IPV6
(void) remote_scope;
(void) local_scope_id;
(void)remote_scope;
(void)local_scope_id;
#endif
(void) interf;
(void) buf;
(void) buf_size;
(void)interf;
(void)buf;
(void)buf_size;
return IF2IP_NOT_FOUND;
}

View file

@ -718,7 +718,7 @@ int Curl_sec_read_msg(struct Curl_easy *data, struct connectdata *conn,
size_t decoded_sz = 0;
CURLcode error;
(void) data;
(void)data;
if(!conn->mech)
/* not initialized, return error */

View file

@ -223,7 +223,7 @@ static void MD4_Final(unsigned char *result, MD4_CTX *ctx)
#if !defined(HAS_MBEDTLS_RESULT_CODE_BASED_FUNCTIONS)
mbedtls_md4(ctx->data, ctx->size, result);
#else
(void) mbedtls_md4_ret(ctx->data, ctx->size, result);
(void)mbedtls_md4_ret(ctx->data, ctx->size, result);
#endif
Curl_safefree(ctx->data);

View file

@ -24,8 +24,8 @@
#include "curl_setup.h"
#if (defined(USE_CURL_NTLM_CORE) && !defined(USE_WINDOWS_SSPI)) \
|| !defined(CURL_DISABLE_DIGEST_AUTH)
#if (defined(USE_CURL_NTLM_CORE) && !defined(USE_WINDOWS_SSPI)) || \
!defined(CURL_DISABLE_DIGEST_AUTH)
#include <string.h>
#include <curl/curl.h>
@ -178,18 +178,18 @@ static void my_md5_update(void *ctx,
unsigned int length)
{
#if !defined(HAS_MBEDTLS_RESULT_CODE_BASED_FUNCTIONS)
(void) mbedtls_md5_update(ctx, data, length);
(void)mbedtls_md5_update(ctx, data, length);
#else
(void) mbedtls_md5_update_ret(ctx, data, length);
(void)mbedtls_md5_update_ret(ctx, data, length);
#endif
}
static void my_md5_final(unsigned char *digest, void *ctx)
{
#if !defined(HAS_MBEDTLS_RESULT_CODE_BASED_FUNCTIONS)
(void) mbedtls_md5_finish(ctx, digest);
(void)mbedtls_md5_finish(ctx, digest);
#else
(void) mbedtls_md5_finish_ret(ctx, digest);
(void)mbedtls_md5_finish_ret(ctx, digest);
#endif
}

View file

@ -36,9 +36,10 @@ struct Curl_easy;
#include "strdup.h"
#include "curlx/base64.h"
#if !defined(CURL_DISABLE_MIME) && (!defined(CURL_DISABLE_HTTP) || \
!defined(CURL_DISABLE_SMTP) || \
!defined(CURL_DISABLE_IMAP))
#if !defined(CURL_DISABLE_MIME) && \
(!defined(CURL_DISABLE_HTTP) || \
!defined(CURL_DISABLE_SMTP) || \
!defined(CURL_DISABLE_IMAP))
#if defined(HAVE_LIBGEN_H) && defined(HAVE_BASENAME)
#include <libgen.h>
@ -53,14 +54,13 @@ struct Curl_easy;
#include "memdebug.h"
#ifdef _WIN32
# ifndef R_OK
# ifndef R_OK
# define R_OK 4
# endif
# endif
#endif
#define READ_ERROR ((size_t) -1)
#define STOP_FILLING ((size_t) -2)
#define READ_ERROR ((size_t) -1)
#define STOP_FILLING ((size_t) -2)
static size_t mime_subparts_read(char *buffer, size_t size, size_t nitems,
void *instream, bool *hasread);
@ -97,30 +97,30 @@ static const struct mime_encoder encoders[] = {
#define QP_CR 3 /* Carriage return. */
#define QP_LF 4 /* Line-feed. */
static const unsigned char qp_class[] = {
0, 0, 0, 0, 0, 0, 0, 0, /* 00 - 07 */
0, QP_SP, QP_LF, 0, 0, QP_CR, 0, 0, /* 08 - 0F */
0, 0, 0, 0, 0, 0, 0, 0, /* 10 - 17 */
0, 0, 0, 0, 0, 0, 0, 0, /* 18 - 1F */
QP_SP, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 20 - 27 */
QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 28 - 2F */
QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 30 - 37 */
QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, 0 , QP_OK, QP_OK, /* 38 - 3F */
QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 40 - 47 */
QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 48 - 4F */
QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 50 - 57 */
QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 58 - 5F */
QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 60 - 67 */
QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 68 - 6F */
QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 70 - 77 */
QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, 0, /* 78 - 7F */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 80 - 8F */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 90 - 9F */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* A0 - AF */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* B0 - BF */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* C0 - CF */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* D0 - DF */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* E0 - EF */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /* F0 - FF */
0, 0, 0, 0, 0, 0, 0, 0, /* 00 - 07 */
0, QP_SP, QP_LF, 0, 0, QP_CR, 0, 0, /* 08 - 0F */
0, 0, 0, 0, 0, 0, 0, 0, /* 10 - 17 */
0, 0, 0, 0, 0, 0, 0, 0, /* 18 - 1F */
QP_SP, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 20 - 27 */
QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 28 - 2F */
QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 30 - 37 */
QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, 0 , QP_OK, QP_OK, /* 38 - 3F */
QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 40 - 47 */
QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 48 - 4F */
QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 50 - 57 */
QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 58 - 5F */
QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 60 - 67 */
QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 68 - 6F */
QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 70 - 77 */
QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, 0, /* 78 - 7F */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 80 - 8F */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 90 - 9F */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* A0 - AF */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* B0 - BF */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* C0 - CF */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* D0 - DF */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* E0 - EF */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /* F0 - FF */
};
@ -384,7 +384,7 @@ static size_t encoder_nop_read(char *buffer, size_t size, bool ateof,
struct mime_encoder_state *st = &part->encstate;
size_t insize = st->bufend - st->bufbeg;
(void) ateof;
(void)ateof;
if(!size)
return STOP_FILLING;
@ -412,7 +412,7 @@ static size_t encoder_7bit_read(char *buffer, size_t size, bool ateof,
struct mime_encoder_state *st = &part->encstate;
size_t cursize = st->bufend - st->bufbeg;
(void) ateof;
(void)ateof;
if(!size)
return STOP_FILLING;
@ -661,7 +661,7 @@ static size_t mime_mem_read(char *buffer, size_t size, size_t nitems,
{
curl_mimepart *part = (curl_mimepart *) instream;
size_t sz = curlx_sotouz(part->datasize - part->state.offset);
(void) size; /* Always 1.*/
(void)size; /* Always 1.*/
if(!nitems)
return STOP_FILLING;
@ -1000,7 +1000,7 @@ static size_t mime_subparts_read(char *buffer, size_t size, size_t nitems,
{
curl_mime *mime = (curl_mime *) instream;
size_t cursize = 0;
(void) size; /* Always 1. */
(void)size; /* Always 1. */
while(nitems) {
size_t sz = 0;
@ -1593,7 +1593,7 @@ size_t Curl_mime_read(char *buffer, size_t size, size_t nitems, void *instream)
size_t ret;
bool hasread;
(void) size; /* Always 1. */
(void)size; /* Always 1. */
/* If `nitems` is <= 4, some encoders will return STOP_FILLING without
* adding any data and this loops infinitely. */
@ -2220,62 +2220,62 @@ CURLcode Curl_creader_set_mime(struct Curl_easy *data, curl_mimepart *part)
/* Mime not compiled in: define stubs for externally-referenced functions. */
curl_mime *curl_mime_init(CURL *easy)
{
(void) easy;
(void)easy;
return NULL;
}
void curl_mime_free(curl_mime *mime)
{
(void) mime;
(void)mime;
}
curl_mimepart *curl_mime_addpart(curl_mime *mime)
{
(void) mime;
(void)mime;
return NULL;
}
CURLcode curl_mime_name(curl_mimepart *part, const char *name)
{
(void) part;
(void) name;
(void)part;
(void)name;
return CURLE_NOT_BUILT_IN;
}
CURLcode curl_mime_filename(curl_mimepart *part, const char *filename)
{
(void) part;
(void) filename;
(void)part;
(void)filename;
return CURLE_NOT_BUILT_IN;
}
CURLcode curl_mime_type(curl_mimepart *part, const char *mimetype)
{
(void) part;
(void) mimetype;
(void)part;
(void)mimetype;
return CURLE_NOT_BUILT_IN;
}
CURLcode curl_mime_encoder(curl_mimepart *part, const char *encoding)
{
(void) part;
(void) encoding;
(void)part;
(void)encoding;
return CURLE_NOT_BUILT_IN;
}
CURLcode curl_mime_data(curl_mimepart *part,
const char *data, size_t datasize)
{
(void) part;
(void) data;
(void) datasize;
(void)part;
(void)data;
(void)datasize;
return CURLE_NOT_BUILT_IN;
}
CURLcode curl_mime_filedata(curl_mimepart *part, const char *filename)
{
(void) part;
(void) filename;
(void)part;
(void)filename;
return CURLE_NOT_BUILT_IN;
}
@ -2286,28 +2286,28 @@ CURLcode curl_mime_data_cb(curl_mimepart *part,
curl_free_callback freefunc,
void *arg)
{
(void) part;
(void) datasize;
(void) readfunc;
(void) seekfunc;
(void) freefunc;
(void) arg;
(void)part;
(void)datasize;
(void)readfunc;
(void)seekfunc;
(void)freefunc;
(void)arg;
return CURLE_NOT_BUILT_IN;
}
CURLcode curl_mime_subparts(curl_mimepart *part, curl_mime *subparts)
{
(void) part;
(void) subparts;
(void)part;
(void)subparts;
return CURLE_NOT_BUILT_IN;
}
CURLcode curl_mime_headers(curl_mimepart *part,
struct curl_slist *headers, int take_ownership)
{
(void) part;
(void) headers;
(void) take_ownership;
(void)part;
(void)headers;
(void)take_ownership;
return CURLE_NOT_BUILT_IN;
}

View file

@ -71,14 +71,14 @@ struct mev_sh_entry {
static size_t mev_sh_entry_hash(void *key, size_t key_length, size_t slots_num)
{
curl_socket_t fd = *((curl_socket_t *) key);
(void) key_length;
(void)key_length;
return (fd % (curl_socket_t)slots_num);
}
static size_t mev_sh_entry_compare(void *k1, size_t k1_len,
void *k2, size_t k2_len)
{
(void) k1_len; (void) k2_len;
(void)k1_len; (void)k2_len;
return (*((curl_socket_t *) k1)) == (*((curl_socket_t *) k2));
}

View file

@ -924,7 +924,7 @@ static CURLcode oldap_disconnect(struct Curl_easy *data,
bool dead_connection)
{
struct ldapconninfo *li = Curl_conn_meta_get(conn, CURL_META_LDAP_CONN);
(void) dead_connection;
(void)dead_connection;
#ifndef USE_SSL
(void)data;
#endif

View file

@ -203,8 +203,8 @@ CURLcode Curl_cwriter_def_write(struct Curl_easy *data,
void Curl_cwriter_def_close(struct Curl_easy *data,
struct Curl_cwriter *writer)
{
(void) data;
(void) writer;
(void)data;
(void)writer;
}
static size_t get_max_body_write_len(struct Curl_easy *data, curl_off_t limit)

View file

@ -25,8 +25,8 @@
#include "curl_setup.h"
#if !defined(CURL_DISABLE_AWS) || !defined(CURL_DISABLE_DIGEST_AUTH) \
|| defined(USE_LIBSSH2) || defined(USE_SSL)
#if !defined(CURL_DISABLE_AWS) || !defined(CURL_DISABLE_DIGEST_AUTH) || \
defined(USE_LIBSSH2) || defined(USE_SSL)
#include "curlx/warnless.h"
#include "curl_sha256.h"
@ -135,9 +135,9 @@ typedef mbedtls_sha256_context my_sha256_ctx;
static CURLcode my_sha256_init(void *ctx)
{
#if !defined(HAS_MBEDTLS_RESULT_CODE_BASED_FUNCTIONS)
(void) mbedtls_sha256_starts(ctx, 0);
(void)mbedtls_sha256_starts(ctx, 0);
#else
(void) mbedtls_sha256_starts_ret(ctx, 0);
(void)mbedtls_sha256_starts_ret(ctx, 0);
#endif
return CURLE_OK;
}
@ -147,18 +147,18 @@ static void my_sha256_update(void *ctx,
unsigned int length)
{
#if !defined(HAS_MBEDTLS_RESULT_CODE_BASED_FUNCTIONS)
(void) mbedtls_sha256_update(ctx, data, length);
(void)mbedtls_sha256_update(ctx, data, length);
#else
(void) mbedtls_sha256_update_ret(ctx, data, length);
(void)mbedtls_sha256_update_ret(ctx, data, length);
#endif
}
static void my_sha256_final(unsigned char *digest, void *ctx)
{
#if !defined(HAS_MBEDTLS_RESULT_CODE_BASED_FUNCTIONS)
(void) mbedtls_sha256_finish(ctx, digest);
(void)mbedtls_sha256_finish(ctx, digest);
#else
(void) mbedtls_sha256_finish_ret(ctx, digest);
(void)mbedtls_sha256_finish_ret(ctx, digest);
#endif
}
@ -167,7 +167,7 @@ typedef CC_SHA256_CTX my_sha256_ctx;
static CURLcode my_sha256_init(void *ctx)
{
(void) CC_SHA256_Init(ctx);
(void)CC_SHA256_Init(ctx);
return CURLE_OK;
}
@ -175,12 +175,12 @@ static void my_sha256_update(void *ctx,
const unsigned char *data,
unsigned int length)
{
(void) CC_SHA256_Update(ctx, data, length);
(void)CC_SHA256_Update(ctx, data, length);
}
static void my_sha256_final(unsigned char *digest, void *ctx)
{
(void) CC_SHA256_Final(digest, ctx);
(void)CC_SHA256_Final(digest, ctx);
}
#elif defined(USE_WIN32_CRYPTO)

View file

@ -496,7 +496,7 @@ static CURLcode smb_connect(struct Curl_easy *data, bool *done)
struct smb_conn *smbc = Curl_conn_meta_get(conn, CURL_META_SMB_CONN);
char *slash;
(void) done;
(void)done;
if(!smbc)
return CURLE_FAILED_INIT;

View file

@ -1892,7 +1892,7 @@ static CURLcode smtp_parse_address(const char *fqma, char **address,
host->name = host->name + 1;
/* Attempt to convert the hostname to IDN ACE */
(void) Curl_idnconvert_hostname(host);
(void)Curl_idnconvert_hostname(host);
/* If Curl_idnconvert_hostname() fails then we shall attempt to continue
and send the hostname using UTF-8 rather than as 7-bit ACE (which is

View file

@ -2955,7 +2955,7 @@ static CURLcode parse_connect_to_host_port(struct Curl_easy *data,
CURLcode result = CURLE_OK;
#ifdef CURL_DISABLE_VERBOSE_STRINGS
(void) data;
(void)data;
#endif
*hostname_result = NULL;

View file

@ -411,7 +411,7 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data,
SecBufferDesc chlg_desc;
SECURITY_STATUS status;
(void) data;
(void)data;
/* Query the security package for DigestSSP */
status =

View file

@ -99,8 +99,8 @@ CURLcode Curl_auth_create_gssapi_user_message(struct Curl_easy *data,
gss_buffer_desc input_token = GSS_C_EMPTY_BUFFER;
gss_buffer_desc output_token = GSS_C_EMPTY_BUFFER;
(void) userp;
(void) passwdp;
(void)userp;
(void)passwdp;
if(!krb5->spn) {
gss_buffer_desc spn_token = GSS_C_EMPTY_BUFFER;

View file

@ -271,7 +271,7 @@ CURLcode Curl_auth_create_gssapi_security_message(struct Curl_easy *data,
SECURITY_STATUS status;
#if defined(CURL_DISABLE_VERBOSE_STRINGS)
(void) data;
(void)data;
#endif
/* Ensure we have a valid challenge message */

View file

@ -235,7 +235,7 @@ static void ntlm_print_hex(FILE *handle, const char *buf, size_t len)
{
const char *p = buf;
(void) handle;
(void)handle;
fprintf(stderr, "0x");
while(len-- > 0)
@ -269,7 +269,7 @@ static CURLcode ntlm_decode_type2_target(struct Curl_easy *data,
size_t type2len = Curl_bufref_len(type2ref);
#if defined(CURL_DISABLE_VERBOSE_STRINGS)
(void) data;
(void)data;
#endif
if(type2len >= 48) {

View file

@ -206,7 +206,7 @@ CURLcode Curl_auth_decode_ntlm_type2_message(struct Curl_easy *data,
struct ntlmdata *ntlm)
{
#if defined(CURL_DISABLE_VERBOSE_STRINGS)
(void) data;
(void)data;
#endif
/* Ensure we have a valid type-2 message */
@ -258,10 +258,10 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data,
TimeStamp expiry; /* For Windows 9x compatibility of SSPI calls */
#if defined(CURL_DISABLE_VERBOSE_STRINGS)
(void) data;
(void)data;
#endif
(void) passwdp;
(void) userp;
(void)passwdp;
(void)userp;
/* Setup the type-2 "input" security buffer */
type_2_desc.ulVersion = SECBUFFER_VERSION;

View file

@ -98,8 +98,8 @@ CURLcode Curl_auth_decode_spnego_message(struct Curl_easy *data,
gss_channel_bindings_t chan_bindings = GSS_C_NO_CHANNEL_BINDINGS;
struct gss_channel_bindings_struct chan;
(void) user;
(void) password;
(void)user;
(void)password;
if(nego->context && nego->status == GSS_S_COMPLETE) {
/* We finished successfully our part of authentication, but server

View file

@ -108,7 +108,7 @@ CURLcode Curl_auth_decode_spnego_message(struct Curl_easy *data,
TimeStamp expiry; /* For Windows 9x compatibility of SSPI calls */
#if defined(CURL_DISABLE_VERBOSE_STRINGS)
(void) data;
(void)data;
#endif
if(nego->context && nego->status == SEC_E_OK) {

View file

@ -79,7 +79,7 @@ TCHAR *Curl_auth_build_spn(const char *service, const char *host,
TCHAR *tchar_spn = NULL;
TCHAR *dupe_tchar_spn = NULL;
(void) realm;
(void)realm;
/* Note: We could use DsMakeSPN() or DsClientMakeSpnForTargetServer() rather
than doing this ourselves but the first is only available in Windows XP

View file

@ -428,7 +428,7 @@ static int idn_present(curl_version_info_data *info)
!defined(CURL_DISABLE_HTTP)
static int https_proxy_present(curl_version_info_data *info)
{
(void) info;
(void)info;
return Curl_ssl_supports(NULL, SSLSUPP_HTTPS_PROXY);
}
#endif
@ -436,7 +436,7 @@ static int https_proxy_present(curl_version_info_data *info)
#if defined(USE_SSL) && defined(USE_ECH)
static int ech_present(curl_version_info_data *info)
{
(void) info;
(void)info;
return Curl_ssl_supports(NULL, SSLSUPP_ECH);
}
#endif

View file

@ -2487,8 +2487,8 @@ static CURLcode myssh_block_statemach(struct Curl_easy *data,
if(block) {
curl_socket_t fd_read = conn->sock[FIRSTSOCKET];
/* wait for the socket to become ready */
(void) Curl_socket_check(fd_read, CURL_SOCKET_BAD,
CURL_SOCKET_BAD, left > 1000 ? 1000 : left);
(void)Curl_socket_check(fd_read, CURL_SOCKET_BAD,
CURL_SOCKET_BAD, left > 1000 ? 1000 : left);
}
}
@ -2807,7 +2807,7 @@ static CURLcode scp_disconnect(struct Curl_easy *data,
CURLcode result = CURLE_OK;
struct ssh_conn *sshc = Curl_conn_meta_get(conn, CURL_META_SSH_CONN);
struct SSHPROTO *sshp = Curl_meta_get(data, CURL_META_SSH_EASY);
(void) dead_connection;
(void)dead_connection;
if(sshc && sshc->ssh_session && sshp) {
/* only if there is a session still around to use! */
@ -2848,7 +2848,7 @@ static CURLcode scp_done(struct Curl_easy *data, CURLcode status,
bool premature)
{
struct ssh_conn *sshc = Curl_conn_meta_get(data->conn, CURL_META_SSH_CONN);
(void) premature; /* not used */
(void)premature; /* not used */
if(!sshc)
return CURLE_FAILED_INIT;
@ -2866,7 +2866,7 @@ static CURLcode scp_send(struct Curl_easy *data, int sockindex,
struct connectdata *conn = data->conn;
struct ssh_conn *sshc = Curl_conn_meta_get(conn, CURL_META_SSH_CONN);
(void) sockindex; /* we only support SCP on the fixed known primary socket */
(void)sockindex; /* we only support SCP on the fixed known primary socket */
(void)eos;
*pnwritten = 0;
@ -2899,7 +2899,7 @@ static CURLcode scp_recv(struct Curl_easy *data, int sockindex,
struct ssh_conn *sshc = Curl_conn_meta_get(conn, CURL_META_SSH_CONN);
ssize_t nread;
(void) sockindex; /* we only support SCP on the fixed known primary socket */
(void)sockindex; /* we only support SCP on the fixed known primary socket */
*pnread = 0;
if(!sshc)
@ -2984,7 +2984,7 @@ static CURLcode sftp_disconnect(struct Curl_easy *data,
struct ssh_conn *sshc = Curl_conn_meta_get(conn, CURL_META_SSH_CONN);
struct SSHPROTO *sshp = Curl_meta_get(data, CURL_META_SSH_EASY);
CURLcode result = CURLE_OK;
(void) dead_connection;
(void)dead_connection;
DEBUGF(infof(data, "SSH DISCONNECT starts now"));

View file

@ -3695,7 +3695,7 @@ static CURLcode scp_disconnect(struct Curl_easy *data,
CURLcode result = CURLE_OK;
struct ssh_conn *sshc = Curl_conn_meta_get(conn, CURL_META_SSH_CONN);
struct SSHPROTO *sshp = Curl_meta_get(data, CURL_META_SSH_EASY);
(void) dead_connection;
(void)dead_connection;
if(sshc && sshc->ssh_session && sshp) {
/* only if there is a session still around to use! */
@ -3867,7 +3867,7 @@ static CURLcode sftp_disconnect(struct Curl_easy *data,
CURLcode result = CURLE_OK;
struct ssh_conn *sshc = Curl_conn_meta_get(conn, CURL_META_SSH_CONN);
struct SSHPROTO *sshp = Curl_meta_get(data, CURL_META_SSH_EASY);
(void) dead_connection;
(void)dead_connection;
DEBUGF(infof(data, "SSH DISCONNECT starts now"));

View file

@ -2121,7 +2121,7 @@ static void gtls_close(struct Curl_cfilter *cf,
struct gtls_ssl_backend_data *backend =
(struct gtls_ssl_backend_data *)connssl->backend;
(void) data;
(void)data;
DEBUGASSERT(backend);
CURL_TRC_CF(data, cf, "close");
if(backend->gtls.session) {

View file

@ -24,8 +24,7 @@
#include "../curl_setup.h"
#if defined(USE_OPENSSL) \
|| defined(USE_SCHANNEL)
#if defined(USE_OPENSSL) || defined(USE_SCHANNEL)
/* these backends use functions from this file */
#ifdef HAVE_NETINET_IN_H

View file

@ -104,8 +104,7 @@ struct mbed_ssl_backend_data {
};
/* apply threading? */
#if (defined(USE_THREADS_POSIX) && defined(HAVE_PTHREAD_H)) || \
defined(_WIN32)
#if (defined(USE_THREADS_POSIX) && defined(HAVE_PTHREAD_H)) || defined(_WIN32)
#define HAS_THREADING_SUPPORT
#endif
@ -171,9 +170,9 @@ static void mbed_debug(void *context, int level, const char *f_name,
int line_nb, const char *line)
{
struct Curl_easy *data = (struct Curl_easy *)context;
(void) level;
(void) line_nb;
(void) f_name;
(void)level;
(void)line_nb;
(void)f_name;
if(data) {
size_t len = strlen(line);
@ -412,7 +411,7 @@ mbed_set_selected_ciphers(struct Curl_easy *data,
return CURLE_OUT_OF_MEMORY;
#ifndef HAS_TLS13_SUPPORT
(void) ciphers13, (void) j;
(void)ciphers13, (void)j;
#else
if(!ciphers13) {
/* Add default TLSv1.3 ciphers to selection */
@ -501,8 +500,8 @@ static void
mbed_dump_cert_info(struct Curl_easy *data, const mbedtls_x509_crt *crt)
{
#if defined(CURL_DISABLE_VERBOSE_STRINGS) || \
(MBEDTLS_VERSION_NUMBER >= 0x03000000 && defined(MBEDTLS_X509_REMOVE_INFO))
(void) data, (void) crt;
(MBEDTLS_VERSION_NUMBER >= 0x03000000 && defined(MBEDTLS_X509_REMOVE_INFO))
(void)data, (void)crt;
#else
const size_t bufsize = 16384;
char *p, *buffer = malloc(bufsize);

View file

@ -1940,7 +1940,7 @@ static CURLcode ossl_set_engine_default(struct Curl_easy *data)
}
}
#else
(void) data;
(void)data;
#endif
return CURLE_OK;
}
@ -1963,7 +1963,7 @@ static struct curl_slist *ossl_engines_list(struct Curl_easy *data)
list = beg;
}
#endif
(void) data;
(void)data;
return list;
}
@ -2819,7 +2819,7 @@ static void ossl_trace(int direction, int ssl_ver, int content_type,
Curl_debug(data, (direction == 1) ? CURLINFO_SSL_DATA_OUT :
CURLINFO_SSL_DATA_IN, (const char *)buf, len);
(void) ssl;
(void)ssl;
}
#endif
@ -2941,7 +2941,7 @@ ossl_set_ssl_version_min_max_legacy(ctx_option_t *ctx_options,
long ssl_version = conn_config->version;
long ssl_version_max = conn_config->version_max;
(void) data; /* In case it is unused. */
(void)data; /* In case it is unused. */
switch(ssl_version) {
case CURL_SSLVERSION_TLSv1_3:
@ -5598,7 +5598,7 @@ static CURLcode ossl_sha256sum(const unsigned char *tmp, /* input */
{
EVP_MD_CTX *mdctx;
unsigned int len = 0;
(void) unused;
(void)unused;
mdctx = EVP_MD_CTX_create();
if(!mdctx)

View file

@ -30,13 +30,13 @@
#include "vtls.h"
#if (defined(__MINGW32__) || defined(CERT_CHAIN_REVOCATION_CHECK_CHAIN)) \
&& !defined(CURL_WINDOWS_UWP)
#if (defined(__MINGW32__) || defined(CERT_CHAIN_REVOCATION_CHECK_CHAIN)) && \
!defined(CURL_WINDOWS_UWP)
#define HAS_MANUAL_VERIFY_API
#endif
#if defined(CryptStringToBinary) && defined(CRYPT_STRING_HEX) \
&& !defined(DISABLE_SCHANNEL_CLIENT_CERT)
#if defined(CryptStringToBinary) && defined(CRYPT_STRING_HEX) && \
!defined(DISABLE_SCHANNEL_CLIENT_CERT)
#define HAS_CLIENT_CERT_PATH
#endif

View file

@ -801,8 +801,8 @@ CURLcode Curl_verify_certificate(struct Curl_cfilter *cf,
#ifndef UNDER_CE
if(result == CURLE_OK &&
(conn_config->CAfile || conn_config->ca_info_blob) &&
BACKEND->use_manual_cred_validation) {
(conn_config->CAfile || conn_config->ca_info_blob) &&
BACKEND->use_manual_cred_validation) {
/*
* Create a chain engine that uses the certificates in the CA file as
* trusted certificates. This is only supported on Windows 7+.

View file

@ -931,7 +931,7 @@ wssl_legacy_CTX_set_min_proto_version(WOLFSSL_CTX* ctx, int version)
static int
wssl_legacy_CTX_set_max_proto_version(WOLFSSL_CTX* ctx, int version)
{
(void) ctx, (void) version;
(void)ctx, (void)version;
return WOLFSSL_NOT_IMPLEMENTED;
}
#define wolfSSL_CTX_set_min_proto_version wssl_legacy_CTX_set_min_proto_version
@ -1967,7 +1967,7 @@ static void wssl_close(struct Curl_cfilter *cf, struct Curl_easy *data)
struct ssl_connect_data *connssl = cf->ctx;
struct wssl_ctx *wssl = (struct wssl_ctx *)connssl->backend;
(void) data;
(void)data;
DEBUGASSERT(wssl);

View file

@ -587,7 +587,7 @@ static CURLcode ws_cw_init(struct Curl_easy *data,
static void ws_cw_close(struct Curl_easy *data, struct Curl_cwriter *writer)
{
struct ws_cw_ctx *ctx = writer->ctx;
(void) data;
(void)data;
Curl_bufq_free(&ctx->buf);
}