am 8fb22ae7: am eee2c72f: Merge "Various format string fixes for 64bit"

* commit '8fb22ae772fc62a10db6a06f283140d9233e8704':
  Various format string fixes for 64bit
This commit is contained in:
Narayan Kamath
2014-02-28 13:46:53 +00:00
committed by Android Git Automerger
2 changed files with 7 additions and 6 deletions

View File

@@ -18,6 +18,7 @@
#define LOG_TAG "AudioRecord-JNI" #define LOG_TAG "AudioRecord-JNI"
#include <inttypes.h>
#include <jni.h> #include <jni.h>
#include <JNIHelp.h> #include <JNIHelp.h>
#include <android_runtime/AndroidRuntime.h> #include <android_runtime/AndroidRuntime.h>
@@ -316,7 +317,7 @@ static void android_media_AudioRecord_release(JNIEnv *env, jobject thiz) {
if (lpRecorder == NULL) { if (lpRecorder == NULL) {
return; return;
} }
ALOGV("About to delete lpRecorder: %x\n", (int)lpRecorder.get()); ALOGV("About to delete lpRecorder: %" PRIxPTR "\n", lpRecorder.get());
lpRecorder->stop(); lpRecorder->stop();
audiorecord_callback_cookie *lpCookie = (audiorecord_callback_cookie *)env->GetLongField( audiorecord_callback_cookie *lpCookie = (audiorecord_callback_cookie *)env->GetLongField(
@@ -329,7 +330,7 @@ static void android_media_AudioRecord_release(JNIEnv *env, jobject thiz) {
// delete the callback information // delete the callback information
if (lpCookie) { if (lpCookie) {
Mutex::Autolock l(sLock); Mutex::Autolock l(sLock);
ALOGV("deleting lpCookie: %x\n", (int)lpCookie); ALOGV("deleting lpCookie: %" PRIxPTR "\n", lpCookie);
while (lpCookie->busy) { while (lpCookie->busy) {
if (lpCookie->cond.waitRelative(sLock, if (lpCookie->cond.waitRelative(sLock,
milliseconds(CALLBACK_COND_WAIT_TIMEOUT_MS)) != milliseconds(CALLBACK_COND_WAIT_TIMEOUT_MS)) !=

View File

@@ -1083,7 +1083,7 @@ backup_helper_test_four()
} }
if (readSnapshot.size() != 4) { 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; return 1;
} }
@@ -1095,8 +1095,8 @@ backup_helper_test_four()
if (name != filenames[i] || states[i].modTime_sec != state.modTime_sec 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].modTime_nsec != state.modTime_nsec || states[i].mode != state.mode
|| states[i].size != state.size || states[i].crc32 != states[i].crc32) { || 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" fprintf(stderr, "state %zu expected={%d/%d, 0x%08x, %04o, 0x%08x, %3d} '%s'\n"
" actual={%d/%d, 0x%08x, %04o, 0x%08x, %3d} '%s'\n", i, " 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].modTime_sec, states[i].modTime_nsec, states[i].mode, states[i].size,
states[i].crc32, name.length(), filenames[i].string(), states[i].crc32, name.length(), filenames[i].string(),
state.modTime_sec, state.modTime_nsec, state.mode, state.size, state.crc32, 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; goto finished;
} }
if ((int)actualSize != bufSize) { 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); actualSize);
err = EINVAL; err = EINVAL;
goto finished; goto finished;