[Wformat] Fix Wformat build error 93/179393/1 submit/tizen/20180518.112755
authorNishant Chaprana <n.chaprana@samsung.com>
Thu, 17 May 2018 12:49:39 +0000 (18:19 +0530)
committerNishant Chaprana <n.chaprana@samsung.com>
Thu, 17 May 2018 12:49:39 +0000 (18:19 +0530)
Change-Id: I418e75c7f403d1ee1d54f8236b39f20977513aab
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
packaging/stc-manager.spec
plugin/exception/stc-plugin-exception.c
plugin/procfs/stc-plugin-procfs.c
src/monitor/stc-monitor.c
src/stc-restriction.c

index bb6a9c1..de1f0c8 100644 (file)
@@ -1,6 +1,6 @@
 Name:       stc-manager
 Summary:    STC(Smart Traffic Control) manager
-Version:    0.0.63
+Version:    0.0.64
 Release:    0
 Group:      Network & Connectivity/Other
 License:    Apache-2.0
index 783bc4f..db22b2f 100755 (executable)
@@ -205,7 +205,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 df69301..df2c195 100755 (executable)
@@ -406,7 +406,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();
index 62a0c20..adb79a2 100755 (executable)
@@ -477,7 +477,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], rstn_state [%d], rstn_type [%d], "
                 "limit [ (%lld) bytes], "
                 "warn_limit [ (%lld) bytes], "
@@ -1158,7 +1158,7 @@ static void __fill_nfacct_result(char *cnt_name, int64_t bytes,
                return; //LCOV_EXCL_LINE
        }
 
-       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);
@@ -1248,7 +1248,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." //LCOV_EXCL_LINE
-                        "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); //LCOV_EXCL_LINE
index 242cdcb..d4353ea 100755 (executable)
@@ -178,7 +178,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;