diff options
author | Sung-hun Kim <sfoon.kim@samsung.com> | 2023-02-27 19:25:23 +0900 |
---|---|---|
committer | Sung-hun Kim <sfoon.kim@samsung.com> | 2023-02-28 16:55:45 +0900 |
commit | 43747fd448e6cef4a34448dca166ad5cd548de28 (patch) | |
tree | 60e3287b7c70ed769067aff0be279388653e490b | |
parent | bc8980be43d5bc197e0fc49c2906fab46c0ca1c1 (diff) | |
download | ttrace-43747fd448e6cef4a34448dca166ad5cd548de28.tar.gz ttrace-43747fd448e6cef4a34448dca166ad5cd548de28.tar.bz2 ttrace-43747fd448e6cef4a34448dca166ad5cd548de28.zip |
Fix build errors for TTRACE_DEBUG
Due to the formatting error, ttrace package cannot be built
if TTRACE_DEBUG is defined. This patch fixes this errors by
applying proper formats.
Change-Id: If949de75f3c3cf436a76749770f381651b40a9a9
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
-rwxr-xr-x | src/ttrace.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/ttrace.c b/src/ttrace.c index 361962d..426d272 100755 --- a/src/ttrace.c +++ b/src/ttrace.c @@ -114,7 +114,7 @@ static uint64_t traceInit() /* LCOV_EXCL_STOP */ } } - TTRACE_LOG("traceInit:: cur_enabled_tag >> %u", *cur_enabled_tag); + TTRACE_LOG("traceInit:: cur_enabled_tag >> %" PRIu64, *cur_enabled_tag); return *cur_enabled_tag; } @@ -156,7 +156,7 @@ void traceBegin(uint64_t tag, const char *name, ...) int len = MAX_HEAD_LEN, ret = 0; va_list ap; - TTRACE_LOG("traceBegin:: write >> tag: %u tag_bit: %u", tag, *cur_enabled_tag); + TTRACE_LOG("traceBegin:: write >> tag: %" PRIu64 " tag_bit: %" PRIu64, tag, *cur_enabled_tag); va_start(ap, name); snprintf(buf, MAX_LEN, "B|%5d|", getpid()); @@ -176,7 +176,7 @@ void traceBegin(uint64_t tag, const char *name, ...) /* LCOV_EXCL_STOP */ } else - TTRACE_LOG("traceBegin:: disabled tag >> tag: %u tag_bit: %u", tag, *cur_enabled_tag); + TTRACE_LOG("traceBegin:: disabled tag >> tag: %" PRIu64 " tag_bit: %" PRIu64, tag, *cur_enabled_tag); } void traceEnd(uint64_t tag) @@ -185,7 +185,7 @@ void traceEnd(uint64_t tag) int ret = 0; int len = 1; char end = 'E'; - TTRACE_LOG("traceEnd:: write>> tag: %u tag_bit: %u", tag, *cur_enabled_tag); + TTRACE_LOG("traceEnd:: write>> tag: %" PRIu64 " tag_bit: %" PRIu64, tag, *cur_enabled_tag); if (check_params(g_trace_handle_fd, &end, len, __func__) < 0) return; @@ -196,7 +196,7 @@ void traceEnd(uint64_t tag) len, ret, errno); } else - TTRACE_LOG("traceEnd:: disabled tag >> tag: %u tag_bit: %u", tag, *cur_enabled_tag); + TTRACE_LOG("traceEnd:: disabled tag >> tag: %" PRIu64 " tag_bit: %" PRIu64, tag, *cur_enabled_tag); } /* @@ -213,7 +213,7 @@ void traceAsyncBegin(uint64_t tag, int32_t cookie, const char *name, ...) int len = MAX_HEAD_LEN, ret = 0; va_list ap; - TTRACE_LOG("traceAsyncBegin:: write >> tag: %u tag_bit: %u cookie: %d", tag, *cur_enabled_tag, cookie); + TTRACE_LOG("traceAsyncBegin:: write >> tag: %" PRIu64 " tag_bit: %" PRIu64 " cookie: %d", tag, *cur_enabled_tag, cookie); va_start(ap, name); snprintf(buf, MAX_LEN, "S|%5d|", getpid()); @@ -237,7 +237,7 @@ void traceAsyncBegin(uint64_t tag, int32_t cookie, const char *name, ...) len, ret, errno); } else - TTRACE_LOG("traceAsyncBegin:: disabled tag >> tag: %u tag_bit: %u", tag, *cur_enabled_tag); + TTRACE_LOG("traceAsyncBegin:: disabled tag >> tag: %" PRIu64 "tag_bit: %" PRIu64, tag, *cur_enabled_tag); } void traceAsyncEnd(uint64_t tag, int32_t cookie, const char *name, ...) @@ -247,7 +247,7 @@ void traceAsyncEnd(uint64_t tag, int32_t cookie, const char *name, ...) int len = MAX_HEAD_LEN, ret = 0; va_list ap; - TTRACE_LOG("traceAsyncEnd:: write>> tag: %u tag_bit: %u", tag, *cur_enabled_tag); + TTRACE_LOG("traceAsyncEnd:: write>> tag: %" PRIu64 " tag_bit: %" PRIu64, tag, *cur_enabled_tag); va_start(ap, name); snprintf(buf, MAX_LEN, "F|%5d|", getpid()); len += vsnprintf(buf + MAX_HEAD_LEN, POS_LABEL_ST, name, ap); @@ -270,7 +270,7 @@ void traceAsyncEnd(uint64_t tag, int32_t cookie, const char *name, ...) len, ret, errno); } else - TTRACE_LOG("traceAsyncEnd:: disabled tag >> tag: %u tag_bit: %u", tag, *cur_enabled_tag); + TTRACE_LOG("traceAsyncEnd:: disabled tag >> tag: %" PRIu64 " tag_bit: %" PRIu64, tag, *cur_enabled_tag); } /* @@ -286,7 +286,7 @@ void traceMark(uint64_t tag, const char *name, ...) int len = MAX_HEAD_LEN, ret = 0; va_list ap; - TTRACE_LOG("traceMark:: write >> tag: %u tag_bit: %u", tag, *cur_enabled_tag); + TTRACE_LOG("traceMark:: write >> tag: %" PRIu64 " tag_bit: %" PRIu64, tag, *cur_enabled_tag); va_start(ap, name); snprintf(buf, MAX_LEN, "B|%5d|", getpid()); len += vsnprintf(buf + MAX_HEAD_LEN, POS_LABEL_ST, name, ap); @@ -311,7 +311,7 @@ void traceMark(uint64_t tag, const char *name, ...) len, ret, errno); } else - TTRACE_LOG("traceMark:: disabled tag >> tag: %u tag_bit: %u", tag, *cur_enabled_tag); + TTRACE_LOG("traceMark:: disabled tag >> tag: %" PRIu64 " tag_bit: %" PRIu64, tag, *cur_enabled_tag); } /* LCOV_EXCL_STOP */ |