[PATCH v2 1/2] wpa_cli: Fix duplicate const warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



wpa_cli.c:1541:19: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
 static const char const *cred_fields[] = {
                   ^~~~~

Signed-off-by: Masashi Honma <masashi.honma@xxxxxxxxx>
---
 wpa_supplicant/wpa_cli.c | 27 +++++++++++++--------------
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
index 7d2d6ac..6b98a3f 100644
--- a/wpa_supplicant/wpa_cli.c
+++ b/wpa_supplicant/wpa_cli.c
@@ -1538,22 +1538,21 @@ static int wpa_cli_cmd_remove_cred(struct wpa_ctrl *ctrl, int argc,
 }
 
 
-static const char const *cred_fields[] = {
-	"temporary", "priority", "sp_priority", "pcsc", "eap",
-	"update_identifier", "min_dl_bandwidth_home", "min_ul_bandwidth_home",
-	"min_dl_bandwidth_roaming", "min_ul_bandwidth_roaming", "max_bss_load",
-	"req_conn_capab", "ocsp", "sim_num", "realm", "username", "password",
-	"ca_cert", "client_cert", "private_key", "private_key_passwd", "imsi",
-	"milenage", "domain_suffix_match", "domain", "phase1", "phase2",
-	"roaming_consortium", "required_roaming_consortium", "excluded_ssid",
-	"roaming_partner", "provisioning_sp"
-};
-
-
 static char ** wpa_cli_complete_cred(const char *str, int pos)
 {
 	int arg = get_cmd_arg_num(str, pos);
-	int i, num_fields = ARRAY_SIZE(cred_fields);
+	const char *fields[] = {
+		"temporary", "priority", "sp_priority", "pcsc", "eap",
+		"update_identifier", "min_dl_bandwidth_home",
+		"min_ul_bandwidth_home", "min_dl_bandwidth_roaming",
+		"min_ul_bandwidth_roaming", "max_bss_load", "req_conn_capab",
+		"ocsp", "sim_num", "realm", "username", "password", "ca_cert",
+		"client_cert", "private_key", "private_key_passwd", "imsi",
+		"milenage", "domain_suffix_match", "domain", "phase1", "phase2",
+		"roaming_consortium", "required_roaming_consortium",
+		"excluded_ssid", "roaming_partner", "provisioning_sp"
+	};
+	int i, num_fields = ARRAY_SIZE(fields);
 	char **res = NULL;
 
 	switch (arg) {
@@ -1565,7 +1564,7 @@ static char ** wpa_cli_complete_cred(const char *str, int pos)
 		if (res == NULL)
 			return NULL;
 		for (i = 0; i < num_fields; i++) {
-			res[i] = os_strdup(cred_fields[i]);
+			res[i] = os_strdup(fields[i]);
 			if (res[i] == NULL)
 				break;
 		}
-- 
2.7.4


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux