[tools] Fix build warnings 34/258834/1
authorNishant Chaprana <n.chaprana@samsung.com>
Wed, 26 May 2021 09:38:48 +0000 (15:08 +0530)
committerNishant Chaprana <n.chaprana@samsung.com>
Wed, 26 May 2021 09:38:48 +0000 (15:08 +0530)
Change-Id: I1d6b3802e80dd21687dfad4d611a3ba453c63f49
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
18 files changed:
tool/wifi_manager_test.c
tool/wifi_mgr_extension.c
tool/wifi_mgr_extension_autoconnect.c
tool/wifi_mgr_extension_autoscan.c
tool/wifi_mgr_extension_bss.c
tool/wifi_mgr_extension_ipconflict.c
tool/wifi_mgr_extension_netlinkscan.c
tool/wifi_mgr_public.c
tool/wifi_mgr_public_config.c
tool/wifi_mgr_public_connect.c
tool/wifi_mgr_public_dpp.c
tool/wifi_mgr_public_get.c
tool/wifi_mgr_public_ipconflict.c
tool/wifi_mgr_public_scan.c
tool/wifi_mgr_public_set.c
tool/wifi_mgr_public_tdls.c
tool/wifi_mgr_public_vsie.c
tool/wifi_mgr_tool.c

index 9ff85dd..9a809e7 100755 (executable)
@@ -1431,7 +1431,7 @@ static bool _test_config_list_cb_for_remove(const wifi_manager_config_h config,
        wifi_manager_config_get_name(config, &name);
        wifi_manager_config_get_security_type(config, &security_type);
 
-       if (__test_compare_ap_name(name, c->name) && security_type == c->type) {
+       if (__test_compare_ap_name(name, c->name) && security_type == (wifi_manager_security_type_e) c->type) {
                int rv = wifi_manager_config_remove(wifi, config);
                if (rv != WIFI_MANAGER_ERROR_NONE)
                        printf("Fail to remove configurations [%s]\n", __test_convert_error_to_string(rv));
index 1e2b44e..1d02df0 100755 (executable)
@@ -42,5 +42,5 @@ struct menu_data menu_extension[] = {
        { "3", "[Bss]", menu_extension_bss, NULL, NULL},
        { "4", "[IP conflict]", menu_extension_ipconflict, NULL, NULL},
        { "5", "[Netlink scan]", menu_extension_netlinkscan, NULL, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
index bd43ff6..04d8609 100755 (executable)
@@ -243,5 +243,5 @@ struct menu_data menu_extension_autoconnect[] = {
        { "4", "[Set] mode", NULL, _test_extension_autoconnect_set_mode, NULL},
        { "5", "[Get] state for AP", NULL, _test_extension_autoconnect_get_state_for_ap, NULL},
        { "6", "[Set] state for AP", NULL, _test_extension_autoconnect_set_state_for_ap, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
index 209960f..f330c06 100755 (executable)
@@ -159,5 +159,5 @@ struct menu_data menu_extension_autoscan[] = {
        { "4", "[Set] state", NULL, _test_extension_autoscan_set_state, NULL},
        { "5", "[Get] mode", NULL, _test_extension_autoscan_get_mode, NULL},
        { "6", "[Set] mode", NULL, _test_extension_autoscan_set_mode, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
index 128e723..546300e 100755 (executable)
@@ -74,11 +74,11 @@ static int _test_extension_set_bssid(MManager *mm, struct menu_data *menu)
 struct menu_data menu_extension_set_bssid[] = {
        { "0", "[BSSID]", NULL, NULL, g_bssid},
        { "u", LOG_LIGHTBLUE "[Update]" LOG_END, NULL, _test_extension_set_bssid, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
 
 struct menu_data menu_extension_bss[] = {
        { "1", "[Flush]", NULL, _test_extension_bss_flush, NULL},
        { "2", "[SetBSSID]", menu_extension_set_bssid, NULL, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
index 57aa4dc..d5218c9 100755 (executable)
@@ -82,5 +82,5 @@ struct menu_data menu_extension_ipconflict[] = {
        { "1", "[Period] interval for ARP ping", NULL, NULL, g_period},
        { "2", "[Get] period", NULL, _test_extension_ipconflict_get_period, NULL},
        { "3", "[Set] period", NULL, _test_extension_ipconflict_set_period, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
index 6c8737f..64bd3f3 100755 (executable)
@@ -225,5 +225,5 @@ struct menu_data menu_extension_netlinkscan[] = {
        { "1", "[VSIE] (x.Skip)", NULL, NULL, g_vsie},
        { "2", "[Scan]", NULL, _test_extension_netlinkscan_scan, NULL},
        { "3", "[Scan specific AP]", NULL, _test_extension_netlinkscan_specific_scan, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
index e51c335..a392b20 100755 (executable)
@@ -346,5 +346,5 @@ struct menu_data menu_public[] = {
        { "v", "[VSIE]", menu_public_vsie, NULL, NULL},
        { "i", "[IP Conflict]", menu_public_ipconflict, NULL, NULL},
        { "d", "[DPP]", menu_public_dpp, NULL, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
index fa1dc38..0741797 100755 (executable)
@@ -396,7 +396,7 @@ struct menu_data menu_public_config_save_eap[] = {
        { "6", "[Private Key] (x.Skip)", NULL, NULL, g_eap_private_key},
        { "7", "[Client cert file] (x.Skip)", NULL, NULL, g_eap_client_cert_file},
        { "8", "[Subject match] (x.Skip)", NULL, NULL, g_eap_subject_match},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
 
 struct menu_data menu_public_config_save[] = {
@@ -407,19 +407,19 @@ struct menu_data menu_public_config_save[] = {
        { "5", "[Hidden] (0.False/1.True/x.Skip)", NULL, NULL, g_hidden},
        { "6", "[EAP] ", menu_public_config_save_eap, NULL, NULL},
        { "s", LOG_LIGHTBLUE "[Save]" LOG_END, NULL, _test_public_config_save, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
 
 struct menu_data menu_public_config_remove[] = {
        { "1", "[Name]", NULL, NULL, g_name},
        { "2", "[Security type] (0.None/1.WEP/2.WPA/3.WPA2/4.EAP)", NULL, NULL, g_security},
        { "r", LOG_LIGHTMAGENTA "[Remove]" LOG_END, NULL, _test_public_config_remove, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
 
 struct menu_data menu_public_config[] = {
        { "1", LOG_LIGHTBLUE "[Load]" LOG_END, NULL, _test_public_config_load, NULL},
        { "2", LOG_LIGHTBLUE "[Save]" LOG_END, menu_public_config_save, NULL, NULL},
        { "3", LOG_LIGHTMAGENTA "[Remove]" LOG_END, menu_public_config_remove, NULL, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
index c702b84..c949389 100755 (executable)
@@ -714,7 +714,7 @@ struct menu_data menu_public_connect_ap[] = {
        { "1", "[SSID]", NULL, NULL, g_ssid},
        { "2", "[Passphrase]", NULL, NULL, g_passphrase},
        { "c", LOG_LIGHTBLUE "[Connect]" LOG_END, NULL, _test_public_connect_ap, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
 
 struct menu_data menu_public_connect_specific_ap[] = {
@@ -723,7 +723,7 @@ struct menu_data menu_public_connect_specific_ap[] = {
        { "3", "[Security] (0.NONE/1.WEP/2.WPA/3.WPA2/4.EAP)", NULL, NULL, g_security},
        { "4", "[User name] for EAP", NULL, NULL, g_username},
        { "c", LOG_LIGHTBLUE "[Connect]" LOG_END, NULL, _test_public_connect_specific_ap, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
 
 struct menu_data menu_public_connect_hidden_ap[] = {
@@ -731,7 +731,7 @@ struct menu_data menu_public_connect_hidden_ap[] = {
        { "2", "[Passphrase]", NULL, NULL, g_passphrase},
        { "3", "[Security] (0.NONE/1.WEP/2.WPA/3.WPA2)", NULL, NULL, g_security},
        { "c", LOG_LIGHTBLUE "[Connect]" LOG_END, NULL, _test_public_connect_hidden_ap, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
 
 struct menu_data menu_public_connect_eap_ap[] = {
@@ -742,7 +742,7 @@ struct menu_data menu_public_connect_eap_ap[] = {
        { "5", "[Auth type] (0.NONE/1.PAP/2.MSCHAP/3.MSCHAPv2/4.GTC/5.MD5)", NULL, NULL, g_auth_type},
        { "6", "[Certificate file]", NULL, NULL, g_certificate},
        { "c", LOG_LIGHTBLUE "[Connect]" LOG_END, NULL, _test_public_connect_eap_ap, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
 
 struct menu_data menu_public_connect_wps[] = {
@@ -753,7 +753,7 @@ struct menu_data menu_public_connect_wps[] = {
        { "5", "[PBC] without ssid", NULL, _test_public_connect_wps_pbc_without_ssid, NULL},
        { "6", "[PIN] without ssid", NULL, _test_public_connect_wps_pin_without_ssid, NULL},
        { "7", "[Cancel]", NULL, _test_public_connect_wps_cancel, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
 
 struct menu_data menu_public_connect[] = {
@@ -762,5 +762,5 @@ struct menu_data menu_public_connect[] = {
        { "3", "[Hidden AP]", menu_public_connect_hidden_ap, NULL, NULL},
        { "4", "[EAP]", menu_public_connect_eap_ap, NULL, NULL},
        { "5", "[WPS]", menu_public_connect_wps, NULL, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
index 04598b7..eb9da4b 100755 (executable)
@@ -621,7 +621,7 @@ struct menu_data menu_public_dpp_get[] = {
        { "4", "network role", NULL, _test_public_dpp_get_network_role, NULL},
        { "5", "AKM", NULL, _test_public_dpp_get_akm, NULL},
        { "6", "own URI", NULL, _test_public_dpp_get_own_uri, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
 
 struct menu_data menu_public_dpp_start[] = {
@@ -629,7 +629,7 @@ struct menu_data menu_public_dpp_start[] = {
        { "1", "[Start] configurator responder", NULL, _test_public_dpp_start_configurator_responder, NULL},
        { "2", "[Start] enrollee initiator", NULL, _test_public_dpp_start_enrollee_initiator, NULL},
        { "3", "[Start] enrollee responder", NULL, _test_public_dpp_start_enrollee_responder, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
 
 struct menu_data menu_public_dpp[] = {
@@ -650,5 +650,5 @@ struct menu_data menu_public_dpp[] = {
        { "s", LOG_LIGHTBLUE "[Start]" LOG_END, menu_public_dpp_start, NULL, NULL},
        { "t", LOG_LIGHTMAGENTA "[Stop]" LOG_END, NULL, _test_public_dpp_stop, NULL},
        { "g", LOG_LIGHTBLUE "[GET]" LOG_END, menu_public_dpp_get, NULL, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
index f9a4d41..4937806 100755 (executable)
@@ -558,5 +558,5 @@ struct menu_data menu_public_get[] = {
        { "4", "[Interface name]", NULL, _test_public_get_interface_name, NULL},
        { "5", "[Scan state]", NULL, _test_public_get_scan_state, NULL},
        { "6", "[Module state]", NULL, _test_public_get_module_state, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
index 360ad40..25a5598 100755 (executable)
@@ -106,5 +106,5 @@ struct menu_data menu_public_ipconflict[] = {
        { "1", "[Get] state", NULL, _test_public_ipconflict_get_state, NULL},
        { "2", "[Get] detection mode", NULL, _test_public_ipconflict_get_detect_mode, NULL},
        { "3", "[Set] detection mode", NULL, _test_public_ipconflict_set_detect_mode, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
index e21b466..0ff91c2 100755 (executable)
@@ -302,25 +302,25 @@ struct menu_data menu_public_scan_multi_ssid[] = {
        { "1", "[SSID]", NULL, NULL, g_ssid},
        { "2", "[Set]", NULL, _test_public_multi_scan_ssid_set, NULL},
        { "3", "[Scan]", NULL, _test_public_multi_scan, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
 
 struct menu_data menu_public_scan_multi_freq[] = {
        { "1", "[Freq]", NULL, NULL, g_frequency},
        { "2", "[Set]", NULL, _test_public_multi_scan_freq_set, NULL},
        { "3", "[Scan]", NULL, _test_public_multi_scan, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
 
 struct menu_data menu_public_scan_multi[] = {
        { "1", "[SSID]", menu_public_scan_multi_ssid, _test_public_multi_scan_init, NULL},
        { "2", "[Freq]", menu_public_scan_multi_freq, _test_public_multi_scan_init, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
 
 struct menu_data menu_public_scan[] = {
        { "1", LOG_LIGHTBLUE "[Scan]" LOG_END, NULL, _test_public_scan, NULL},
        { "2", "[BSSID scan]", NULL, _test_public_bssid_scan, NULL},
        { "3", "[Multi scan]", menu_public_scan_multi, NULL, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
index 574745e..4a893e4 100755 (executable)
@@ -468,7 +468,7 @@ struct menu_data menu_public_set_ip[] = {
        { "8", "[DNS1 address] (0.Clear/x.Skip)", NULL, NULL, g_dns1_address},
        { "9", "[DNS2 address] (0.Clear/x.Skip)", NULL, NULL, g_dns2_address},
        { "u", LOG_LIGHTBLUE "[Update]" LOG_END, NULL, _test_public_update_ip_method, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
 
 struct menu_data menu_public_set_proxy[] = {
@@ -477,11 +477,11 @@ struct menu_data menu_public_set_proxy[] = {
        { "2", "[Proxy Address type] (0.IPv4/1.IPv6)", NULL, NULL, g_proxy_address_type},
        { "3", "[Proxy address] (0.Clear/x.Skip)", NULL, NULL, g_proxy_address},
        { "u", LOG_LIGHTBLUE "[Update]" LOG_END, NULL, _test_public_update_proxy_method, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
 
 struct menu_data menu_public_set[] = {
        { "1", LOG_LIGHTBLUE "[IP method]" LOG_END, menu_public_set_ip, NULL, NULL},
        { "2", "[Proxy method]", menu_public_set_proxy, NULL, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
index 814fafe..7136d7a 100755 (executable)
@@ -188,5 +188,5 @@ struct menu_data menu_public_tdls[] = {
        { "5", LOG_LIGHTMAGENTA "[Disconnect]" LOG_END, NULL, _test_public_tdls_disconnect, NULL},
        { "6", "[Enable] channel switch", NULL, _test_public_tdls_enable_channel_switch, NULL},
        { "7", "[Disable] channel switch", NULL, _test_public_tdls_disable_channel_switch, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
index 804ba05..fb65c1f 100755 (executable)
@@ -131,5 +131,5 @@ struct menu_data menu_public_vsie[] = {
        { "2", "[Add]", NULL, _test_public_vsie_add, NULL},
        { "3", "[Get]", NULL, _test_public_vsie_get, NULL},
        { "4", "[Remove]", NULL, _test_public_vsie_remove, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
index 19a46d4..1e51da9 100755 (executable)
@@ -41,7 +41,7 @@ extern struct menu_data menu_extension[];
 static struct menu_data menu_main[] = {
        { "1", LOG_LIGHTBLUE "[Public]" LOG_END, menu_public, NULL, NULL},
        { "2", LOG_LIGHTMAGENTA "[Extension]" LOG_END, menu_extension, NULL, NULL},
-       { NULL, NULL, },
+       { NULL, NULL, NULL, NULL, NULL },
 };
 
 static void __test_device_state_cb(wifi_manager_device_state_e state, void *user_data)
@@ -913,7 +913,7 @@ int main(int arg, char **argv)
        GMainLoop *mainloop = NULL;
        GIOChannel *channel = g_io_channel_unix_new(STDIN_FILENO);
        MManager *manager;
-       struct menu_data init_menu[5] = { {NULL, NULL, NULL, } };
+       struct menu_data init_menu[5] = { {NULL, NULL, NULL, NULL, NULL} };
 
 #if !GLIB_CHECK_VERSION(2, 35, 0)
        g_type_init();