]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tidy-up: drop stray "unused" comments
authorViktor Szakats <commit@vsz.me>
Tue, 2 Sep 2025 11:20:20 +0000 (13:20 +0200)
committerViktor Szakats <commit@vsz.me>
Wed, 3 Sep 2025 14:31:16 +0000 (16:31 +0200)
Closes #18453

55 files changed:
CMake/CurlTests.c
docs/examples/cacertinmem.c
docs/examples/chkspeed.c
docs/examples/debug.c
docs/examples/http2-download.c
docs/examples/http2-pushinmemory.c
docs/examples/http2-serverpush.c
docs/examples/http2-upload.c
docs/examples/multi-debugcallback.c
docs/examples/threaded-ssl.c
docs/examples/usercertinmem.c
docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.md
lib/cf-socket.c
lib/curl_rtmp.c
lib/file.c
lib/hostip.c
lib/http.c
lib/imap.c
lib/krb5.c
lib/mime.c
lib/multi.c
lib/pop3.c
lib/smtp.c
lib/telnet.c
lib/tftp.c
lib/version.c
lib/vssh/libssh.c
lib/vssh/libssh2.c
lib/vtls/openssl.c
lib/vtls/schannel.c
src/tool_cb_dbg.c
src/tool_cb_rea.c
tests/libtest/cli_h2_serverpush.c
tests/libtest/lib1512.c
tests/libtest/lib1533.c
tests/libtest/lib1537.c
tests/libtest/lib1550.c
tests/libtest/lib1560.c
tests/libtest/lib1971.c
tests/libtest/lib1975.c
tests/libtest/lib501.c
tests/libtest/lib517.c
tests/libtest/lib530.c
tests/libtest/lib547.c
tests/libtest/lib555.c
tests/libtest/lib557.c
tests/libtest/lib558.c
tests/libtest/lib578.c
tests/libtest/lib579.c
tests/libtest/lib582.c
tests/libtest/lib668.c
tests/libtest/lib758.c
tests/libtest/mk-lib1521.pl
tests/libtest/testtrace.c
tests/unit/unit1603.c

index 410a0f70ce90408652b7bd99da6c5df4da7722a8..40fa50fe83dc50bc3314c092a7a5d1397cb51305 100644 (file)
@@ -87,7 +87,7 @@ int main(void)
 #elif defined(HAVE_GETHOSTBYNAME_R_5) || \
       defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT)
   rc = gethostbyname_r(address, &h, buffer, 8192, &h_errnop);
-  (void)hp; /* not used for test */
+  (void)hp;
   (void)h_errnop;
 #elif defined(HAVE_GETHOSTBYNAME_R_6) || \
       defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT)
index 9b39667aff2c2c0dd4163f5755009a7d3cc4fc92..ec12df58bf18074cc4a4a5ae446b6067a8e5b444 100644 (file)
@@ -72,8 +72,8 @@ static CURLcode sslctx_function(CURL *curl, void *sslctx, void *pointer)
   int i;
   STACK_OF(X509_INFO) *inf;
 
