[PATCH] Fix a compiler warning on prototype mismatch
Chien Wong
m at xv97.com
Mon Aug 7 02:55:00 PDT 2023
From: Chien Wong <m at xv97.com>
Date: Sun, 6 Aug 2023 23:15:48 +0800
Subject: [PATCH] Fix a compiler warning on prototype mismatch
Fixed 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,
| ^~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Chien Wong <m at xv97.com>
---
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);
--
2.41.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 236 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/hostap/attachments/20230807/1df942ca/attachment.sig>
More information about the Hostap
mailing list