From a667a7f02066ce1a6de568d75f1062f525b3c2f0 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 26 Sep 2024 16:27:10 +0200 Subject: wget: fix compile warnings when WGET_FTP is not selected Signed-off-by: Denys Vlasenko --- networking/wget.c | 9 ++++++--- util-linux/hwclock.c | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/networking/wget.c b/networking/wget.c index 512bebfc2..ec3767793 100644 --- a/networking/wget.c +++ b/networking/wget.c @@ -1178,7 +1178,9 @@ static void download_one_url(const char *url) /*G.content_len = 0; - redundant, got_clen = 0 is enough */ G.got_clen = 0; G.chunked = 0; - if (use_proxy || target.protocol[0] != 'f' /*not ftp[s]*/) { + if (!ENABLE_FEATURE_WGET_FTP + || use_proxy || target.protocol[0] != 'f' /*not ftp[s]*/ + ) { /* * HTTP session */ @@ -1447,14 +1449,15 @@ However, in real world it was observed that some web servers /* For HTTP, data is pumped over the same connection */ dfp = sfp; - } else { + } #if ENABLE_FEATURE_WGET_FTP + else { /* * FTP session */ sfp = prepare_ftp_session(&dfp, &target, lsa); -#endif } +#endif free(lsa); diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c index e6f0043d0..c3fd0eb57 100644 --- a/util-linux/hwclock.c +++ b/util-linux/hwclock.c @@ -366,7 +366,7 @@ static void set_rtc_param(const char **pp_rtcname, char *rtc_param) /* handle param name */ eq = strchr(rtc_param, '='); if (!eq) - bb_error_msg_and_die("expected ="); + bb_simple_error_msg_and_die("expected ="); *eq = '\0'; param.param = resolve_rtc_param_alias(rtc_param); *eq = '='; -- cgit v1.2.3-55-g6feb