build: drop redundant unused variable suppressions
No binary (build failed)
—
(log yok)
| @@ -467,9 +467,6 @@ CURLcode Curl_altsvc_parse(struct Curl_easy *data, | |
| unsigned short dstport = srcport; /* the same by default */ | |
| size_t entries = 0; | |
| struct Curl_str alpn; | |
| - | #ifdef CURL_DISABLE_VERBOSE_STRINGS |
| - | (void)data; |
| - | #endif |
| DEBUGASSERT(asi); | |
| @@ -116,7 +116,6 @@ static void addr_ctx_unlink(struct async_thrdd_addr_ctx **paddr_ctx, | |
| struct async_thrdd_addr_ctx *addr_ctx = *paddr_ctx; | |
| bool destroy; | |
| - | (void)data; |
| if(!addr_ctx) | |
| return; | |
| @@ -379,7 +379,6 @@ static CURLcode proxy_h2_nw_out_flush(struct Curl_cfilter *cf, | |
| size_t nwritten; | |
| CURLcode result; | |
| - | (void)data; |
| if(Curl_bufq_is_empty(&ctx->outbufq)) | |
| return CURLE_OK; | |
| @@ -716,7 +715,6 @@ static int proxy_h2_on_header(nghttp2_session *session, | |
| CURLcode result; | |
| (void)flags; | |
| - | (void)data; |
| (void)session; | |
| DEBUGASSERT(stream_id); /* should never be a zero stream ID here */ | |
| if(stream_id != ctx->tunnel.stream_id) { | |
| @@ -785,7 +783,6 @@ static ssize_t tunnel_send_callback(nghttp2_session *session, | |
| size_t nread; | |
| (void)source; | |
| - | (void)data; |
| (void)ctx; | |
| if(!stream_id) | |
| @@ -849,7 +846,6 @@ static int proxy_h2_on_stream_close(nghttp2_session *session, | |
| struct Curl_easy *data = CF_DATA_CURRENT(cf); | |
| (void)session; | |
| - | (void)data; |
| if(stream_id != ctx->tunnel.stream_id) | |
| return 0; | |
| @@ -156,7 +156,6 @@ out: | |
| static void cf_haproxy_destroy(struct Curl_cfilter *cf, | |
| struct Curl_easy *data) | |
| { | |
| - | (void)data; |
| CURL_TRC_CF(data, cf, "destroy"); | |
| cf_haproxy_ctx_free(cf->ctx); | |
| } | |
| @@ -546,7 +546,6 @@ static void cf_hc_destroy(struct Curl_cfilter *cf, struct Curl_easy *data) | |
| { | |
| struct cf_hc_ctx *ctx = cf->ctx; | |
| - | (void)data; |
| CURL_TRC_CF(data, cf, "destroy"); | |
| cf_hc_reset(cf, data); | |
| Curl_safefree(ctx); | |
| @@ -1077,7 +1077,6 @@ static CURLcode cf_socket_open(struct Curl_cfilter *cf, | |
| CURLcode result = CURLE_COULDNT_CONNECT; | |
| bool is_tcp; | |
| - | (void)data; |
| DEBUGASSERT(ctx->sock == CURL_SOCKET_BAD); | |
| ctx->started_at = *Curl_pgrs_now(data); | |
| #ifdef SOCK_NONBLOCK | |
| @@ -1277,7 +1276,6 @@ static CURLcode cf_tcp_connect(struct Curl_cfilter *cf, | |
| CURLcode result = CURLE_COULDNT_CONNECT; | |
| int rc = 0; | |
| - | (void)data; |
| if(cf->connected) { | |
| *done = TRUE; | |
| return CURLE_OK; | |
| @@ -1627,7 +1625,7 @@ static bool cf_socket_conn_is_alive(struct Curl_cfilter *cf, | |
| int r; | |
| *input_pending = FALSE; | |
| - | (void)data; |
| + | |
| if(!ctx || ctx->sock == CURL_SOCKET_BAD) | |
| return FALSE; | |
| @@ -339,7 +339,6 @@ void Curl_conn_cf_add(struct Curl_easy *data, | |
| int index, | |
| struct Curl_cfilter *cf) | |
| { | |
| - | (void)data; |
| DEBUGASSERT(conn); | |
| DEBUGASSERT(!cf->conn); | |
| DEBUGASSERT(!cf->next); | |
| @@ -808,7 +808,7 @@ static int cpool_do_conn(struct Curl_easy *data, | |
| struct connectdata *conn, void *param) | |
| { | |
| struct cpool_do_conn_ctx *dctx = param; | |
| - | (void)data; |
| + | |
| if(conn->connection_id == dctx->id) { | |
| dctx->cb(conn, data, dctx->cbdata); | |
| return 1; | |
| @@ -858,7 +858,6 @@ static int cpool_mark_stale(struct Curl_easy *data, | |
| static int cpool_reap_no_reuse(struct Curl_easy *data, | |
| struct connectdata *conn, void *param) | |
| { | |
| - | (void)data; |
| (void)param; | |
| if(!CONN_INUSE(conn) && conn->bits.no_reuse) { | |
| Curl_conn_terminate(data, conn, FALSE); | |
| @@ -465,7 +465,6 @@ static void cf_setup_destroy(struct Curl_cfilter *cf, struct Curl_easy *data) | |
| { | |
| struct cf_setup_ctx *ctx = cf->ctx; | |
| - | (void)data; |
| CURL_TRC_CF(data, cf, "destroy"); | |
| Curl_safefree(ctx); | |
| } | |
| @@ -437,10 +437,6 @@ void Curl_gss_log_error(struct Curl_easy *data, const char *prefix, | |
| display_gss_error(minor, GSS_C_MECH_CODE, buf, len); | |
| infof(data, "%s%s", prefix, buf); | |
| - | #ifdef CURL_DISABLE_VERBOSE_STRINGS |
| - | (void)data; |
| - | (void)prefix; |
| - | #endif |
| } | |
| #if defined(__GNUC__) && defined(__APPLE__) | |
| @@ -74,9 +74,6 @@ struct Curl_addrinfo *Curl_sync_getaddrinfo(struct Curl_easy *data, | |
| struct Curl_addrinfo *ai = NULL; | |
| (void)ip_version; | |
| - | #ifdef CURL_DISABLE_VERBOSE_STRINGS |
| - | (void)data; |
| - | #endif |
| ai = Curl_ipv4_resolve_r(hostname, port); | |
| if(!ai) | |
| @@ -745,7 +745,6 @@ static CURLcode nw_out_flush(struct Curl_cfilter *cf, | |
| size_t nwritten; | |
| CURLcode result; | |
| - | (void)data; |
| if(Curl_bufq_is_empty(&ctx->outbufq)) | |
| return CURLE_OK; | |
| @@ -380,7 +380,6 @@ static void http_proxy_cf_destroy(struct Curl_cfilter *cf, | |
| { | |
| struct cf_proxy_ctx *ctx = cf->ctx; | |
| - | (void)data; |
| CURL_TRC_CF(data, cf, "destroy"); | |
| curlx_free(ctx); | |
| } | |
| @@ -1494,7 +1494,6 @@ static CURLcode imap_pp_statemachine(struct Curl_easy *data, | |
| struct pingpong *pp; | |
| size_t nread = 0; | |
| - | (void)data; |
| if(!imapc || !imap) | |
| return CURLE_FAILED_INIT; | |
| pp = &imapc->pp; | |
| @@ -2161,7 +2160,6 @@ static CURLcode imap_disconnect(struct Curl_easy *data, | |
| { | |
| struct imap_conn *imapc = Curl_conn_meta_get(conn, CURL_META_IMAP_CONN); | |
| - | (void)data; |
| if(imapc) { | |
| /* We cannot send quit unconditionally. If this connection is stale or | |
| bad in any way (pingpong has pending data to send), | |
| @@ -161,7 +161,6 @@ static uint32_t rtsp_conncheck(struct Curl_easy *data, | |
| uint32_t checks_to_perform) | |
| { | |
| unsigned int ret_val = CONNRESULT_NONE; | |
| - | (void)data; |
| if(checks_to_perform & CONNCHECK_ISDEAD) { | |
| bool input_pending; | |
| @@ -568,7 +568,6 @@ CURLcode Curl_pollset_change(struct Curl_easy *data, | |
| DEBUGASSERT(ps->init == CURL_EASY_POLLSET_MAGIC); | |
| #endif | |
| - | (void)data; |
| DEBUGASSERT(VALID_SOCK(sock)); | |
| if(!VALID_SOCK(sock)) | |
| return CURLE_BAD_FUNCTION_ARGUMENT; | |
| @@ -625,7 +625,6 @@ struct cr_in_ctx { | |
| static CURLcode cr_in_init(struct Curl_easy *data, struct Curl_creader *reader) | |
| { | |
| struct cr_in_ctx *ctx = reader->ctx; | |
| - | (void)data; |
| ctx->read_cb = data->state.fread_func; | |
| ctx->cb_user_data = data->state.in; | |
| ctx->total_len = -1; | |
| @@ -1294,7 +1293,6 @@ static CURLcode cr_buf_read(struct Curl_easy *data, | |
| struct cr_buf_ctx *ctx = reader->ctx; | |
| size_t nread = ctx->blen - ctx->index; | |
| - | (void)data; |
| if(!nread || !ctx->buf) { | |
| *pnread = 0; | |
| *peos = TRUE; | |
| @@ -1904,7 +1904,6 @@ static CURLcode smtp_disconnect(struct Curl_easy *data, | |
| { | |
| struct smtp_conn *smtpc = Curl_conn_meta_get(conn, CURL_META_SMTP_CONN); | |
| - | (void)data; |
| if(!smtpc) | |
| return CURLE_FAILED_INIT; | |
| @@ -2053,9 +2053,6 @@ static char *detect_proxy(struct Curl_easy *data, | |
| */ | |
| char proxy_env[20]; | |
| const char *envp = proxy_env; | |
| - | #ifdef CURL_DISABLE_VERBOSE_STRINGS |
| - | (void)data; |
| - | #endif |
| curl_msnprintf(proxy_env, sizeof(proxy_env), "%s_proxy", | |
| conn->handler->scheme); | |
| @@ -2832,10 +2829,6 @@ static CURLcode parse_connect_to_host_port(struct Curl_easy *data, | |
| int port = -1; | |
| CURLcode result = CURLE_OK; | |
| - | #ifdef CURL_DISABLE_VERBOSE_STRINGS |
| - | (void)data; |
| - | #endif |
| - | |
| *hostname_result = NULL; | |
| *port_result = -1; | |
| @@ -193,10 +193,6 @@ CURLcode Curl_auth_create_digest_md5_message(struct Curl_easy *data, | |
| status == SEC_I_COMPLETE_AND_CONTINUE) | |
| Curl_pSecFn->CompleteAuthToken(&credentials, &resp_desc); | |
| else if(status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED) { | |
| - | #ifndef CURL_DISABLE_VERBOSE_STRINGS |
| - | char buffer[STRERROR_LEN]; |
| - | #endif |
| - | |
| Curl_pSecFn->FreeCredentialsHandle(&credentials); | |
| Curl_sspi_free_identity(p_identity); | |
| curlx_free(spn); | |
| @@ -206,8 +202,11 @@ CURLcode Curl_auth_create_digest_md5_message(struct Curl_easy *data, | |
| return CURLE_OUT_OF_MEMORY; | |
| #ifndef CURL_DISABLE_VERBOSE_STRINGS | |
| - | infof(data, "schannel: InitializeSecurityContext failed: %s", |
| - | Curl_sspi_strerror(status, buffer, sizeof(buffer))); |
| + | { |
| + | char buffer[STRERROR_LEN]; |
| + | infof(data, "schannel: InitializeSecurityContext failed: %s", |
| + | Curl_sspi_strerror(status, buffer, sizeof(buffer))); |
| + | } |
| #endif | |
| return CURLE_AUTH_ERROR; | |
| @@ -401,8 +400,6 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data, | |
| SecBufferDesc chlg_desc; | |
| SECURITY_STATUS status; | |
| - | (void)data; |
| - | |
| /* Query the security package for DigestSSP */ | |
| status = | |
| Curl_pSecFn->QuerySecurityPackageInfo( | |
| @@ -594,10 +591,6 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data, | |
| status == SEC_I_COMPLETE_AND_CONTINUE) | |
| Curl_pSecFn->CompleteAuthToken(&credentials, &resp_desc); | |
| else if(status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED) { | |
| - | #ifndef CURL_DISABLE_VERBOSE_STRINGS |
| - | char buffer[STRERROR_LEN]; |
| - | #endif |
| - | |
| Curl_pSecFn->FreeCredentialsHandle(&credentials); | |
| Curl_sspi_free_identity(p_identity); | |
| @@ -609,8 +602,11 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data, | |
| return CURLE_OUT_OF_MEMORY; | |
| #ifndef CURL_DISABLE_VERBOSE_STRINGS | |
| - | infof(data, "schannel: InitializeSecurityContext failed: %s", |
| - | Curl_sspi_strerror(status, buffer, sizeof(buffer))); |
| + | { |
| + | char buffer[STRERROR_LEN]; |
| + | infof(data, "schannel: InitializeSecurityContext failed: %s", |
| + | Curl_sspi_strerror(status, buffer, sizeof(buffer))); |
| + | } |
| #endif | |
| return CURLE_AUTH_ERROR; | |
| @@ -259,10 +259,6 @@ CURLcode Curl_auth_create_gssapi_security_message(struct Curl_easy *data, | |
| SecPkgContext_Sizes sizes; | |
| SECURITY_STATUS status; | |
| - | #ifdef CURL_DISABLE_VERBOSE_STRINGS |
| - | (void)data; |
| - | #endif |
| - | |
| /* Ensure we have a valid challenge message */ | |
| DEBUGASSERT(chlg); | |
| if(!Curl_bufref_len(chlg)) { | |
| @@ -254,10 +254,6 @@ static CURLcode ntlm_decode_type2_target(struct Curl_easy *data, | |
| const unsigned char *type2 = Curl_bufref_uptr(type2ref); | |
| size_t type2len = Curl_bufref_len(type2ref); | |
| - | #ifdef CURL_DISABLE_VERBOSE_STRINGS |
| - | (void)data; |
| - | #endif |
| - | |
| if(type2len >= 48) { | |
| target_info_len = Curl_read16_le(&type2[40]); | |
| target_info_offset = Curl_read32_le(&type2[44]); | |
| @@ -354,10 +350,6 @@ CURLcode Curl_auth_decode_ntlm_type2_message(struct Curl_easy *data, | |
| const unsigned char *type2 = Curl_bufref_uptr(type2ref); | |
| size_t type2len = Curl_bufref_len(type2ref); | |
| - | #ifdef CURL_DISABLE_VERBOSE_STRINGS |
| - | (void)data; |
| - | #endif |
| - | |
| ntlm->flags = 0; | |
| if((type2len < 32) || | |
| @@ -194,10 +194,6 @@ CURLcode Curl_auth_decode_ntlm_type2_message(struct Curl_easy *data, | |
| const struct bufref *type2, | |
| struct ntlmdata *ntlm) | |
| { | |
| - | #ifdef CURL_DISABLE_VERBOSE_STRINGS |
| - | (void)data; |
| - | #endif |
| - | |
| /* Ensure we have a valid type-2 message */ | |
| if(!Curl_bufref_len(type2)) { | |
| infof(data, "NTLM handshake failure (empty type-2 message)"); | |
| @@ -244,9 +240,6 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data, | |
| SECURITY_STATUS status; | |
| unsigned long attrs; | |
| - | #ifdef CURL_DISABLE_VERBOSE_STRINGS |
| - | (void)data; |
| - | #endif |
| (void)passwdp; | |
| (void)userp; | |
| @@ -95,10 +95,6 @@ CURLcode Curl_auth_decode_spnego_message(struct Curl_easy *data, | |
| SecBufferDesc resp_desc; | |
| unsigned long attrs; | |
| - | #ifdef CURL_DISABLE_VERBOSE_STRINGS |
| - | (void)data; |
| - | #endif |
| - | |
| if(nego->context && nego->status == SEC_E_OK) { | |
| /* We finished successfully our part of authentication, but server | |
| * rejected it (since we are again here). Exit with an error since we | |
| @@ -614,7 +614,6 @@ static int cb_recv_stream_data(ngtcp2_conn *tconn, uint32_t flags, | |
| int fin = (flags & NGTCP2_STREAM_DATA_FLAG_FIN) ? 1 : 0; | |
| struct Curl_easy *data = stream_user_data; | |
| (void)offset; | |
| - | (void)data; |
| nconsumed = | |
| nghttp3_conn_read_stream(ctx->h3conn, stream_id, buf, buflen, fin); | |
| @@ -705,7 +704,6 @@ static int cb_stream_reset(ngtcp2_conn *tconn, int64_t stream_id, | |
| (void)tconn; | |
| (void)final_size; | |
| (void)app_error_code; | |
| - | (void)data; |
| rv = nghttp3_conn_shutdown_stream_read(ctx->h3conn, stream_id); | |
| CURL_TRC_CF(data, cf, "[%" PRId64 "] reset -> %d", stream_id, rv); | |
| @@ -1263,7 +1261,6 @@ static int cb_h3_reset_stream(nghttp3_conn *conn, int64_t stream_id, | |
| struct Curl_easy *data = stream_user_data; | |
| int rv; | |
| (void)conn; | |
| - | (void)data; |
| rv = ngtcp2_conn_shutdown_stream_write(ctx->qconn, 0, stream_id, | |
| app_error_code); | |
| @@ -2907,7 +2904,6 @@ CURLcode Curl_cf_ngtcp2_create(struct Curl_cfilter **pcf, | |
| struct Curl_cfilter *cf = NULL; | |
| CURLcode result; | |
| - | (void)data; |
| ctx = curlx_calloc(1, sizeof(*ctx)); | |
| if(!ctx) { | |
| result = CURLE_OUT_OF_MEMORY; | |
| @@ -2399,7 +2399,6 @@ CURLcode Curl_cf_osslq_create(struct Curl_cfilter **pcf, | |
| struct Curl_cfilter *cf = NULL; | |
| CURLcode result; | |
| - | (void)data; |
| ctx = curlx_calloc(1, sizeof(*ctx)); | |
| if(!ctx) { | |
| result = CURLE_OUT_OF_MEMORY; | |
| @@ -1629,8 +1629,6 @@ CURLcode Curl_cf_quiche_create(struct Curl_cfilter **pcf, | |
| struct Curl_cfilter *cf = NULL; | |
| CURLcode result; | |
| - | (void)data; |
| - | (void)conn; |
| ctx = curlx_calloc(1, sizeof(*ctx)); | |
| if(!ctx) { | |
| result = CURLE_OUT_OF_MEMORY; | |
| @@ -854,8 +854,8 @@ CURLcode Curl_conn_may_http3(struct Curl_easy *data, | |
| const struct connectdata *conn, | |
| unsigned char transport) | |
| { | |
| - | (void)conn; |
| (void)data; | |
| + | (void)conn; |
| (void)transport; | |
| DEBUGF(infof(data, "QUIC is not supported in this build")); | |
| return CURLE_NOT_BUILT_IN; | |
| @@ -2069,7 +2069,6 @@ static CURLcode gtls_send(struct Curl_cfilter *cf, | |
| ssize_t nwritten; | |
| size_t remain = blen; | |
| - | (void)data; |
| DEBUGASSERT(backend); | |
| *pnwritten = 0; | |
| @@ -2186,7 +2185,6 @@ static void gtls_close(struct Curl_cfilter *cf, | |
| struct gtls_ssl_backend_data *backend = | |
| (struct gtls_ssl_backend_data *)connssl->backend; | |
| - | (void)data; |
| DEBUGASSERT(backend); | |
| CURL_TRC_CF(data, cf, "close"); | |
| if(backend->gtls.session) { | |
| @@ -2215,7 +2213,6 @@ static CURLcode gtls_recv(struct Curl_cfilter *cf, | |
| CURLcode result = CURLE_OK; | |
| ssize_t nread; | |
| - | (void)data; |
| DEBUGASSERT(backend); | |
| nread = gnutls_record_recv(backend->gtls.session, buf, blen); | |
| @@ -1133,7 +1133,6 @@ static CURLcode mbed_send(struct Curl_cfilter *cf, struct Curl_easy *data, | |
| CURLcode result = CURLE_OK; | |
| int nwritten; | |
| - | (void)data; |
| DEBUGASSERT(backend); | |
| *pnwritten = 0; | |
| connssl->io_need = CURL_SSL_IO_NEED_NONE; | |
| @@ -1305,7 +1304,6 @@ static CURLcode mbed_recv(struct Curl_cfilter *cf, struct Curl_easy *data, | |
| CURLcode result = CURLE_OK; | |
| int nread; | |
| - | (void)data; |
| DEBUGASSERT(backend); | |
| *pnread = 0; | |
| connssl->io_need = CURL_SSL_IO_NEED_NONE; | |
| @@ -5036,7 +5036,6 @@ static CURLcode ossl_send(struct Curl_cfilter *cf, | |
| CURLcode result = CURLE_OK; | |
| int nwritten; | |
| - | (void)data; |
| DEBUGASSERT(octx); | |
| *pnwritten = 0; | |
| ERR_clear_error(); | |
| @@ -5129,7 +5128,6 @@ static CURLcode ossl_recv(struct Curl_cfilter *cf, | |
| CURLcode result = CURLE_OK; | |
| int nread; | |
| - | (void)data; |
| DEBUGASSERT(octx); | |
| *pnread = 0; | |
| @@ -752,9 +752,6 @@ CURLcode Curl_pin_peer_pubkey(struct Curl_easy *data, | |
| const unsigned char *pubkey, size_t pubkeylen) | |
| { | |
| CURLcode result = CURLE_SSL_PINNEDPUBKEYNOTMATCH; | |
| - | #ifdef CURL_DISABLE_VERBOSE_STRINGS |
| - | (void)data; |
| - | #endif |
| /* if a path was not specified, do not pin */ | |
| if(!pinnedpubkey) | |
| @@ -486,7 +486,6 @@ static CURLcode ws_dec_pass_payload(struct ws_decoder *dec, | |
| size_t remain = curlx_sotouz_range(dec->payload_len - dec->payload_offset, | |
| 0, SIZE_MAX); | |
| - | (void)data; |
| while(remain && Curl_bufq_peek(inraw, &inbuf, &inlen)) { | |
| if(inlen > remain) | |
| inlen = remain; | |