From 4120fa5f25905e2bee76d62f2eb069028cbe1828 Mon Sep 17 00:00:00 2001 From: "hwajeong.son" Date: Thu, 4 Oct 2018 10:48:20 +0900 Subject: [PATCH] fix build warning --- src/adaptor.c | 3 +-- src/input_file.c | 13 +++++-------- src/setup_network.c | 19 ++++++------------- 3 files changed, 12 insertions(+), 23 deletions(-) diff --git a/src/adaptor.c b/src/adaptor.c index 1e31a99..51df4d2 100755 --- a/src/adaptor.c +++ b/src/adaptor.c @@ -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(); diff --git a/src/input_file.c b/src/input_file.c index 9238a77..0f78afd 100755 --- a/src/input_file.c +++ b/src/input_file.c @@ -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); diff --git a/src/setup_network.c b/src/setup_network.c index a5a9528..e90c2f7 100755 --- a/src/setup_network.c +++ b/src/setup_network.c @@ -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"); -- 2.34.1