← Commit list

3cdc167425

Viktor Szakats
Viktor Szakats
2026-02-19
SUCCESS Duration: 367s

Subject

clang-tidy: check `readability-redundant-preprocessor`, fix fallouts

Binary

No binary (build failed)

Architecture & Compiler Flags

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

—

Build Log

(log yok)

Commit Diff GitHub →

.clang-tidy.yml+2 -1
@@ -16,4 +16,5 @@ Checks: >-
misc-const-correctness,
portability-*,
readability-named-parameter,
- readability-redundant-control-flow
+ readability-redundant-control-flow,
+ readability-redundant-preprocessor
lib/content_encoding.c+0 -2
@@ -600,9 +600,7 @@ static const struct Curl_cwtype * const general_unencoders[] = {
/* supported content decoders only for transfer encodings */
static const struct Curl_cwtype * const transfer_unencoders[] = {
-#ifndef CURL_DISABLE_HTTP
&Curl_httpchunk_unencoder,
-#endif
NULL
};
lib/vtls/cipher_suite.c+0 -8
@@ -159,13 +159,11 @@ struct cs_entry {
/* !checksrc! disable COMMANOSPACE all */
static const struct cs_entry cs_list[] = {
/* TLS 1.3 ciphers */
-#if defined(USE_MBEDTLS) || defined(USE_RUSTLS)
CS_ENTRY(0x1301, TLS,AES,128,GCM,SHA256,,,),
CS_ENTRY(0x1302, TLS,AES,256,GCM,SHA384,,,),
CS_ENTRY(0x1303, TLS,CHACHA20,POLY1305,SHA256,,,,),
CS_ENTRY(0x1304, TLS,AES,128,CCM,SHA256,,,),
CS_ENTRY(0x1305, TLS,AES,128,CCM,8,SHA256,,),
-#endif
/* TLS 1.2 ciphers */
CS_ENTRY(0xC02B, TLS,ECDHE,ECDSA,WITH,AES,128,GCM,SHA256),
CS_ENTRY(0xC02B, ECDHE,ECDSA,AES128,GCM,SHA256,,,),
@@ -232,8 +230,6 @@ static const struct cs_entry cs_list[] = {
CS_ENTRY(0xC031, ECDH,RSA,AES128,GCM,SHA256,,,),
CS_ENTRY(0xC032, TLS,ECDH,RSA,WITH,AES,256,GCM,SHA384),
CS_ENTRY(0xC032, ECDH,RSA,AES256,GCM,SHA384,,,),
-#endif
-#ifdef USE_MBEDTLS
CS_ENTRY(0x0001, TLS,RSA,WITH,NULL,MD5,,,),
CS_ENTRY(0x0001, NULL,MD5,,,,,,),
CS_ENTRY(0x0002, TLS,RSA,WITH,NULL,SHA,,,),
@@ -320,8 +316,6 @@ static const struct cs_entry cs_list[] = {
CS_ENTRY(0xC036, ECDHE,PSK,AES256,CBC,SHA,,,),
CS_ENTRY(0xCCAB, TLS,PSK,WITH,CHACHA20,POLY1305,SHA256,,),
CS_ENTRY(0xCCAB, PSK,CHACHA20,POLY1305,,,,,),
-#endif
-#ifdef USE_MBEDTLS
CS_ENTRY(0xC09C, TLS,RSA,WITH,AES,128,CCM,,),
CS_ENTRY(0xC09C, AES128,CCM,,,,,,),
CS_ENTRY(0xC09D, TLS,RSA,WITH,AES,256,CCM,,),
@@ -338,8 +332,6 @@ static const struct cs_entry cs_list[] = {
CS_ENTRY(0xC0AE, ECDHE,ECDSA,AES128,CCM8,,,,),
CS_ENTRY(0xC0AF, TLS,ECDHE,ECDSA,WITH,AES,256,CCM,8),
CS_ENTRY(0xC0AF, ECDHE,ECDSA,AES256,CCM8,,,,),
-#endif
-#ifdef USE_MBEDTLS
/* entries marked ns are "non-standard", they are not in OpenSSL */
CS_ENTRY(0x0041, TLS,RSA,WITH,CAMELLIA,128,CBC,SHA,),
CS_ENTRY(0x0041, CAMELLIA128,SHA,,,,,,),
src/tool_help.c+0 -2
@@ -281,13 +281,11 @@ void tool_help(const char *category)
curl_msnprintf(cmdbuf, sizeof(cmdbuf), "\n --no-%s", a->lname);
else
curl_msnprintf(cmdbuf, sizeof(cmdbuf), "\n %s", category);
-#ifdef USE_MANUAL
if(a->cmd == C_XATTR)
/* this is the last option, which then ends when FILES starts */
showhelp("\nALL OPTIONS\n", cmdbuf, "\nFILES");
else
showhelp("\nALL OPTIONS\n", cmdbuf, "\n -");
-#endif
}
#else
curl_mfprintf(tool_stderr, "Cannot comply. "