[Wformat, Wincompatible-pointer-types] Fix build error 99/179399/2 accepted/tizen/4.0/unified/20180521.190718 submit/tizen_4.0/20180518.031411
authorNishant Chaprana <n.chaprana@samsung.com>
Thu, 17 May 2018 14:11:09 +0000 (19:41 +0530)
committerNishant Chaprana <n.chaprana@samsung.com>
Thu, 17 May 2018 14:14:37 +0000 (19:44 +0530)
Change-Id: Iac084295da1868df963f1cb0207cc6174035ca3a
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
packaging/stc-manager.spec
plugin/exception/stc-plugin-exception.c
plugin/net.stc-popup/src/stc-popup-main.c
plugin/procfs/stc-plugin-procfs.c
src/monitor/stc-monitor.c
src/stc-restriction.c

index 326fe55..f2abca1 100644 (file)
@@ -1,6 +1,6 @@
 Name:       stc-manager
 Summary:    STC(Smart Traffic Control) manager
-Version:    0.0.47
+Version:    0.0.48
 Release:    0
 Group:      Network & Connectivity/Other
 License:    Apache-2.0
index c611d93..739417e 100644 (file)
@@ -204,7 +204,8 @@ static stc_error_e table_exceptions_foreach(const stc_exceptions_info_cb excepti
        char buf[EXCEPTION_BUF_MAX] = {0, };
 
        fp = fopen(EXCEPTION_STORAGE, "r");
-       ret_value_msg_if(!fp, STC_ERROR_FAIL, "Failed to open %s file");
+       ret_value_msg_if(!fp, STC_ERROR_FAIL, "Failed to open %s file",
+                        EXCEPTION_STORAGE);
 
        while (fgets(buf, sizeof(buf), fp) != NULL) {
                char *process_name, *exe_type;
index 0e4a384..42ea153 100644 (file)
@@ -8,14 +8,14 @@ static void _signal_cb(const gchar *signal_name, GVariant *parameters,
        STC_LOGI("[%s] received", signal_name);
 
        if (g_strcmp0(signal_name, STC_MGR_SIGNAL_RSTN_CROSSED) == 0) {
-               guint str_length;
+               gsize str_length;
                const char *app_id = g_variant_get_string(parameters,
                                                          &str_length);
 
                create_popup(user_data, POPUP_TYPE_RSTN, app_id);
 
        } else if (g_strcmp0(signal_name, STC_MGR_SIGNAL_WARN_CROSSED) == 0) {
-               guint str_length;
+               gsize str_length;
                const char *app_id = g_variant_get_string(parameters,
                                                          &str_length);
 
index aaa019d..f6822d3 100644 (file)
@@ -404,7 +404,7 @@ static gboolean __process_nl_connector_message(GIOChannel *source,
                /* G_IO_ERR/G_IO_HUP/G_IO_NVAL received */
 
                STC_LOGE("Netlink Connector socket received G_IO event, closing"
-                        " socket. G_IO_ERR [%d], G_IO_HUP [%d], G_IO_NVAL [%s]",
+                        " socket. G_IO_ERR [%u], G_IO_HUP [%u], G_IO_NVAL [%u]",
                         (condition & G_IO_ERR), (condition & G_IO_HUP),
                         (condition & G_IO_NVAL));
                __reopen_nl_connector_sock();
@@ -670,4 +670,4 @@ API stc_plugin_procfs_s stc_plugin_procfs = {
                stc_plugin_procfs_deinitialize,
        .procfs_status_changed =
                stc_plugin_procfs_status_changed
-}; 
\ No newline at end of file
+};
index 263cabb..2b58133 100644 (file)
@@ -14,6 +14,7 @@
  * limitations under the License.
  */
 
+#include <inttypes.h>
 #include <linux/netlink.h>
 #include <vconf.h>
 #include <vconf-keys.h>
@@ -463,7 +464,7 @@ static gboolean __remove_application_monitor(gpointer key, gpointer value,
 static void __print_rstn(stc_rstn_key_s *rstn_key, stc_rstn_value_s *rstn_value)
 {
        STC_LOGI("rstn info => rstn_id [%llu], "
-                "app_id [%s], classid [%lu], ifname [%s], "
+                "app_id [%s], classid [%u], ifname [%s], "
                 "iftype [%d], rst_state [%d], "
                 "limit [ (%lld) bytes], "
                 "warn_limit [ (%lld) bytes], "
@@ -853,7 +854,7 @@ static void __action_when_rstn_limit_exceeded(stc_rstn_limit_type_e limit_type,
                rstn_value->limit_notified |= (1 << limit_type);
 
        snprintf(iftype, MAX_INT_LENGTH, "%d", rstn_key->iftype);
-       snprintf(byte, MAX_INT_LENGTH, "%lld", rstn_value->limit[limit_type]);
+       snprintf(byte, MAX_INT_LENGTH, "%" PRId64, rstn_value->limit[limit_type]);
 
        stc_plugin_popup_show(net_popup_content, net_popup_type,
                              rstn_key->app_id, iftype, byte);
@@ -1295,7 +1296,7 @@ static void __fill_nfacct_result(char *cnt_name, int64_t bytes,
                return;
        }
 
-       STC_LOGI("classid %lu, iftype %u, iotype %d, intend %d, ifname %s, bytes %lld",
+       STC_LOGI("classid %u, iftype %u, iotype %d, intend %d, ifname %s, bytes %lld",
                 context.counter->classid, context.counter->iftype,
                 context.counter->iotype, context.counter->intend,
                 context.counter->ifname, context.bytes);
@@ -1380,7 +1381,7 @@ static gboolean __process_contr_reply(GIOChannel *source,
                /* G_IO_ERR/G_IO_HUP/G_IO_NVAL received */
 
                STC_LOGE("Counter socket received G_IO event, closing socket."
-                        "G_IO_ERR [%d], G_IO_HUP [%d], G_IO_NVAL [%s]",
+                        "G_IO_ERR [%u], G_IO_HUP [%u], G_IO_NVAL [%u]",
                         (condition & G_IO_ERR), (condition & G_IO_HUP),
                         (condition & G_IO_NVAL));
                __close_and_reopen_contr_sock(g_system);
index e624d11..6a4f7ab 100644 (file)
@@ -194,7 +194,7 @@ static void __stc_extract_restriction_rule(const char *key, GVariant *value,
                guint str_length;
                const gchar *str = g_variant_get_string(value, &str_length);
                rule->app_id = g_strdup(str);
-               STC_LOGD("app_id: [%s]", (unsigned int) rule->app_id);
+               STC_LOGD("app_id: [%s]", rule->app_id);
 
        } else if (!g_strcmp0(key, "ifname")) {
                guint str_length;