Fixed the build error using gcc 13 22/295022/2 accepted/tizen_unified_dev accepted/tizen/unified/20230705.063701 accepted/tizen/unified/dev/20230726.115542
authorwchang kim <wchang.kim@samsung.com>
Fri, 30 Jun 2023 01:43:06 +0000 (10:43 +0900)
committerwchang kim <wchang.kim@samsung.com>
Fri, 30 Jun 2023 04:28:33 +0000 (13:28 +0900)
Change-Id: I2f2fdb223eafd5ebf0ebabd3654a0801efb26000

test/connection_test.c
unittest/mock/connection-mock.c
unittest/utc-connection-common.c
unittest/utc-connection-common.h

index 417c1d6..dc3d86b 100755 (executable)
@@ -2304,7 +2304,7 @@ static bool test_get_ipv6_address_callback(char *ipv6_address, void* user_data)
 int test_foreach_ipv6_address(void)
 {
        int rv = 0;
-       int type;
+       int type = 0;
        connection_type_e conn_type;
 
        test_get_user_int("Input Connection Type(1: WiFi 2: Ethernet) :", &type);
index 691aa86..28d8ead 100755 (executable)
@@ -563,9 +563,9 @@ static void __net_add_profile_wifi(net_profile_info_t **profile_info, int *profi
                Wlan->security_info.enc_mode = wifi_profile[i].enc_mode;
                Wlan->passpoint = wifi_profile[i].passpoint;
                Wlan->strength = wifi_profile[i].strength;
-               if (wifi_profile[i].essid)
+               if (strlen(wifi_profile[i].essid) != 0)
                        g_strlcpy(Wlan->essid, wifi_profile[i].essid, NET_WLAN_ESSID_LEN);
-               if (wifi_profile[i].bssid)
+               if (strlen(wifi_profile[i].bssid) != 0)
                        g_strlcpy(Wlan->bssid, wifi_profile[i].bssid, NET_MAX_MAC_ADDR_LEN);
                Wlan->max_rate = wifi_profile[i].max_rate;
                Wlan->frequency = wifi_profile[i].frequency;
index 12c8446..95ee2ee 100755 (executable)
 
 #include "utc-connection-common.h"
 
+GMainLoop *g_pMainLoop;
+guint g_nTimeoutId;
+int g_CallbackRet;
+
+bool wifi_supported;
+bool telephony_supported;
+bool bt_tethering_supported;
+bool ethernet_supported;
+bool route_supported;
+bool all_features_not_supported;
+
+connection_profile_h profile_cellular;
+connection_profile_h profile_wifi;
+connection_profile_h profile_temp;
+connection_h connection;
+
 gboolean test_connection_timeout_callback(gpointer data)
 {
        g_CallbackRet = CONNECTION_ERROR_OPERATION_FAILED;
index 4361a2c..c87641f 100755 (executable)
 #define FEATURE_ROUTE                          "http://tizen.org/feature/network.route"
 #define CALLBACK_RETURN                                "callback return"
 
-GMainLoop *g_pMainLoop;
-guint g_nTimeoutId;
-int g_CallbackRet;
-
-bool wifi_supported;
-bool telephony_supported;
-bool bt_tethering_supported;
-bool ethernet_supported;
-bool route_supported;
-bool all_features_not_supported;
-
-connection_profile_h profile_cellular;
-connection_profile_h profile_wifi;
-connection_profile_h profile_temp;
-connection_h connection;
+extern GMainLoop *g_pMainLoop;
+extern guint g_nTimeoutId;
+extern int g_CallbackRet;
+
+extern bool wifi_supported;
+extern bool telephony_supported;
+extern bool bt_tethering_supported;
+extern bool ethernet_supported;
+extern bool route_supported;
+extern bool all_features_not_supported;
+
+extern connection_profile_h profile_cellular;
+extern connection_profile_h profile_wifi;
+extern connection_profile_h profile_temp;
+extern connection_h connection;
 
 #define RUN_GMAIN_LOOP { \
        g_pMainLoop = g_main_loop_new(NULL, false); \