From ffa8b66c00e286f3dabfbfba407f33781f0b7653 Mon Sep 17 00:00:00 2001 From: Youngjae Cho Date: Thu, 16 Dec 2021 16:43:20 +0900 Subject: [PATCH] Fix format specifier of type uint64_t Change-Id: Icaf193fbd700ece2d74482627cf9b3f54441f671 Signed-off-by: Youngjae Cho --- plugins/iot-headless/power/power-state-wait.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/plugins/iot-headless/power/power-state-wait.c b/plugins/iot-headless/power/power-state-wait.c index a1c5e88..bdd7152 100644 --- a/plugins/iot-headless/power/power-state-wait.c +++ b/plugins/iot-headless/power/power-state-wait.c @@ -1,5 +1,6 @@ #include #include +#include #include #include @@ -57,7 +58,7 @@ static gboolean max_wait_expired_cb(void *data) if (kill(csw->pi->pid, 0) != 0) csw->pi->killed = 1; else - _E("pid=%d(%s) hasn't confirmed id=%ld(%s)", csw->pi->pid, csw->pi->comm, csw->id, psm_name[csw->state]); + _E("pid=%d(%s) hasn't confirmed id=%"PRIu64"(%s)", csw->pi->pid, csw->pi->comm, csw->id, psm_name[csw->state]); waiting_list = g_list_remove_link(waiting_list, elem); g_list_free(elem); free(csw); @@ -82,7 +83,7 @@ int add_change_state_wait(pid_t pid, guint64 state) struct proc_info *pi; GList *elem; - _D("pid=%d added csw for %#lx", pid, state); + _D("pid=%d added csw for %#"PRIx64, pid, state); SYS_G_LIST_FOREACH(proc_list, elem, pi) { if (pi->pid == pid) { @@ -108,7 +109,7 @@ void remove_change_state_wait(pid_t pid, guint64 state) struct proc_info *pi; GList *elem, *elem_next; - _D("pid=%d removed csw for %#lx", pid, state); + _D("pid=%d removed csw for %#"PRIx64, pid, state); SYS_G_LIST_FOREACH_SAFE(proc_list, elem, elem_next, pi) { if (pi->pid == pid) { @@ -129,7 +130,7 @@ int confirm_change_state_wait(pid_t pid, guint64 id) SYS_G_LIST_FOREACH_SAFE(waiting_list, elem, elem_next, csw) { if (csw->pi->pid == pid && csw->id == id) { - _D("pid=%d(%s) confirmed id=%lu(%s)", csw->pi->pid, csw->pi->comm, csw->id, psm_name[csw->state]); + _D("pid=%d(%s) confirmed id=%"PRIu64"(%s)", csw->pi->pid, csw->pi->comm, csw->id, psm_name[csw->state]); waiting_list = g_list_remove_link(waiting_list, elem); g_list_free(elem); free(csw); @@ -176,14 +177,14 @@ int update_change_state_wait(guint64 id, const struct trans_info *ti, change_sta // we are waiting for confirm of transition to the next state waiting_state = ti->next; - _D("%s wait is triggered, id=%ld", psm_name[waiting_state], id); + _D("%s wait is triggered, id=%"PRIu64, psm_name[waiting_state], id); // cancel all ongoing csw that is not a waiting for the next state SYS_G_LIST_FOREACH_SAFE(waiting_list, elem, elem_next, csw) { if (csw->state != waiting_state) { waiting_list = g_list_remove_link(waiting_list, elem); g_list_free(elem); - _D("Cancel waiting: pid=%d(%s) for id=%ld(%s)", csw->pi->pid, csw->pi->comm, csw->id, psm_name[csw->state]); + _D("Cancel waiting: pid=%d(%s) for id=%"PRIu64"(%s)", csw->pi->pid, csw->pi->comm, csw->id, psm_name[csw->state]); free(csw); } } -- 2.7.4