fix build warning
authorhwajeong.son <hwajeong.son@samsung.com>
Thu, 4 Oct 2018 01:48:20 +0000 (10:48 +0900)
committerhwajeong.son <hwajeong.son@samsung.com>
Thu, 4 Oct 2018 01:48:20 +0000 (10:48 +0900)
src/adaptor.c
src/input_file.c
src/setup_network.c

index 1e31a99878a9683dde44f7a531611fcab791abb4..51df4d28df029a9921f92e82917394f1f66db672 100755 (executable)
@@ -116,8 +116,7 @@ static gpointer main_thread(gpointer data)
 
 int main(int argc, char *argv[])
 {
-       sa_file_state_e file_state = SA_FILE_STATE_NOT_EXISTED;
-       sa_config_s config = { 0, };
+       sa_file_state_e file_state = SA_FILE_STATE_NOT_EXISTED; 
 
        // check if exists config file
        file_state = sa_inputfile_get_config_state();
index 9238a7730416f136f7e9a9c38d2939ac81dfd3b8..0f78afd76c4d54b78760a244fd37decaa340a146 100755 (executable)
@@ -33,7 +33,7 @@
 #define EVENT_NAME_MAX 256
 #define EVENT_SIZE     (sizeof(struct inotify_event))
 #define EVENT_BUF_LEN  (512 * (EVENT_SIZE + EVENT_NAME_MAX))
-
+/*
 static void *__config_main_loop(void *arg)
 {
        int fd = 0;
@@ -143,7 +143,7 @@ static int __init_event_listener(file_state_cb callback)
 
        return 0;
 }
-
+*/
 static int json_get_int_from_obj(json_object * inputObj, char *key)
 {
        struct json_object *bodyObj;
@@ -613,9 +613,6 @@ static void release_network_resource(sa_network_s * network)
 
 gboolean sa_inputfile_thread(GSource * source, GSourceFunc callbackFuntion, gpointer user_data)
 {
-       GMainLoop *loop = user_data;
-       GSource *src = NULL;
-
        _D("GSourceFuncs>>>Execution !!!");
 
 #if 0
@@ -682,13 +679,13 @@ void sa_inputfile_set_completion_flag(sa_file_config_e config_type)
 
        switch (config_type) {
        case SA_FILE_CONFIG_SYSTEM:
-               fd = creat(FLAG_FILE_SYSTEM, NULL);
+               fd = creat(FLAG_FILE_SYSTEM, 0644);
                break;
        case SA_FILE_CONFIG_ETHERNET:
-               fd = creat(FLAG_FILE_ETH, NULL);
+               fd = creat(FLAG_FILE_ETH, 0644);
                break;
        case SA_FILE_CONFIG_WIFI:
-               fd = creat(FLAG_FILE_WIFI, NULL);
+               fd = creat(FLAG_FILE_WIFI, 0644);
                break;
        default:
                _E("unknown parameter (%d)", config_type);
index a5a95283f9e9a58d5df75a05591428813cb314d6..e90c2f73014544eafcb15099cdd1e01a045fd500 100755 (executable)
@@ -30,7 +30,7 @@ typedef struct {
        char *ssid;
        char *password;
 } _wifi_data_s;
-
+/*
 static char *__print_connection_state(sa_network_state_e state)
 {
        switch (state) {
@@ -130,7 +130,7 @@ static const char *__print_network_type(sa_network_type_e type)
                return "Unknown";
        }
 }
-
+*/
 static const char *__print_wifi_error(wifi_manager_error_e err_type)
 {
        switch (err_type) {
@@ -230,7 +230,7 @@ static bool __wifi_connect_ap_cb(wifi_manager_ap_h ap, void *user_data)
        }
 
        if (g_strcmp0(ap_name, wifi_data->ssid) == 0) {
-               int required = FALSE;
+               bool required = FALSE;
 
                _D("OK!!! connect AP [%s]", ap_name);
 
@@ -392,7 +392,6 @@ connection_h eth_connect;
 static bool __eth_get_user_selected_profile(connection_profile_h * profile, bool select)
 {
        int rv = 0;
-       int input = 0;
        char *profile_name;
        connection_profile_type_e profile_type;
        connection_profile_state_e profile_state;
@@ -442,8 +441,6 @@ static bool __eth_get_user_selected_profile(connection_profile_h * profile, bool
 static int __eth_update_ip_info(sa_eth_s * info, connection_profile_h profile, connection_address_family_e address_family)
 {
        int rv = 0;
-       int input_int = 0;
-       char input_str[100] = { 0, };
 
        _D("ipaddress =%s", info->staticInfo->ipAddress);
        if (strlen(info->staticInfo->ipAddress) > 0) {
@@ -489,7 +486,7 @@ static int __eth_update_ip(sa_eth_s * info)
        int ret = 0;
 
        connection_profile_type_e prof_type;
-       connection_profile_h profile;
+       connection_profile_h profile = NULL;
        int address_family = 0;         // IPv4
 
        //printf("\n** Choose a profile to update. **\n");
@@ -544,8 +541,6 @@ static int __eth_register_client(void)
 static int __eth_deregister_client(void)
 {
        int rv = 0;
-       GSList *list;
-       connection_profile_h profile;
 
        if (eth_connect != NULL)
                rv = connection_destroy(eth_connect);
@@ -581,7 +576,7 @@ static int __ethernet_connect_main(sa_eth_s * info)
 
        return ret;
 }
-
+/*
 static int __network_get_wifi_state(connection_h connection, connection_wifi_state_e * wifi_state)
 {
        int rv = 0;
@@ -646,7 +641,7 @@ static sa_error_e __network_get_state(sa_network_state_e * conn_state, sa_networ
 
        return ret;
 }
-
+*/
 extern void sa_inputfile_flag(void);
 
 static sa_error_e __network_connect(sa_network_s * info)
@@ -721,8 +716,6 @@ static sa_error_e __network_connect(sa_network_s * info)
 sa_error_e sa_setup_network(sa_network_s * network)
 {
        sa_error_e ret = SA_ERROR_NONE;
-       sa_network_type_e conn_type;
-       sa_network_state_e conn_state;
 
        if (network == NULL) {
                _E("__set_network is null");