mirror of
https://github.com/curl/curl.git
synced 2026-08-25 19:33:32 +03:00
checksrc: warn for leading spaces before the preprocessor hash
Fix the 40+ fallouts Closes #20282
This commit is contained in:
parent
dac98ccfa2
commit
f057ed05be
10 changed files with 55 additions and 46 deletions
|
|
@ -57,11 +57,11 @@
|
|||
#endif
|
||||
|
||||
#if defined(USE_OPENSSL) && defined(HAVE_DES_ECB_ENCRYPT)
|
||||
#define USE_OPENSSL_DES
|
||||
# define USE_OPENSSL_DES
|
||||
#elif defined(USE_WOLFSSL) && defined(HAVE_WOLFSSL_DES_ECB_ENCRYPT)
|
||||
#define USE_OPENSSL_DES
|
||||
# define USE_OPENSSL_DES
|
||||
#elif defined(USE_MBEDTLS) && defined(HAVE_MBEDTLS_DES_CRYPT_ECB)
|
||||
#define USE_MBEDTLS_DES
|
||||
# define USE_MBEDTLS_DES
|
||||
#endif
|
||||
|
||||
#ifdef USE_OPENSSL_DES
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ static CURLcode file_connect(struct Curl_easy *data, bool *done)
|
|||
return CURLE_URL_MALFORMAT;
|
||||
}
|
||||
|
||||
#ifdef AMIGA_FILESYSTEM
|
||||
#ifdef AMIGA_FILESYSTEM
|
||||
/*
|
||||
* A leading slash in an AmigaDOS path denotes the parent
|
||||
* directory, and hence we block this as it is relative.
|
||||
|
|
@ -227,10 +227,10 @@ static CURLcode file_connect(struct Curl_easy *data, bool *done)
|
|||
fd = curlx_open(real_path, O_RDONLY);
|
||||
}
|
||||
}
|
||||
#else
|
||||
#else
|
||||
fd = curlx_open(real_path, O_RDONLY);
|
||||
file->path = real_path;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
curlx_free(file->freepath);
|
||||
file->freepath = real_path; /* free this when done */
|
||||
|
|
|
|||
|
|
@ -233,19 +233,19 @@ CURLcode Curl_output_negotiate(struct Curl_easy *data,
|
|||
}
|
||||
|
||||
*state = GSS_AUTHSENT;
|
||||
#ifdef HAVE_GSSAPI
|
||||
#ifdef HAVE_GSSAPI
|
||||
if(neg_ctx->status == GSS_S_COMPLETE ||
|
||||
neg_ctx->status == GSS_S_CONTINUE_NEEDED) {
|
||||
*state = GSS_AUTHDONE;
|
||||
}
|
||||
#else
|
||||
#ifdef USE_WINDOWS_SSPI
|
||||
#else
|
||||
#ifdef USE_WINDOWS_SSPI
|
||||
if(neg_ctx->status == SEC_E_OK ||
|
||||
neg_ctx->status == SEC_I_CONTINUE_NEEDED) {
|
||||
*state = GSS_AUTHDONE;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
if(*state == GSS_AUTHDONE || *state == GSS_AUTHSUCC) {
|
||||
|
|
|
|||
|
|
@ -70,10 +70,10 @@
|
|||
#if defined(USE_WOLFSSL) && !defined(WOLFSSL_NO_MD4)
|
||||
|
||||
#ifdef OPENSSL_COEXIST
|
||||
#define MD4_CTX WOLFSSL_MD4_CTX
|
||||
#define MD4_Init wolfSSL_MD4_Init
|
||||
#define MD4_Update wolfSSL_MD4_Update
|
||||
#define MD4_Final wolfSSL_MD4_Final
|
||||
# define MD4_CTX WOLFSSL_MD4_CTX
|
||||
# define MD4_Init wolfSSL_MD4_Init
|
||||
# define MD4_Update wolfSSL_MD4_Update
|
||||
# define MD4_Final wolfSSL_MD4_Final
|
||||
#endif
|
||||
|
||||
#elif defined(USE_OPENSSL) && !defined(OPENSSL_NO_MD4)
|
||||
|
|
|
|||
32
lib/md5.c
32
lib/md5.c
|
|
@ -30,28 +30,28 @@
|
|||
#include "curl_hmac.h"
|
||||
|
||||
#ifdef USE_OPENSSL
|
||||
#include <openssl/opensslconf.h>
|
||||
#if !defined(OPENSSL_NO_MD5) && !defined(OPENSSL_NO_DEPRECATED_3_0)
|
||||
#define USE_OPENSSL_MD5
|
||||
#endif
|
||||
#include <openssl/opensslconf.h>
|
||||
#if !defined(OPENSSL_NO_MD5) && !defined(OPENSSL_NO_DEPRECATED_3_0)
|
||||
#define USE_OPENSSL_MD5
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef USE_WOLFSSL
|
||||
#include <wolfssl/options.h>
|
||||
#ifndef NO_MD5
|
||||
#define USE_WOLFSSL_MD5
|
||||
#endif
|
||||
#include <wolfssl/options.h>
|
||||
#ifndef NO_MD5
|
||||
#define USE_WOLFSSL_MD5
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef USE_MBEDTLS
|
||||
#include <mbedtls/version.h>
|
||||
#if MBEDTLS_VERSION_NUMBER < 0x03020000
|
||||
#error "mbedTLS 3.2.0 or later required"
|
||||
#endif
|
||||
#include <psa/crypto_config.h>
|
||||
#if defined(PSA_WANT_ALG_MD5) && PSA_WANT_ALG_MD5 /* mbedTLS 4+ */
|
||||
#define USE_MBEDTLS_MD5
|
||||
#endif
|
||||
#include <mbedtls/version.h>
|
||||
#if MBEDTLS_VERSION_NUMBER < 0x03020000
|
||||
#error "mbedTLS 3.2.0 or later required"
|
||||
#endif
|
||||
#include <psa/crypto_config.h>
|
||||
#if defined(PSA_WANT_ALG_MD5) && PSA_WANT_ALG_MD5 /* mbedTLS 4+ */
|
||||
#define USE_MBEDTLS_MD5
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef USE_GNUTLS
|
||||
|
|
|
|||
16
lib/sha256.c
16
lib/sha256.c
|
|
@ -30,14 +30,14 @@
|
|||
#include "curl_sha256.h"
|
||||
|
||||
#ifdef USE_MBEDTLS
|
||||
#include <mbedtls/version.h>
|
||||
#if MBEDTLS_VERSION_NUMBER < 0x03020000
|
||||
#error "mbedTLS 3.2.0 or later required"
|
||||
#endif
|
||||
#include <psa/crypto_config.h>
|
||||
#if defined(PSA_WANT_ALG_SHA_256) && PSA_WANT_ALG_SHA_256 /* mbedTLS 4+ */
|
||||
#define USE_MBEDTLS_SHA256
|
||||
#endif
|
||||
#include <mbedtls/version.h>
|
||||
#if MBEDTLS_VERSION_NUMBER < 0x03020000
|
||||
#error "mbedTLS 3.2.0 or later required"
|
||||
#endif
|
||||
#include <psa/crypto_config.h>
|
||||
#if defined(PSA_WANT_ALG_SHA_256) && PSA_WANT_ALG_SHA_256 /* mbedTLS 4+ */
|
||||
#define USE_MBEDTLS_SHA256
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef USE_OPENSSL
|
||||
|
|
|
|||
|
|
@ -2639,7 +2639,7 @@ static CURLcode cf_connect_start(struct Curl_cfilter *cf,
|
|||
#elif defined(USE_WOLFSSL)
|
||||
ngtcp2_conn_set_tls_native_handle(ctx->qconn, ctx->tls.wssl.ssl);
|
||||
#else
|
||||
#error "ngtcp2 TLS backend not defined"
|
||||
#error "ngtcp2 TLS backend not defined"
|
||||
#endif
|
||||
|
||||
ngtcp2_ccerr_default(&ctx->last_error);
|
||||
|
|
|
|||
|
|
@ -751,11 +751,11 @@ static int myssh_in_SFTP_QUOTE_STATVFS(struct Curl_easy *data,
|
|||
return SSH_OK;
|
||||
}
|
||||
else if(statvfs) {
|
||||
#ifdef _MSC_VER
|
||||
#define CURL_LIBSSH_VFS_SIZE_MASK "I64u"
|
||||
#else
|
||||
#define CURL_LIBSSH_VFS_SIZE_MASK PRIu64
|
||||
#endif
|
||||
#ifdef _MSC_VER
|
||||
#define CURL_LIBSSH_VFS_SIZE_MASK "I64u"
|
||||
#else
|
||||
#define CURL_LIBSSH_VFS_SIZE_MASK PRIu64
|
||||
#endif
|
||||
CURLcode result = CURLE_OK;
|
||||
char *tmp = curl_maprintf("statvfs:\n"
|
||||
"f_bsize: %" CURL_LIBSSH_VFS_SIZE_MASK "\n"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue