summaryrefslogtreecommitdiff
path: root/libs/utils/Static.cpp
diff options
context:
space:
mode:
author Andrew Hsieh <andrewhsieh@google.com> 2012-02-27 18:50:55 -0800
committer Andrew Hsieh <andrewhsieh@google.com> 2012-02-27 18:50:55 -0800
commit0ae8c14b4b915b318250484eff9a18700cd934c3 (patch)
tree7c965580c9c77a836f128d6a587a62e1810b769b /libs/utils/Static.cpp
parenta05349407d54379822e55cf0672e15d5cf3b3c9b (diff)
Fixed several 64-bit porting issues
1. Use "%zu" instead of "%d" for size_t in printf 2. Variable precision specifier (eg. "%.*s") in printf should be of type int. (iov_len is size_t which is 64-bit when compiled with -m64) 3. Use PRId64 instead of "%lld" to print variables of type int64_t Change-Id: I2be40a6514b5dffa0038d62b9bccc3401b8756e6
Diffstat (limited to 'libs/utils/Static.cpp')
-rw-r--r--libs/utils/Static.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/utils/Static.cpp b/libs/utils/Static.cpp
index bfcb2da456..624e917aec 100644
--- a/libs/utils/Static.cpp
+++ b/libs/utils/Static.cpp
@@ -57,8 +57,8 @@ protected:
virtual status_t writeLines(const struct iovec& vec, size_t N)
{
//android_writevLog(&vec, N); <-- this is now a no-op
- if (N != 1) ALOGI("WARNING: writeLines N=%d\n", N);
- ALOGI("%.*s", vec.iov_len, (const char*) vec.iov_base);
+ if (N != 1) ALOGI("WARNING: writeLines N=%zu\n", N);
+ ALOGI("%.*s", (int)vec.iov_len, (const char*) vec.iov_base);
return NO_ERROR;
}
};