[PATCH 08/18] utils: Provide hexdump stubs as inline functions

Benjamin Berg benjamin at sipsolutions.net
Thu Oct 30 01:24:39 PDT 2025


From: Benjamin Berg <benjamin.berg at intel.com>

Otherwise the compiler may emit a warning if the are no other users of a
variable passed to one of them.

Fixes: 7a1893fd3aa8 ("MLD: Handle link reconfiguration updates from the driver")
CC: Kavita Kavita <quic_kkavita at quicinc.com>
Signed-off-by: Benjamin Berg <benjamin.berg at intel.com>
---
 src/utils/wpa_debug.h | 36 ++++++++++++++++++++++++++++++------
 1 file changed, 30 insertions(+), 6 deletions(-)

diff --git a/src/utils/wpa_debug.h b/src/utils/wpa_debug.h
index bf8190f278..63e1825848 100644
--- a/src/utils/wpa_debug.h
+++ b/src/utils/wpa_debug.h
@@ -27,18 +27,42 @@ enum {
 
 #define wpa_debug_print_timestamp() do { } while (0)
 #define wpa_printf(args...) do { } while (0)
-#define wpa_hexdump(l,t,b,le) do { } while (0)
-#define wpa_hexdump_buf(l,t,b) do { } while (0)
-#define wpa_hexdump_key(l,t,b,le) do { } while (0)
-#define wpa_hexdump_buf_key(l,t,b) do { } while (0)
-#define wpa_hexdump_ascii(l,t,b,le) do { } while (0)
-#define wpa_hexdump_ascii_key(l,t,b,le) do { } while (0)
 #define wpa_debug_open_file(p) do { } while (0)
 #define wpa_debug_close_file() do { } while (0)
 #define wpa_debug_setup_stdout() do { } while (0)
 #define wpa_debug_stop_log() do { } while (0)
 #define wpa_dbg(args...) do { } while (0)
 
+static inline void wpa_hexdump(int level, const char *title,
+			       const void *buf, size_t len)
+{
+}
+
+static inline void wpa_hexdump_buf(int level, const char *title,
+				   const struct wpabuf *buf)
+{
+}
+
+static inline void wpa_hexdump_key(int level, const char *title,
+				   const void *buf, size_t len)
+{
+}
+
+static inline void wpa_hexdump_buf_key(int level, const char *title,
+				       const struct wpabuf *buf)
+{
+}
+
+static inline void wpa_hexdump_ascii(int level, const char *title,
+				     const void *buf, size_t len)
+{
+}
+
+static inline void wpa_hexdump_ascii_key(int level, const char *title,
+					 const void *buf, size_t len)
+{
+}
+
 static inline int wpa_debug_reopen_file(void)
 {
 	return 0;
-- 
2.51.0




More information about the Hostap mailing list