From: Jouni Malinen Date: Fri, 17 Oct 2025 14:18:16 +0000 (+0300) Subject: Fix compiler warning on unused function X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=38e3a7c57db442b6bd3377b15b7e611297dac1ec;p=thirdparty%2Fhostap.git Fix compiler warning on unused function hostapd_ctrl_iface_set_bw() is called only if CONFIG_TESTING_OPTIONS is defined. Move it to be under matching build configuration conditions. Fixes: 261fab94c180 ("AP: Support bandwidth changes without CSA through control interface") Signed-off-by: Jouni Malinen --- diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c index 3f5a50fd3..d7e5c6071 100644 --- a/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c @@ -2778,6 +2778,7 @@ static char hostapd_ctrl_iface_notify_cw_change(struct hostapd_data *hapd, } +#ifdef CONFIG_TESTING_OPTIONS static int hostapd_ctrl_iface_set_bw(struct hostapd_iface *iface, char *pos) { #ifdef NEED_AP_MLME @@ -2825,6 +2826,7 @@ static int hostapd_ctrl_iface_set_bw(struct hostapd_iface *iface, char *pos) return -1; #endif /* NEED_AP_MLME */ } +#endif /* CONFIG_TESTING_OPTIONS */ static int hostapd_ctrl_iface_mib(struct hostapd_data *hapd, char *reply,