Patchwork Remove unused function warning in WPS NFC case

login
register
mail settings
Submitter Masashi Honma
Date Sept. 11, 2012, 12:52 p.m.
Message ID <CAFk-A4me7xDtaePeKNpvqwhbbag97s_xLYSGXiEdbq7ojw0pyw@mail.gmail.com>
Download mbox | patch
Permalink /patch/183105/
State Accepted
Commit 6df865face1758e77d700eb6c020fc97ae09248c
Headers show

Comments

Masashi Honma - Sept. 11, 2012, 12:52 p.m.
When I use CONFIG_WPS_NFC=y a warning appears.

wps_supplicant.c:1872:12: warning: 'wpas_wps_add_nfc_password_token'
defined but not used [-Wunused-function]

This patch removes this warning.

Signed-hostap: Masashi Honma <masashi.honma at gmail.com>

 static int wpas_wps_nfc_tag_process(struct wpa_supplicant *wpa_s,

Regards,
Masashi Honma.
Jouni Malinen - Sept. 16, 2012, 5:03 a.m.
On Tue, Sep 11, 2012 at 09:52:01PM +0900, Masashi Honma wrote:
> When I use CONFIG_WPS_NFC=y a warning appears.
> 
> wps_supplicant.c:1872:12: warning: 'wpas_wps_add_nfc_password_token'
> defined but not used [-Wunused-function]
> 
> This patch removes this warning.

Thanks, applied.

Patch

diff --git a/wpa_supplicant/wps_supplicant.c b/wpa_supplicant/wps_supplicant.c
index 130f3ab..915ca57 100644
--- a/wpa_supplicant/wps_supplicant.c
+++ b/wpa_supplicant/wps_supplicant.c
@@ -1869,6 +1869,7 @@  static int wpas_wps_use_cred(struct wpa_supplicant *wpa_s,
 }


+#ifdef CONFIG_WPS_ER
 static int wpas_wps_add_nfc_password_token(struct wpa_supplicant *wpa_s,
 					   struct wps_parse_attr *attr)
 {
@@ -1876,6 +1877,7 @@  static int
wpas_wps_add_nfc_password_token(struct wpa_supplicant *wpa_s,
 		wpa_s->wps->registrar, attr->oob_dev_password,
 		attr->oob_dev_password_len);
 }
+#endif /* CONFIG_WPS_ER */