]> git.ipfire.org Git - thirdparty/curl.git/commit
lib: fix unused parameter/function compiler warnings
authorViktor Szakats <commit@vsz.me>
Fri, 4 Jul 2025 13:45:23 +0000 (15:45 +0200)
committerViktor Szakats <commit@vsz.me>
Fri, 4 Jul 2025 14:46:53 +0000 (16:46 +0200)
commit5af2457848357141b3b3c67f7a45a4964ec25233
tree98ee68386bd7c5f36f1b7e1ae7c282f2cc1d389f
parent7e2bdd86624e7fbfeb1ff9af91c2b5ba60855fa8
lib: fix unused parameter/function compiler warnings

- hostip: fix unused variable with `CURL_DISABLE_SHUFFLE_DNS`
  ```
  lib/hostip.c: In function 'Curl_dnscache_mk_entry':
  lib/hostip.c:490:42: warning: unused parameter 'data' [-Wunused-parameter]
    490 | Curl_dnscache_mk_entry(struct Curl_easy *data,
        |                        ~~~~~~~~~~~~~~~~~~^~~~
  ```

- setopt: fix unused function with `CURL_DISABLE_HTTP`
  ```
  lib/setopt.c:214:17: warning: 'httpauth' defined but not used [-Wunused-function]
    214 | static CURLcode httpauth(struct Curl_easy *data, bool proxy,
        |                 ^~~~~~~~
  ```

- url: fix unused function with `CURL_DISABLE_NETRC`
  ```
  lib/url.c:2760:13: warning: 'str_has_ctrl' defined but not used [-Wunused-function]
   2760 | static bool str_has_ctrl(const char *input)
        |             ^~~~~~~~~~~~
  ```

Seen with a minimal curl-for-win build:
```
CW_CONFIG=dev-x64-zero-osnotls-osnoidn-nohttp-nocurltool-linux-unity
```

Closes #17818
lib/hostip.c
lib/setopt.c
lib/url.c