From b4fe37c4fae5cdaa7b6332bec11b078d571d7c2c Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 9 Jan 2020 12:44:08 +0200 Subject: [PATCH] Silence compiler warning in no-NEED_AP_MLME builds Make the dummy hostapd_hw_mode_txt() wrapper return "UNKNOWN" instead of NULL to avoid a warning from a debug printf using %s with NULL. Signed-off-by: Jouni Malinen --- src/ap/hw_features.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ap/hw_features.h b/src/ap/hw_features.h index 902a19f9f..67493193a 100644 --- a/src/ap/hw_features.h +++ b/src/ap/hw_features.h @@ -49,7 +49,7 @@ static inline int hostapd_select_hw_mode(struct hostapd_iface *iface) static inline const char * hostapd_hw_mode_txt(int mode) { - return NULL; + return "UNKNOWN"; } static inline int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan)