]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
utils: Provide hexdump stubs as inline functions
authorBenjamin Berg <benjamin.berg@intel.com>
Thu, 30 Oct 2025 08:24:39 +0000 (09:24 +0100)
committerJouni Malinen <j@w1.fi>
Sat, 13 Dec 2025 19:59:14 +0000 (21:59 +0200)
Otherwise the compiler may emit a warning if there 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@quicinc.com>
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
src/utils/wpa_debug.h

index bf8190f27825cc65670c7a02eb45e6cf680197c9..63e18258480ecab7b4e6cad79356a9ea5e4dcb7c 100644 (file)
@@ -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;