diff options
Diffstat (limited to 'libs/common_time')
-rw-r--r-- | libs/common_time/common_time_server.cpp | 2 | ||||
-rw-r--r-- | libs/common_time/utils.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libs/common_time/common_time_server.cpp b/libs/common_time/common_time_server.cpp index 21e706f..3e11987 100644 --- a/libs/common_time/common_time_server.cpp +++ b/libs/common_time/common_time_server.cpp @@ -590,7 +590,7 @@ static void hexDumpToString(const uint8_t* src, size_t src_len, for (i = 0; (i < src_len) && (offset < dst_len); ++i) { int res; if (0 == (i % 16)) { - res = snprintf(dst + offset, dst_len - offset, "\n%04x :", i); + res = snprintf(dst + offset, dst_len - offset, "\n%04zx :", i); if (res < 0) break; offset += res; diff --git a/libs/common_time/utils.cpp b/libs/common_time/utils.cpp index ed2c77d..ddcdfe7 100644 --- a/libs/common_time/utils.cpp +++ b/libs/common_time/utils.cpp @@ -56,7 +56,7 @@ LogRing::LogRing(const char* header, size_t entries) , mHeader(header) { mRingBuffer = new Entry[mSize]; if (NULL == mRingBuffer) - ALOGE("Failed to allocate log ring with %u entries.", mSize); + ALOGE("Failed to allocate log ring with %zu entries.", mSize); } LogRing::~LogRing() { @@ -150,7 +150,7 @@ void LogRing::dumpLog(int fd) { localtime_r(&mRingBuffer[ndx].first_ts.tv_sec, &t); strftime(timebuf, sizeof(timebuf), kTimeFmt, &t); - res = snprintf(buf, sizeof(buf), "[%2d] %s.%03ld :: %s%s\n", + res = snprintf(buf, sizeof(buf), "[%2zu] %s.%03ld :: %s%s\n", i, timebuf, mRingBuffer[ndx].first_ts.tv_usec / 1000, mRingBuffer[ndx].s.string(), |