From 8f148d51322ff0276f621c80ae1c58b7a7acb8f5 Mon Sep 17 00:00:00 2001 From: Chien Wong Date: Sun, 6 Aug 2023 23:15:48 +0800 Subject: [PATCH] Fix a compiler warning on prototype mismatch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the warning: wpa_supplicant.c:2257:5: warning: conflicting types for ‘wpas_update_random_addr’ due to enum/integer mismatch; have ‘int(struct wpa_supplicant *, enum wpas_mac_addr_style,  struct wpa_ssid *)’ [-Wenum-int-mismatch]  2257 | int wpas_update_random_addr(struct wpa_supplicant *wpa_s,       |     ^~~~~~~~~~~~~~~~~~~~~~~ In file included from wpa_supplicant.c:32: wpa_supplicant_i.h:1653:5: note: previous declaration of ‘wpas_update_random_addr’ with type ‘int(struct wpa_supplicant *, int,  struct wpa_ssid *)’  1653 | int wpas_update_random_addr(struct wpa_supplicant *wpa_s, int style,       |     ^~~~~~~~~~~~~~~~~~~~~~~ Fixes: 1d4027fdbef2 ("Make random MAC address style parameters use common enum values") Signed-off-by: Chien Wong --- wpa_supplicant/wpa_supplicant_i.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h index d5b3dab67..1c31569c6 100644 --- a/wpa_supplicant/wpa_supplicant_i.h +++ b/wpa_supplicant/wpa_supplicant_i.h @@ -1650,7 +1650,8 @@ int disallowed_ssid(struct wpa_supplicant *wpa_s, const u8 *ssid, void wpas_request_connection(struct wpa_supplicant *wpa_s); void wpas_request_disconnection(struct wpa_supplicant *wpa_s); int wpas_build_ext_capab(struct wpa_supplicant *wpa_s, u8 *buf, size_t buflen); -int wpas_update_random_addr(struct wpa_supplicant *wpa_s, int style, +int wpas_update_random_addr(struct wpa_supplicant *wpa_s, + enum wpas_mac_addr_style style, struct wpa_ssid *ssid); int wpas_update_random_addr_disassoc(struct wpa_supplicant *wpa_s); void add_freq(int *freqs, int *num_freqs, int freq);