From: Chien Wong Date: Sun, 6 Aug 2023 15:15:48 +0000 (+0800) Subject: Fix a compiler warning on prototype mismatch X-Git-Tag: hostap_2_11~1057 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f148d51322ff0276f621c80ae1c58b7a7acb8f5;p=thirdparty%2Fhostap.git Fix a compiler warning on prototype mismatch 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 --- 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);