summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2014-02-28 13:53:15 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-02-28 13:53:15 +0000
commite0d10cd92369d56e593e8592084024d1cd1655db (patch)
tree88715c25831a7c609c197bb4b30dd1eeea7f70fd
parent11e4317555fdabeecf28fe8a70bfecb216224ad1 (diff)
parentd8ccf8b789461e1706d10df44d109849fa974fc5 (diff)
downloadframeworks_base-e0d10cd92369d56e593e8592084024d1cd1655db.zip
frameworks_base-e0d10cd92369d56e593e8592084024d1cd1655db.tar.gz
frameworks_base-e0d10cd92369d56e593e8592084024d1cd1655db.tar.bz2
am d8ccf8b7: am be094d89: am 8fb22ae7: am eee2c72f: Merge "Various format string fixes for 64bit"
* commit 'd8ccf8b789461e1706d10df44d109849fa974fc5': Various format string fixes for 64bit
-rw-r--r--core/jni/android_media_AudioRecord.cpp5
-rw-r--r--libs/androidfw/BackupHelpers.cpp8
2 files changed, 7 insertions, 6 deletions
diff --git a/core/jni/android_media_AudioRecord.cpp b/core/jni/android_media_AudioRecord.cpp
index 9c357de..0132b5f 100644
--- a/core/jni/android_media_AudioRecord.cpp
+++ b/core/jni/android_media_AudioRecord.cpp
@@ -18,6 +18,7 @@
#define LOG_TAG "AudioRecord-JNI"
+#include <inttypes.h>
#include <jni.h>
#include <JNIHelp.h>
#include <android_runtime/AndroidRuntime.h>
@@ -311,7 +312,7 @@ static void android_media_AudioRecord_release(JNIEnv *env, jobject thiz) {
if (lpRecorder == NULL) {
return;
}
- ALOGV("About to delete lpRecorder: %x\n", (int)lpRecorder.get());
+ ALOGV("About to delete lpRecorder: %" PRIxPTR "\n", lpRecorder.get());
lpRecorder->stop();
audiorecord_callback_cookie *lpCookie = (audiorecord_callback_cookie *)env->GetLongField(
@@ -324,7 +325,7 @@ static void android_media_AudioRecord_release(JNIEnv *env, jobject thiz) {
// delete the callback information
if (lpCookie) {
Mutex::Autolock l(sLock);
- ALOGV("deleting lpCookie: %x\n", (int)lpCookie);
+ ALOGV("deleting lpCookie: %" PRIxPTR "\n", lpCookie);
while (lpCookie->busy) {
if (lpCookie->cond.waitRelative(sLock,
milliseconds(CALLBACK_COND_WAIT_TIMEOUT_MS)) !=
diff --git a/libs/androidfw/BackupHelpers.cpp b/libs/androidfw/BackupHelpers.cpp
index b8d3f48..302fbf6 100644
--- a/libs/androidfw/BackupHelpers.cpp
+++ b/libs/androidfw/BackupHelpers.cpp
@@ -1083,7 +1083,7 @@ backup_helper_test_four()
}
if (readSnapshot.size() != 4) {
- fprintf(stderr, "readSnapshot should be length 4 is %d\n", readSnapshot.size());
+ fprintf(stderr, "readSnapshot should be length 4 is %zu\n", readSnapshot.size());
return 1;
}
@@ -1095,8 +1095,8 @@ backup_helper_test_four()
if (name != filenames[i] || states[i].modTime_sec != state.modTime_sec
|| states[i].modTime_nsec != state.modTime_nsec || states[i].mode != state.mode
|| states[i].size != state.size || states[i].crc32 != states[i].crc32) {
- fprintf(stderr, "state %d expected={%d/%d, 0x%08x, %04o, 0x%08x, %3d} '%s'\n"
- " actual={%d/%d, 0x%08x, %04o, 0x%08x, %3d} '%s'\n", i,
+ fprintf(stderr, "state %zu expected={%d/%d, 0x%08x, %04o, 0x%08x, %3d} '%s'\n"
+ " actual={%d/%d, 0x%08x, %04o, 0x%08x, %3zu} '%s'\n", i,
states[i].modTime_sec, states[i].modTime_nsec, states[i].mode, states[i].size,
states[i].crc32, name.length(), filenames[i].string(),
state.modTime_sec, state.modTime_nsec, state.mode, state.size, state.crc32,
@@ -1230,7 +1230,7 @@ test_read_header_and_entity(BackupDataReader& reader, const char* str)
goto finished;
}
if ((int)actualSize != bufSize) {
- fprintf(stderr, "ReadEntityHeader expected dataSize 0x%08x got 0x%08x\n", bufSize,
+ fprintf(stderr, "ReadEntityHeader expected dataSize 0x%08x got 0x%08zx\n", bufSize,
actualSize);
err = EINVAL;
goto finished;