From: Viktor Szakats Date: Thu, 25 Dec 2025 17:05:53 +0000 (+0100) Subject: src: drop unused includes X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;ds=inline;p=thirdparty%2Fcurl.git src: drop unused includes Also replace some indirect includes with direct ones. Closes #20096 --- diff --git a/src/config2setopts.c b/src/config2setopts.c index 89a003cc96..6ecabe5cc8 100644 --- a/src/config2setopts.c +++ b/src/config2setopts.c @@ -26,6 +26,7 @@ #include "tool_cfgable.h" #include "tool_setopt.h" #include "tool_findfile.h" +#include "tool_formparse.h" #include "tool_msgs.h" #include "tool_libinfo.h" #include "tool_cb_soc.h" diff --git a/src/tool_cb_prg.c b/src/tool_cb_prg.c index 8d9302f2e1..aebebb5e04 100644 --- a/src/tool_cb_prg.c +++ b/src/tool_cb_prg.c @@ -25,7 +25,6 @@ #include "tool_cfgable.h" #include "tool_cb_prg.h" -#include "tool_util.h" #include "tool_operate.h" #include "terminal.h" diff --git a/src/tool_cb_rea.c b/src/tool_cb_rea.c index 1de2277cd0..e896e35cda 100644 --- a/src/tool_cb_rea.c +++ b/src/tool_cb_rea.c @@ -35,7 +35,6 @@ #include "tool_cfgable.h" #include "tool_cb_rea.h" #include "tool_operate.h" -#include "tool_util.h" #include "tool_msgs.h" #ifndef _WIN32 diff --git a/src/tool_cfgable.c b/src/tool_cfgable.c index ab4892b065..b907b246c3 100644 --- a/src/tool_cfgable.c +++ b/src/tool_cfgable.c @@ -25,6 +25,7 @@ #include "tool_cfgable.h" #include "tool_formparse.h" +#include "tool_libinfo.h" #include "tool_paramhlp.h" #include "tool_main.h" #include "tool_msgs.h" diff --git a/src/tool_dirhie.h b/src/tool_dirhie.h index cb59208d9f..8503f5e4f3 100644 --- a/src/tool_dirhie.h +++ b/src/tool_dirhie.h @@ -24,7 +24,6 @@ * ***************************************************************************/ #include "tool_setup.h" -#include "tool_cfgable.h" CURLcode create_dir_hierarchy(const char *outfileo); diff --git a/src/tool_doswin.c b/src/tool_doswin.c index 855ce0897c..c6cfb14c89 100644 --- a/src/tool_doswin.c +++ b/src/tool_doswin.c @@ -33,7 +33,6 @@ # include # include # include "tool_cfgable.h" -# include "tool_libinfo.h" #endif #include "tool_bname.h" diff --git a/src/tool_formparse.c b/src/tool_formparse.c index 31b381d7e0..659f6e35a4 100644 --- a/src/tool_formparse.c +++ b/src/tool_formparse.c @@ -25,7 +25,6 @@ #include "tool_cfgable.h" #include "tool_msgs.h" -#include "tool_getparam.h" #include "tool_paramhlp.h" #include "tool_formparse.h" #include "tool_parsecfg.h" diff --git a/src/tool_help.c b/src/tool_help.c index 7355d2a782..d743fe3953 100644 --- a/src/tool_help.c +++ b/src/tool_help.c @@ -27,7 +27,6 @@ #include "tool_libinfo.h" #include "tool_util.h" #include "tool_version.h" -#include "tool_cb_prg.h" #include "tool_hugehelp.h" #include "tool_getparam.h" #include "tool_cfgable.h" diff --git a/src/tool_main.c b/src/tool_main.c index e4a5467de7..bd978c46f6 100644 --- a/src/tool_main.c +++ b/src/tool_main.c @@ -39,7 +39,6 @@ #include "tool_operate.h" #include "tool_vms.h" #include "tool_main.h" -#include "tool_libinfo.h" #include "tool_stderr.h" #ifdef __VMS diff --git a/src/tool_msgs.c b/src/tool_msgs.c index 2f943aecff..18e014950d 100644 --- a/src/tool_msgs.c +++ b/src/tool_msgs.c @@ -25,7 +25,6 @@ #include "tool_cfgable.h" #include "tool_msgs.h" -#include "tool_cb_prg.h" #include "terminal.h" #define WARN_PREFIX "Warning: " diff --git a/src/tool_operate.c b/src/tool_operate.c index 7af3fc3f15..8318c27116 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -51,12 +51,8 @@ #endif #include "tool_cfgable.h" -#include "tool_cb_dbg.h" #include "tool_cb_hdr.h" #include "tool_cb_prg.h" -#include "tool_cb_rea.h" -#include "tool_cb_see.h" -#include "tool_cb_soc.h" #include "tool_cb_wrt.h" #include "tool_dirhie.h" #include "tool_doswin.h" @@ -64,7 +60,6 @@ #include "tool_filetime.h" #include "tool_getparam.h" #include "tool_helpers.h" -#include "tool_findfile.h" #include "tool_libinfo.h" #include "tool_main.h" #include "tool_msgs.h" @@ -84,6 +79,7 @@ #include "tool_progress.h" #include "tool_ipfs.h" #include "config2setopts.h" +#include "var.h" #ifdef DEBUGBUILD /* libcurl's debug-only curl_easy_perform_ev() */ diff --git a/src/tool_paramhlp.h b/src/tool_paramhlp.h index f7c743b7e2..192d242d18 100644 --- a/src/tool_paramhlp.h +++ b/src/tool_paramhlp.h @@ -24,7 +24,6 @@ * ***************************************************************************/ #include "tool_setup.h" -#include "tool_libinfo.h" struct getout *new_getout(struct OperationConfig *config); diff --git a/src/tool_progress.c b/src/tool_progress.c index 5ed038917e..f7ffe558f2 100644 --- a/src/tool_progress.c +++ b/src/tool_progress.c @@ -24,7 +24,6 @@ #include "tool_setup.h" #include "tool_operate.h" #include "tool_progress.h" -#include "tool_util.h" /* The point of this function would be to return a string of the input data, but never longer than 5 columns (+ one zero byte). diff --git a/src/tool_setopt.c b/src/tool_setopt.c index 837f66c9c3..b50f1a6f81 100644 --- a/src/tool_setopt.c +++ b/src/tool_setopt.c @@ -25,6 +25,7 @@ #include "tool_cfgable.h" #include "tool_easysrc.h" +#include "tool_formparse.h" #include "tool_setopt.h" #ifndef CURL_DISABLE_LIBCURL_OPTION diff --git a/src/tool_setopt.h b/src/tool_setopt.h index fcd56382a7..e990f08a81 100644 --- a/src/tool_setopt.h +++ b/src/tool_setopt.h @@ -25,8 +25,6 @@ ***************************************************************************/ #include "tool_setup.h" -#include "tool_formparse.h" - /* * Macros used in operate() */ diff --git a/src/tool_ssls.h b/src/tool_ssls.h index c06e9427cf..42d10d2c62 100644 --- a/src/tool_ssls.h +++ b/src/tool_ssls.h @@ -24,7 +24,6 @@ * ***************************************************************************/ #include "tool_setup.h" -#include "tool_operate.h" CURLcode tool_ssls_load(struct OperationConfig *config, CURLSH *share, const char *filename); diff --git a/src/var.c b/src/var.c index e224bf01d5..f796aa7ed7 100644 --- a/src/var.c +++ b/src/var.c @@ -25,10 +25,7 @@ #include "tool_cfgable.h" #include "tool_getparam.h" -#include "tool_helpers.h" -#include "tool_findfile.h" #include "tool_msgs.h" -#include "tool_parsecfg.h" #include "tool_paramhlp.h" #include "tool_writeout_json.h" #include "tool_strdup.h"