From: Benjamin Berg Date: Thu, 30 Oct 2025 08:24:39 +0000 (+0100) Subject: utils: Provide hexdump stubs as inline functions X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da81cf27152f7cc9d658761e8457de842b7c0b7d;p=thirdparty%2Fhostap.git utils: Provide hexdump stubs as inline functions 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 Signed-off-by: Benjamin Berg --- diff --git a/src/utils/wpa_debug.h b/src/utils/wpa_debug.h index bf8190f27..63e182584 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;