-  (void)curl; /* avoid warnings */
-  (void)pointer; /* avoid warnings */
+  (void)curl;
+  (void)pointer;
 
   if(!cts || !cbio) {
     return rv;
index fc40814696a6d7bac176992837268189d9d4bd84..264c514ba4c777f4ba56b22e73716eae56201039 100644 (file)
@@ -56,8 +56,8 @@ static size_t WriteCallback(void *ptr, size_t size, size_t nmemb, void *data)
 {
   /* we are not interested in the downloaded bytes itself,
      so we only return the size we would have saved ... */
-  (void)ptr;  /* unused */
-  (void)data; /* unused */
+  (void)ptr;
+  (void)data;
   return (size_t)(size * nmemb);
 }
 
index 2bd8b971ac73c7fda12984fc3a398386ac83eece..5303c833f5ea66dcd67244f4e91b12b2dc7f622a 100644 (file)
@@ -90,7 +90,7 @@ int my_trace(CURL *handle, curl_infotype type,
 {
   struct data *config = (struct data *)userp;
   const char *text;
-  (void)handle; /* prevent compiler warning */
+  (void)handle;
 
   switch(type) {
   case CURLINFO_TEXT:
index ac9b9a082e07c8922b9f7bc7d8f4c0417e4f6ae7..954cdcbc6d94a71d67560acd1be469117bdda36a 100644 (file)
@@ -110,7 +110,7 @@ int my_trace(CURL *handle, curl_infotype type,
   const char *text;
   struct transfer *t = (struct transfer *)userp;
   unsigned int num = t->num;
-  (void)handle; /* prevent compiler warning */
+  (void)handle;
 
   switch(type) {
   case CURLINFO_TEXT:
index 53c368e0127b199652f5de0e310afbad99f2d28d..873883ca504d38f624abb87a4561ccdab5e9f9ac 100644 (file)
@@ -97,8 +97,8 @@ static int server_push_callback(CURL *parent,
 {
   char *headp;
   int *transfers = (int *)userp;
-  (void)parent; /* we have no use for this */
-  (void)num_headers; /* unused */
+  (void)parent;
+  (void)num_headers;
 
   if(pushindex == MAX_FILES)
     /* cannot fit anymore */
index e259e149790da83e940da54deedd1df67a6abcc7..df4e49ea588719f3f8845bd2df9b74d684445251 100644 (file)
@@ -92,7 +92,7 @@ int my_trace(CURL *handle, curl_infotype type,
              void *userp)
 {
   const char *text;
-  (void)handle; /* prevent compiler warning */
+  (void)handle;
   (void)userp;
   switch(type) {
   case CURLINFO_TEXT:
@@ -171,7 +171,7 @@ static int server_push_callback(CURL *parent,
   FILE *out;
   static unsigned int count = 0;
 
-  (void)parent; /* we have no use for this */
+  (void)parent;
 
   curl_msnprintf(filename, 128, "push%u", count++);
 
index c033b0b685a93c6aa2d9b7eb0a3220574549011c..482889ea185740788b35039f49855c644a3f8ab7 100644 (file)
@@ -150,7 +150,7 @@ int my_trace(CURL *handle, curl_infotype type,
   struct timeval tv;
   time_t secs;
   struct tm *now;
-  (void)handle; /* prevent compiler warning */
+  (void)handle;
 
   gettimeofday(&tv, NULL);
   if(!known_offset) {
index 79123ca224367b5a4b8885d7d50ea6471ec0f6d8..738732279dbd33930b8915626f3f71bb90454fb2 100644 (file)
@@ -91,7 +91,7 @@ int my_trace(CURL *handle, curl_infotype type,
   const char *text;
 
   (void)userp;
-  (void)handle; /* prevent compiler warning */
+  (void)handle;
 
   switch(type) {
   case CURLINFO_TEXT:
index 96681290553bbe89a1bdc8d23576039e03bfcd9e..161182eec1e19bb0aa706b976c96ff13f1ef193d 100644 (file)
@@ -72,7 +72,7 @@ int main(int argc, char **argv)
 {
   pthread_t tid[NUMT];
   int i;
-  (void)argc; /* we do not use any arguments in this example */
+  (void)argc;
   (void)argv;
 
   /* Must initialize libcurl before any threads are started */
index 536b65b4907231c1cebbfc585d91f2c63fb7c4b3..670ae4dc718e13faade6f4d3b5377905eb16169b 100644 (file)
@@ -93,8 +93,8 @@ static CURLcode sslctx_function(CURL *curl, void *sslctx, void *pointer)
     "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"
     "-----END RSA PRIVATE KEY-----\n";
 
-  (void)curl; /* avoid warnings */
-  (void)pointer; /* avoid warnings */
+  (void)curl;
+  (void)pointer;
 
   /* get a BIO */
   bio = BIO_new_mem_buf((char *)mypem, -1);
index 9e7aa8ad73928217bb5172c3ed7c1f8905c0ef1f..4ecfb5327b0f6a9dcb949add95bac1ff1c8c0538 100644 (file)
@@ -149,7 +149,7 @@ int my_trace(CURL *handle, curl_infotype type,
              void *clientp)
 {
   const char *text;
-  (void)handle; /* prevent compiler warning */
+  (void)handle;
   (void)clientp;
 
   switch(type) {
index 426caf82d5036445f5e1c27a3ddd88e01420005a..7cf1ed2a5ce90b71a32b831c61549a861ada18cd 100644 (file)
@@ -1444,7 +1444,7 @@ static CURLcode cf_socket_send(struct Curl_cfilter *cf, struct Curl_easy *data,
   size_t orig_len = len;
   CURLcode result = CURLE_OK;
 
-  (void)eos; /* unused */
+  (void)eos;
   *pnwritten = 0;
   fdsave = cf->conn->sock[cf->sockindex];
   cf->conn->sock[cf->sockindex] = ctx->sock;
index b178dff84503e28012bfea846530841554893e9e..baee79fbeecfc612d7b30284566ccd093de65564 100644 (file)
@@ -307,9 +307,9 @@ static CURLcode rtmp_do(struct Curl_easy *data, bool *done)
 static CURLcode rtmp_done(struct Curl_easy *data, CURLcode status,
                           bool premature)
 {
-  (void)data; /* unused */
-  (void)status; /* unused */
-  (void)premature; /* unused */
+  (void)data;
+  (void)status;
+  (void)premature;
 
   return CURLE_OK;
 }
@@ -334,7 +334,7 @@ static CURLcode rtmp_recv(struct Curl_easy *data, int sockindex, char *buf,
   CURLcode result = CURLE_OK;
   ssize_t nread;
 
-  (void)sockindex; /* unused */
+  (void)sockindex;
   *pnread = 0;
   if(!r)
     return CURLE_FAILED_INIT;
@@ -362,8 +362,8 @@ static CURLcode rtmp_send(struct Curl_easy *data, int sockindex,
   RTMP *r = Curl_conn_meta_get(conn, CURL_META_RTMP_CONN);
   ssize_t nwritten;
 
-  (void)sockindex; /* unused */
-  (void)eos; /* unused */
+  (void)sockindex;
+  (void)eos;
   *pnwritten = 0;
   if(!r)
     return CURLE_FAILED_INIT;
index 0b44d2257d7cf5f6099eecf1eebc4b1af505f427..749759653d5a6a63def81178b3fc558d07081eeb 100644 (file)
@@ -292,8 +292,8 @@ static CURLcode file_done(struct Curl_easy *data,
                           CURLcode status, bool premature)
 {
   struct FILEPROTO *file = Curl_meta_get(data, CURL_META_FILE_EASY);
-  (void)status; /* not used */
-  (void)premature; /* not used */
+  (void)status;
+  (void)premature;
 
   if(file)
     file_cleanup(file);
@@ -305,7 +305,7 @@ static CURLcode file_disconnect(struct Curl_easy *data,
                                 struct connectdata *conn,
                                 bool dead_connection)
 {
-  (void)dead_connection; /* not used */
+  (void)dead_connection;
   (void)conn;
   return file_done(data, CURLE_OK, FALSE);
 }
index dfff9d61da86cd35166c87bbd565147dd6ab53af..2d122fb9996b5472712f2ea4f7eb909f5667ead1 100644 (file)
@@ -1136,14 +1136,14 @@ CURLcode Curl_resolv_timeout(struct Curl_easy *data,
   Curl_resolve_test_delay();
 #endif
 
-#else /* USE_ALARM_TIMEOUT */
+#else /* !USE_ALARM_TIMEOUT */
 #ifndef CURLRES_ASYNCH
   if(timeoutms)
     infof(data, "timeout on name lookup is not supported");
 #else
-  (void)timeoutms; /* timeoutms not used with an async resolver */
+  (void)timeoutms;
 #endif
-#endif /* else USE_ALARM_TIMEOUT */
+#endif /* USE_ALARM_TIMEOUT */
 
   /* Perform the actual name resolution. This might be interrupted by an
    * alarm if it takes too long.
index d62f3aff4a8f7c91c5071e7e9ff6110c5fa248b3..67f88736e03e730170a23e5c19ffd85cce3d930c 100644 (file)
@@ -2993,7 +2993,7 @@ checkrtspprefix(struct Curl_easy *data,
 {
   statusline result = STATUS_BAD;
   statusline onmatch = len >= 5 ? STATUS_DONE : STATUS_UNKNOWN;
-  (void)data; /* unused */
+  (void)data;
   if(checkprefixmax("RTSP/", s, len))
     result = onmatch;
 
index 7e6b132ba0dd2cf6ea4f8545d0ec44958973676c..41aec8ffab7337abb5c4470bcd48ccf9228e2f57 100644 (file)
@@ -1005,7 +1005,7 @@ static CURLcode imap_state_servergreet_resp(struct Curl_easy *data,
                                             int imapcode,
                                             imapstate instate)
 {
-  (void)instate; /* no use for this yet */
+  (void)instate;
 
   if(imapcode == IMAP_RESP_PREAUTH) {
     /* PREAUTH */
@@ -1030,7 +1030,7 @@ static CURLcode imap_state_capability_resp(struct Curl_easy *data,
   struct connectdata *conn = data->conn;
   const char *line = curlx_dyn_ptr(&imapc->pp.recvbuf);
 
-  (void)instate; /* no use for this yet */
+  (void)instate;
 
   /* Do we have an untagged response? */
   if(imapcode == '*') {
@@ -1111,7 +1111,7 @@ static CURLcode imap_state_starttls_resp(struct Curl_easy *data,
 {
   CURLcode result = CURLE_OK;
 
-  (void)instate; /* no use for this yet */
+  (void)instate;
 
   /* Pipelining in response is forbidden. */
   if(imapc->pp.overflow)
@@ -1140,7 +1140,7 @@ static CURLcode imap_state_auth_resp(struct Curl_easy *data,
   CURLcode result = CURLE_OK;
   saslprogress progress;
 
-  (void)instate; /* no use for this yet */
+  (void)instate;
 
   result = Curl_sasl_continue(&imapc->sasl, data, imapcode, &progress);
   if(!result)
@@ -1171,7 +1171,7 @@ static CURLcode imap_state_login_resp(struct Curl_easy *data,
                                       imapstate instate)
 {
   CURLcode result = CURLE_OK;
-  (void)instate; /* no use for this yet */
+  (void)instate;
 
   if(imapcode != IMAP_RESP_OK) {
     failf(data, "Access denied. %c", imapcode);
@@ -1194,7 +1194,7 @@ static CURLcode imap_state_listsearch_resp(struct Curl_easy *data,
   char *line = curlx_dyn_ptr(&imapc->pp.recvbuf);
   size_t len = imapc->pp.nfinal;
 
-  (void)instate; /* No use for this yet */
+  (void)instate;
 
   if(imapcode == '*')
     result = Curl_client_write(data, CLIENTWRITE_BODY, line, len);
@@ -1217,7 +1217,7 @@ static CURLcode imap_state_select_resp(struct Curl_easy *data,
   CURLcode result = CURLE_OK;
   const char *line = curlx_dyn_ptr(&imapc->pp.recvbuf);
 
-  (void)instate; /* no use for this yet */
+  (void)instate;
 
   if(imapcode == '*') {
     /* See if this is an UIDVALIDITY response */
@@ -1279,7 +1279,7 @@ static CURLcode imap_state_fetch_resp(struct Curl_easy *data,
   bool parsed = FALSE;
   curl_off_t size = 0;
 
-  (void)instate; /* no use for this yet */
+  (void)instate;
 
   if(imapcode != '*') {
     Curl_pgrsSetDownloadSize(data, -1);
@@ -1370,7 +1370,7 @@ static CURLcode imap_state_fetch_final_resp(struct Curl_easy *data,
 {
   CURLcode result = CURLE_OK;
 
-  (void)instate; /* No use for this yet */
+  (void)instate;
 
   if(imapcode != IMAP_RESP_OK)
     result = CURLE_WEIRD_SERVER_REPLY;
@@ -1388,7 +1388,7 @@ static CURLcode imap_state_append_resp(struct Curl_easy *data,
                                        imapstate instate)
 {
   CURLcode result = CURLE_OK;
-  (void)instate; /* No use for this yet */
+  (void)instate;
 
   if(imapcode != '+') {
     result = CURLE_UPLOAD_FAILED;
@@ -1415,7 +1415,7 @@ static CURLcode imap_state_append_final_resp(struct Curl_easy *data,
 {
   CURLcode result = CURLE_OK;
 
-  (void)instate; /* No use for this yet */
+  (void)instate;
 
   if(imapcode != IMAP_RESP_OK)
     result = CURLE_UPLOAD_FAILED;
index 40243bddb5af905c1257efa744458502f8b15755..78c2a4ff5314f4568f0df94bb51f89fee241eac0 100644 (file)
@@ -130,7 +130,7 @@ krb5_init(void *app_data)
 static int
 krb5_check_prot(void *app_data, int level)
 {
-  (void)app_data; /* unused */
+  (void)app_data;
   if(level == PROT_CONFIDENTIAL)
     return -1;
   return 0;
@@ -470,7 +470,7 @@ static int ftp_send_command(struct Curl_easy *data, const char *message, ...)
       ftp_code = -1;
   }
 
-  (void)nread; /* Unused */
+  (void)nread;
   return ftp_code;
 }
 
@@ -703,7 +703,7 @@ static CURLcode sec_send(struct Curl_easy *data, int sockindex,
                          const void *buffer, size_t len, bool eos,
                          size_t *pnwritten)
 {
-  (void)eos; /* unused */
+  (void)eos;
   return sec_write(data, sockindex, buffer, len, pnwritten);
 }
 
index f480bc7042124ff5ca8ef0a3a4d1558bff1f0293..adce922950ab303dcb2f29124b50343ec8827f16 100644 (file)
@@ -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. */
index 99746a4ce11bf30b565a7f2e7fa4b625cda29633..918928d03cc59ff6a9aa00fc3311816b536e9ca4 100644 (file)
@@ -1166,7 +1166,7 @@ CURLMcode curl_multi_fdset(CURLM *m,
   struct Curl_multi *multi = m;
   struct easy_pollset ps;
   unsigned int i, mid;
-  (void)exc_fd_set; /* not used */
+  (void)exc_fd_set;
 
   if(!GOOD_MULTI_HANDLE(multi))
     return CURLM_BAD_HANDLE;
@@ -1865,7 +1865,7 @@ static void multi_posttransfer(struct Curl_easy *data)
   if(!data->set.no_signal)
     signal(SIGPIPE, data->state.prev_signal);
 #else
-  (void)data; /* unused parameter */
+  (void)data;
 #endif
 }
 
index 508f8faed3d385d5b4770c7d9c53f982cb3d4a6b..f5ecfd178ba626efa0620adee1b188214bd4fda7 100644 (file)
@@ -811,7 +811,7 @@ static CURLcode pop3_state_servergreet_resp(struct Curl_easy *data,
   const char *line;
   size_t len;
 
-  (void)instate; /* no use for this yet */
+  (void)instate;
   if(!pop3c)
     return CURLE_FAILED_INIT;
 
@@ -866,7 +866,7 @@ static CURLcode pop3_state_capa_resp(struct Curl_easy *data, int pop3code,
   const char *line;
   size_t len;
 
-  (void)instate; /* no use for this yet */
+  (void)instate;
   if(!pop3c)
     return CURLE_FAILED_INIT;
 
@@ -954,7 +954,7 @@ static CURLcode pop3_state_starttls_resp(struct Curl_easy *data,
 {
   struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN);
   CURLcode result = CURLE_OK;
-  (void)instate; /* no use for this yet */
+  (void)instate;
 
   if(!pop3c)
     return CURLE_FAILED_INIT;
@@ -987,7 +987,7 @@ static CURLcode pop3_state_auth_resp(struct Curl_easy *data,
   struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN);
   saslprogress progress;
 
-  (void)instate; /* no use for this yet */
+  (void)instate;
   if(!pop3c)
     return CURLE_FAILED_INIT;
 
@@ -1025,7 +1025,7 @@ static CURLcode pop3_state_apop_resp(struct Curl_easy *data, int pop3code,
                                      pop3state instate)
 {
   CURLcode result = CURLE_OK;
-  (void)instate; /* no use for this yet */
+  (void)instate;
 
   if(pop3code != '+') {
     failf(data, "Authentication failed: %d", pop3code);
@@ -1046,7 +1046,7 @@ static CURLcode pop3_state_user_resp(struct Curl_easy *data, int pop3code,
   CURLcode result = CURLE_OK;
   struct connectdata *conn = data->conn;
   struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN);
-  (void)instate; /* no use for this yet */
+  (void)instate;
 
   if(!pop3c)
     return CURLE_FAILED_INIT;
@@ -1070,7 +1070,7 @@ static CURLcode pop3_state_pass_resp(struct Curl_easy *data, int pop3code,
                                      pop3state instate)
 {
   CURLcode result = CURLE_OK;
-  (void)instate; /* no use for this yet */
+  (void)instate;
 
   if(pop3code != '+') {
     failf(data, "Access denied. %c", pop3code);
@@ -1094,7 +1094,7 @@ static CURLcode pop3_state_command_resp(struct Curl_easy *data,
   struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN);
   struct pingpong *pp;
 
-  (void)instate; /* no use for this yet */
+  (void)instate;
   if(!pop3 || !pop3c)
     return CURLE_FAILED_INIT;
 
index c52cf0dc56bebaf082dc1fc8b6cd756178a5f89c..5dba1f9ea8c2d2ca648594e43cec76499f618138 100644 (file)
@@ -924,7 +924,7 @@ static CURLcode smtp_state_servergreet_resp(struct Curl_easy *data,
                                             smtpstate instate)
 {
   CURLcode result = CURLE_OK;
-  (void)instate; /* no use for this yet */
+  (void)instate;
 
   if(smtpcode/100 != 2) {
     failf(data, "Got unexpected smtp-server response: %d", smtpcode);
@@ -943,7 +943,7 @@ static CURLcode smtp_state_starttls_resp(struct Curl_easy *data,
                                          smtpstate instate)
 {
   CURLcode result = CURLE_OK;
-  (void)instate; /* no use for this yet */
+  (void)instate;
 
   /* Pipelining in response is forbidden. */
   if(smtpc->pp.overflow)
@@ -973,7 +973,7 @@ static CURLcode smtp_state_ehlo_resp(struct Curl_easy *data,
   const char *line = curlx_dyn_ptr(&smtpc->pp.recvbuf);
   size_t len = smtpc->pp.nfinal;
 
-  (void)instate; /* no use for this yet */
+  (void)instate;
 
   if(smtpcode/100 != 2 && smtpcode != 1) {
     if(data->set.use_ssl <= CURLUSESSL_TRY
@@ -1074,7 +1074,7 @@ static CURLcode smtp_state_helo_resp(struct Curl_easy *data,
                                      smtpstate instate)
 {
   CURLcode result = CURLE_OK;
-  (void)instate; /* no use for this yet */
+  (void)instate;
 
   if(smtpcode/100 != 2) {
     failf(data, "Remote access denied: %d", smtpcode);
@@ -1096,7 +1096,7 @@ static CURLcode smtp_state_auth_resp(struct Curl_easy *data,
   CURLcode result = CURLE_OK;
   saslprogress progress;
 
-  (void)instate; /* no use for this yet */
+  (void)instate;
 
   result = Curl_sasl_continue(&smtpc->sasl, data, smtpcode, &progress);
   if(!result)
@@ -1126,7 +1126,7 @@ static CURLcode smtp_state_command_resp(struct Curl_easy *data,
   char *line = curlx_dyn_ptr(&smtpc->pp.recvbuf);
   size_t len = smtpc->pp.nfinal;
 
-  (void)instate; /* no use for this yet */
+  (void)instate;
 
   if((smtp->rcpt && smtpcode/100 != 2 && smtpcode != 553 && smtpcode != 1) ||
      (!smtp->rcpt && smtpcode/100 != 2 && smtpcode != 1)) {
@@ -1166,7 +1166,7 @@ static CURLcode smtp_state_mail_resp(struct Curl_easy *data,
                                      smtpstate instate)
 {
   CURLcode result = CURLE_OK;
-  (void)instate; /* no use for this yet */
+  (void)instate;
 
   if(smtpcode/100 != 2) {
     failf(data, "MAIL failed: %d", smtpcode);
@@ -1190,7 +1190,7 @@ static CURLcode smtp_state_rcpt_resp(struct Curl_easy *data,
   bool is_smtp_err = FALSE;
   bool is_smtp_blocking_err = FALSE;
 
-  (void)instate; /* no use for this yet */
+  (void)instate;
 
   is_smtp_err = (smtpcode/100 != 2);
 
@@ -1246,7 +1246,7 @@ static CURLcode smtp_state_data_resp(struct Curl_easy *data,
                                      smtpstate instate)
 {
   CURLcode result = CURLE_OK;
-  (void)instate; /* no use for this yet */
+  (void)instate;
 
   if(smtpcode != 354) {
     failf(data, "DATA failed: %d", smtpcode);
@@ -1275,7 +1275,7 @@ static CURLcode smtp_state_postdata_resp(struct Curl_easy *data,
 {
   CURLcode result = CURLE_OK;
 
-  (void)instate; /* no use for this yet */
+  (void)instate;
 
   if(smtpcode != 250)
     result = CURLE_WEIRD_SERVER_REPLY;
index 731789e4636e8ca78c912e16070220d3510e5274..cc827c1b3e8a1684e611cd26ec22fc4c98455818 100644 (file)
@@ -1287,8 +1287,8 @@ static CURLcode send_telnet_data(struct Curl_easy *data,
 static CURLcode telnet_done(struct Curl_easy *data,
                             CURLcode status, bool premature)
 {
-  (void)status; /* unused */
-  (void)premature; /* not used */
+  (void)status;
+  (void)premature;
   Curl_meta_remove(data, CURL_META_TELNET_EASY);
   return CURLE_OK;
 }
index 6a9f964a079f96a48876dcf5dee30d3b264bbabc..4c2fadc2caf8d6d45c9a8718085cb448c81c4b3a 100644 (file)
@@ -1061,8 +1061,8 @@ static CURLcode tftp_done(struct Curl_easy *data, CURLcode status,
   struct connectdata *conn = data->conn;
   struct tftp_conn *state = Curl_conn_meta_get(conn, CURL_META_TFTP_CONN);
 
-  (void)status; /* unused */
-  (void)premature; /* not used */
+  (void)status;
+  (void)premature;
 
   if(Curl_pgrsDone(data))
     return CURLE_ABORTED_BY_CALLBACK;
index aeb133ec73d2457c9738535af1d3c5601844dc00..a2d486720091579df1af68571ec4d04cb84f77e7 100644 (file)
@@ -624,7 +624,7 @@ curl_version_info_data *curl_version_info(CURLversion stamp)
   static char zstd_buffer[80];
 #endif
 
-  (void)stamp; /* avoid compiler warnings, we do not use this */
+  (void)stamp;
 
 #ifdef USE_SSL
   Curl_ssl_version(ssl_buffer, sizeof(ssl_buffer));
index 2898a70f0aabfd1eba26d1ff12ac059273ac9803..695532ff8514ade098893dd25fff1f06bbb402ab 100644 (file)
@@ -2840,7 +2840,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;
 
   if(!sshc)
     return CURLE_FAILED_INIT;
index 13f374564f70accd0b8cf71d7f131a51b3115bce..5dfc377ec14eb271d655a69e131986a69dd366f4 100644 (file)
@@ -276,19 +276,19 @@ static CURLcode libssh2_session_error_to_CURLE(int err)
 
 static LIBSSH2_ALLOC_FUNC(my_libssh2_malloc)
 {
-  (void)abstract; /* arg not used */
+  (void)abstract;
   return Curl_cmalloc(count);
 }
 
 static LIBSSH2_REALLOC_FUNC(my_libssh2_realloc)
 {
-  (void)abstract; /* arg not used */
+  (void)abstract;
   return Curl_crealloc(ptr, count);
 }
 
 static LIBSSH2_FREE_FUNC(my_libssh2_free)
 {
-  (void)abstract; /* arg not used */
+  (void)abstract;
   if(ptr) /* ssh2 agent sometimes call free with null ptr */
     Curl_cfree(ptr);
 }
@@ -3732,7 +3732,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;
 
   if(sshc && !status)
     myssh_state(data, sshc, SSH_SCP_DONE);
index 5971d9a3581a034a2c1e758ef622f06d9e229e89..a49203ab07d27fcb8ebc63419df30da832160d39 100644 (file)
@@ -5517,9 +5517,9 @@ static CURLcode ossl_get_channel_binding(struct Curl_easy *data, int sockindex,
   return CURLE_OK;
 #else
   /* No X509_get_signature_nid support */
-  (void)data; /* unused */
-  (void)sockindex; /* unused */
-  (void)binding; /* unused */
+  (void)data;
+  (void)sockindex;
+  (void)binding;
   return CURLE_OK;
 #endif
 }
index ea06d31ab0f99d0c789d111f7e29ef7af8cc51b4..6bd4805cea1c56ed66464e3de669c329737965ab 100644 (file)
@@ -1459,7 +1459,7 @@ static bool
 cert_counter_callback(const CERT_CONTEXT *ccert_context, bool reverse_order,
                       void *certs_count)
 {
-  (void)reverse_order; /* unused */
+  (void)reverse_order;
   if(valid_cert_encoding(ccert_context))
     (*(int *)certs_count)++;
   return TRUE;
index 0b36236ab7d0cb09fdbd3754b5f1d630f2d22bf2..6a587cc1cc63d3cd553ba8296acd8370923008a5 100644 (file)
@@ -91,7 +91,7 @@ int tool_debug_cb(CURL *handle, curl_infotype type,
   char idsbuf[60];
   curl_off_t xfer_id, conn_id;
 
-  (void)handle; /* not used */
+  (void)handle;
   (void)userdata;
 
   if(global->tracetime) {
index 5b8ba62a56bb1a12ff128773401ce6e4c59c1872..0a3e9ef0ee2ce05d78b32d699ad723af437121c8 100644 (file)
@@ -146,10 +146,10 @@ int tool_readbusy_cb(void *clientp,
   struct OperationConfig *config = per->config;
   static curl_off_t ulprev;
 
-  (void)dltotal;  /* unused */
-  (void)dlnow;  /* unused */
-  (void)ultotal;  /* unused */
-  (void)ulnow;  /* unused */
+  (void)dltotal;
+  (void)dlnow;
+  (void)ultotal;
+  (void)ulnow;
 
   if(config->readbusy) {
     if(ulprev == ulnow) {
index a58f38dd0a68e1068084a968c2d8273606d1782d..7b465bc61ad0ecd87cbc2df8927c62d7f17d0c6c 100644 (file)
@@ -68,7 +68,7 @@ static int server_push_callback(CURL *parent,
   static unsigned int count = 0;
   int rv;
 
-  (void)parent; /* we have no use for this */
+  (void)parent;
   curl_msnprintf(filename, sizeof(filename) - 1, "push%u", count++);
 
   /* here's a new stream, save it in a new file for each new push */
index 6e6287dbfc32f98b35950e0263a105c912d9b8f6..dd80163d43d406cace0c90184164547cc0a99d1c 100644 (file)
@@ -42,7 +42,7 @@ static CURLcode test_lib1512(const char *URL)
   struct curl_slist *slist = NULL;
   size_t i;
   char target_url[256];
-  (void)URL; /* URL is setup in the code */
+  (void)URL;
 
   if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
     curl_mfprintf(stderr, "curl_global_init() failed\n");
index 15256deaf0601eff32e49a5489a1a2f652be4911..ff5c83cc820141d3497371927e3f10c2fef58b9c 100644 (file)
@@ -77,7 +77,6 @@ static size_t t1533_write_cb(char *ptr, size_t size, size_t nmemb, void *userp)
   struct cb_data *data = (struct cb_data *)userp;
   size_t totalsize = nmemb * size;
 
-  /* unused parameter */
   (void)ptr;
 
   /* all response headers have been received */
index 52272cb2ec972f49391a8b83afd72293565f7be7..cb35fb19087ce622a6e2f34e219f99c442507f7f 100644 (file)
@@ -35,7 +35,7 @@ static CURLcode test_lib1537(const char *URL)
   int outlen = 0;
   char *raw;
 
-  (void)URL; /* we don't use this */
+  (void)URL;
 
   if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
     curl_mfprintf(stderr, "curl_global_init() failed\n");
index 6fedbf68848cdcd5ae4e3880fb6d46b2f5fe16cf..11583aec47280f3654e835438457e2d749c3f5db 100644 (file)
@@ -38,7 +38,7 @@ static CURLcode test_lib1550(const char *URL)
 
   global_init(CURL_GLOBAL_ALL);
   handle = curl_multi_init();
-  (void)URL; /* unused */
+  (void)URL;
 
   curl_multi_setopt(handle, CURLMOPT_PIPELINING_SERVER_BL, bl_servers);
   curl_multi_setopt(handle, CURLMOPT_PIPELINING_SITE_BL, bl_sites);
index 99112389fec6fbaed2c8312d7b857ce784dba433..1973d8a916e9b474588d77843c391104345348fa 100644 (file)
@@ -2036,7 +2036,7 @@ static CURLcode test_lib1560(const char *URL)
 {
   bool has_utf8 = !!getenv("CURL_TEST_HAVE_CODESET_UTF8");
 
-  (void)URL; /* not used */
+  (void)URL;
 
   if(urldup())
     return (CURLcode)11;
index 03b254c1c579d001fd0c6f449eaffd8578162ac0..bc25226bded6a1af806d12f0e6fee8554cb6d7c0 100644 (file)
 
 static size_t t1971_read_cb(char *ptr, size_t size, size_t nitems, void *userp)
 {
-  (void)ptr; /* unused */
-  (void)size; /* unused */
-  (void)nitems; /* unused */
-  (void)userp; /* unused */
+  (void)ptr;
+  (void)size;
+  (void)nitems;
+  (void)userp;
   return 0;
 }
 
index 95db9ae58df6ddcfb707158e7d517f58ed511471..d6c05a1251f2f0e677b9615a157b63a41d29e4d2 100644 (file)
 
 static size_t t1975_read_cb(char *ptr, size_t size, size_t nitems, void *userp)
 {
-  (void)ptr; /* unused */
-  (void)size; /* unused */
-  (void)nitems; /* unused */
-  (void)userp; /* unused */
+  (void)ptr;
+  (void)size;
+  (void)nitems;
+  (void)userp;
   return 0;
 }
 
index d32e4397b8fd0aa39bf3b33ba515d20a18cecfde..d761c8a63604810d38b9816992e71a4d01369f01 100644 (file)
@@ -30,7 +30,7 @@ static CURLcode test_lib501(const char *URL)
   CURLcode res;
   CURL *curl;
 
-  (void)URL; /* we don't use this */
+  (void)URL;
 
   if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
     curl_mfprintf(stderr, "curl_global_init() failed\n");
index cf1a14d31c612f318d60e9bf877feff35a43de3a..85950dd866bc74423bad1afc88de2a86102ef5bb 100644 (file)
@@ -164,7 +164,7 @@ static CURLcode test_lib517(const char *URL)
   int i;
   int error = 0;
 
-  (void)URL; /* not used */
+  (void)URL;
 
   for(i = 0; dates[i].input; i++) {
     time_t out = curl_getdate(dates[i].input, NULL);
index e6fe6ceff0b6a97d5a8a660b4b64260df2f9e99e..7d8cc3cbcb2dc4120af19dc7fdeffef72d30f0c0 100644 (file)
@@ -136,8 +136,8 @@ static int t530_curlSocketCallback(CURL *easy, curl_socket_t s, int action,
 {
   struct t530_ReadWriteSockets *sockets = userp;
 
-  (void)easy; /* unused */
-  (void)socketp; /* unused */
+  (void)easy;
+  (void)socketp;
 
   t530_ctx.socket_calls++;
   t530_msg("-> CURLMOPT_SOCKETFUNCTION");
@@ -169,7 +169,7 @@ static int t530_curlTimerCallback(CURLM *multi, long timeout_ms, void *userp)
 {
   struct curltime *timeout = userp;
 
-  (void)multi; /* unused */
+  (void)multi;
   t530_ctx.timer_calls++;
   t530_msg("-> CURLMOPT_TIMERFUNCTION");
   if(t530_ctx.timer_calls == t530_ctx.max_timer_calls) {
index e3597d6d3e967d2b28a3b6a8639010c1b2873b0b..6114d57aab272250e6b274ba2dc1038f5ca3c17d 100644 (file)
@@ -56,7 +56,7 @@ static size_t t547_read_cb(char *ptr, size_t size, size_t nmemb, void *clientp)
 static curlioerr t547_ioctl_callback(CURL *handle, int cmd, void *clientp)
 {
   int *counter = (int *)clientp;
-  (void)handle; /* unused */
+  (void)handle;
   if(cmd == CURLIOCMD_RESTARTREAD) {
     curl_mfprintf(stderr, "REWIND!\n");
     *counter = 0; /* clear counter to make the read callback restart */
index 30438bafa9d4b9f336ad97b4ac6bc5efa7adf0a0..fe3b6921174a22ebfff382b1f27b591042179656 100644 (file)
@@ -60,7 +60,7 @@ static size_t t555_read_cb(char *ptr, size_t size, size_t nmemb, void *clientp)
 static curlioerr t555_ioctl_callback(CURL *handle, int cmd, void *clientp)
 {
   int *counter = (int *)clientp;
-  (void)handle; /* unused */
+  (void)handle;
   if(cmd == CURLIOCMD_RESTARTREAD) {
     curl_mfprintf(stderr, "REWIND!\n");
     *counter = 0; /* clear counter to make the read callback restart */
index 61b051a43c5f4d7c7cc9eca19538aaca8dc61a3b..dd0e2e7c4d638e42e0bccce0a606449ff64601e9 100644 (file)
@@ -1535,7 +1535,7 @@ static int test_return_codes(void)
 static CURLcode test_lib557(const char *URL)
 {
   int errors = 0;
-  (void)URL; /* not used */
+  (void)URL;
 
 #ifdef HAVE_SETLOCALE
   /*
index 795a0b74b3735c9b0cb6c5ee52221e374c89bc6f..c82b6ee969deff79cebf152866ede1e73913ec2c 100644 (file)
@@ -33,7 +33,7 @@ static CURLcode test_lib558(const char *URL)
   char *ptr = NULL;
   int asize;
 
-  (void)URL; /* we don't use this */
+  (void)URL;
 
   if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
     curl_mfprintf(stderr, "curl_global_init() failed\n");
index 5b46c8e622bec1b49cb0ce94030a45086a9d6741..a15c9a4f8187659a582cad039a36238b320fb4c3 100644 (file)
@@ -35,9 +35,9 @@ static int t578_progress_callback(void *clientp, double dltotal, double dlnow,
 {
   FILE *moo = fopen(libtest_arg2, "wb");
 
-  (void)clientp; /* UNUSED */
-  (void)dltotal; /* UNUSED */
-  (void)dlnow; /* UNUSED */
+  (void)clientp;
+  (void)dltotal;
+  (void)dlnow;
 
   if(moo) {
     if((size_t)ultotal == data_size && (size_t)ulnow == data_size)
index 4f6b67e54007691f4a6661cda2d4d4b02fcee948..76ecefe4ec535b35291e7a10ae0574517e382ee7 100644 (file)
@@ -48,9 +48,9 @@ static void progress_final_report(void)
 static int t579_progress_callback(void *clientp, double dltotal, double dlnow,
                                   double ultotal, double ulnow)
 {
-  (void)clientp; /* UNUSED */
-  (void)dltotal; /* UNUSED */
-  (void)dlnow; /* UNUSED */
+  (void)clientp;
+  (void)dltotal;
+  (void)dlnow;
 
   if(started && ulnow <= 0.0 && last_ul) {
     progress_final_report();
index 8ca87d459d2e9fbcfb07c131be63019f9039f609..70a9ab65dcdbefb97742b463e2f760b76acc7b6a 100644 (file)
@@ -97,8 +97,8 @@ static int t582_curlSocketCallback(CURL *easy, curl_socket_t s, int action,
 {
   struct t582_ReadWriteSockets *sockets = userp;
 
-  (void)easy; /* unused */
-  (void)socketp; /* unused */
+  (void)easy;
+  (void)socketp;
 
   if(action == CURL_POLL_IN || action == CURL_POLL_INOUT)
     t582_addFd(&sockets->read, s, "read");
@@ -121,7 +121,7 @@ static int t582_curlTimerCallback(CURLM *multi, long timeout_ms, void *userp)
 {
   struct curltime *timeout = userp;
 
-  (void)multi; /* unused */
+  (void)multi;
   if(timeout_ms != -1) {
     *timeout = curlx_now();
     timeout->tv_usec += (int)timeout_ms * 1000;
index 219fb8b1508f7e0a533f0898a50f521c771e577d..87cf19bbe4b76ba8063560e57d7d68331bfaaee1 100644 (file)
@@ -35,7 +35,7 @@ static size_t t668_read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
   struct t668_WriteThis *pooh = (struct t668_WriteThis *)userp;
   size_t len = strlen(pooh->readptr);
 
-  (void)size; /* Always 1.*/
+  (void)size; /* Always 1 */
 
   if(len > nmemb)
     len = nmemb;
index f98309f2470ce5764eeaa4e51cdf284184ab2120..e9fe4ea2c98bed5cb501e02fea00dfe7fa14a8db 100644 (file)
@@ -184,7 +184,7 @@ static int t758_curlTimerCallback(CURLM *multi, long timeout_ms, void *userp)
 {
   struct curltime *timeout = userp;
 
-  (void)multi; /* unused */
+  (void)multi;
   t758_ctx.timer_calls++;
   t758_msg("-> CURLMOPT_TIMERFUNCTION");
   if(t758_ctx.timer_calls == t758_ctx.max_timer_calls) {
@@ -204,7 +204,7 @@ static int t758_curlTimerCallback(CURLM *multi, long timeout_ms, void *userp)
 static int t758_cert_verify_callback(X509_STORE_CTX *ctx, void *arg)
 {
   SSL * ssl;
-  (void)arg; /* unused */
+  (void)arg;
   ssl = (SSL *)X509_STORE_CTX_get_ex_data(ctx,
         SSL_get_ex_data_X509_STORE_CTX_idx());
   t758_ctx.number_of_cert_verify_callbacks++;
@@ -227,7 +227,7 @@ static CURLcode
 t758_set_ssl_ctx_callback(CURL *curl, void *ssl_ctx, void *clientp)
 {
   SSL_CTX *ctx = (SSL_CTX *) ssl_ctx;
-  (void)curl; /* unused */
+  (void)curl;
   SSL_CTX_set_cert_verify_callback(ctx, t758_cert_verify_callback, clientp);
   return CURLE_OK;
 }
index 23782d74ca4a3cadc44d8050747fd507eb4f173f..e0a7d157d8832d6c898060853f66ebb24b330b26 100755 (executable)
@@ -352,7 +352,7 @@ static CURLcode test_lib1521(const char *URL)
   struct curl_tlssessioninfo *tlssession;
   struct curl_blob blob = { CURL_UNCONST("silly"), 5, 0};
   CURLcode res = CURLE_OK;
-  (void)URL; /* not used */
+  (void)URL;
   global_init(CURL_GLOBAL_ALL);
   easy_init(dep);
   easy_init(curl);
index b221f38cd0fadca8824e7d655f5a91169d61e692..8aa377fb0c31f884e992350382d5c7dcef635cbc 100644 (file)
@@ -166,7 +166,7 @@ int cli_debug_cb(CURL *handle, curl_infotype type,
   char idsbuf[60];
   curl_off_t xfer_id, conn_id;
 
-  (void)handle; /* not used */
+  (void)handle;
   (void)userp;
 
   if(!curl_easy_getinfo(handle, CURLINFO_XFER_ID, &xfer_id) && xfer_id >= 0) {
index f6e39dc6888c661639555a24e456dc824586f9e2..d59b458d57933c9f6e465a36c9d42d7419fd8f8b 100644 (file)
@@ -32,16 +32,16 @@ static const size_t slots = 3;
 static void t1603_mydtor(void *p)
 {
   /* Data are statically allocated */
- (void)p; /* unused */
+ (void)p;
 }
 
 static size_t elem_dtor_calls;
 
 static void my_elem_dtor(void *key, size_t key_len, void *p)
 {
-  (void)p; /* unused */
-  (void)key; /* unused */
-  (void)key_len; /* unused */
+  (void)p;
+  (void)key;
+  (void)key_len;
   ++elem_dtor_calls;
 }