Loading core/jni/android_database_CursorWindow.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #undef LOG_TAG #define LOG_TAG "CursorWindow" #include <inttypes.h> #include <jni.h> #include <JNIHelp.h> #include <android_runtime/AndroidRuntime.h> Loading Loading @@ -225,7 +226,7 @@ static jstring nativeGetString(JNIEnv* env, jclass clazz, jlong windowPtr, } else if (type == CursorWindow::FIELD_TYPE_INTEGER) { int64_t value = window->getFieldSlotValueLong(fieldSlot); char buf[32]; snprintf(buf, sizeof(buf), "%lld", value); snprintf(buf, sizeof(buf), "%" PRId64, value); return env->NewStringUTF(buf); } else if (type == CursorWindow::FIELD_TYPE_FLOAT) { double value = window->getFieldSlotValueDouble(fieldSlot); Loading Loading @@ -314,7 +315,7 @@ static void nativeCopyStringToBuffer(JNIEnv* env, jclass clazz, jlong windowPtr, } else if (type == CursorWindow::FIELD_TYPE_INTEGER) { int64_t value = window->getFieldSlotValueLong(fieldSlot); char buf[32]; snprintf(buf, sizeof(buf), "%lld", value); snprintf(buf, sizeof(buf), "%" PRId64, value); fillCharArrayBufferUTF(env, bufferObj, buf, strlen(buf)); } else if (type == CursorWindow::FIELD_TYPE_FLOAT) { double value = window->getFieldSlotValueDouble(fieldSlot); Loading core/jni/android_net_TrafficStats.cpp +9 −6 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <dirent.h> #include <errno.h> #include <fcntl.h> #include <inttypes.h> #include <sys/stat.h> #include <sys/types.h> Loading Loading @@ -85,9 +86,9 @@ static int parseIfaceStats(const char* iface, struct Stats* stats) { uint64_t rxBytes, rxPackets, txBytes, txPackets, tcpRxPackets, tcpTxPackets; while (fgets(buffer, sizeof(buffer), fp) != NULL) { int matched = sscanf(buffer, "%31s %llu %llu %llu %llu " "%*u %llu %*u %*u %*u %*u " "%*u %llu %*u %*u %*u %*u", cur_iface, &rxBytes, int matched = sscanf(buffer, "%31s %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 " " "%*u %" SCNu64 " %*u %*u %*u %*u " "%*u %" SCNu64 " %*u %*u %*u %*u", cur_iface, &rxBytes, &rxPackets, &txBytes, &txPackets, &tcpRxPackets, &tcpTxPackets); if (matched >= 5) { if (matched == 7) { Loading Loading @@ -129,9 +130,11 @@ static int parseUidStats(const uint32_t uid, struct Stats* stats) { uint64_t tag, rxBytes, rxPackets, txBytes, txPackets; while (fgets(buffer, sizeof(buffer), fp) != NULL) { if (sscanf(buffer, "%d %31s 0x%llx %u %u %llu %llu %llu %llu", &idx, iface, &tag, &cur_uid, &set, &rxBytes, &rxPackets, &txBytes, &txPackets) == 9) { if (sscanf(buffer, "%" SCNu32 " %31s 0x%" SCNx64 " %u %u %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 "", &idx, iface, &tag, &cur_uid, &set, &rxBytes, &rxPackets, &txBytes, &txPackets) == 9) { if (uid == cur_uid && tag == 0L) { stats->rxBytes += rxBytes; stats->rxPackets += rxPackets; Loading core/jni/android_os_Debug.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ #include <cutils/log.h> #include <fcntl.h> #include <inttypes.h> #include <stdio.h> #include <stdlib.h> #include <string.h> Loading Loading @@ -824,9 +825,9 @@ static void dumpNativeHeap(FILE* fp) break; } else { #ifdef __LP64__ fprintf(fp, " %016x", backtrace[bt]); fprintf(fp, " %016" PRIxPTR, backtrace[bt]); #else fprintf(fp, " %08x", backtrace[bt]); fprintf(fp, " %08" PRIxPTR, backtrace[bt]); #endif } } Loading media/jni/android_media_MediaRecorder.cpp +8 −6 Original line number Diff line number Diff line Loading @@ -14,6 +14,13 @@ * limitations under the License. */ #include <assert.h> #include <fcntl.h> #include <inttypes.h> #include <limits.h> #include <stdio.h> #include <unistd.h> //#define LOG_NDEBUG 0 #define LOG_TAG "MediaRecorderJNI" #include <utils/Log.h> Loading @@ -22,11 +29,6 @@ #include <camera/ICameraService.h> #include <camera/Camera.h> #include <media/mediarecorder.h> #include <stdio.h> #include <assert.h> #include <limits.h> #include <unistd.h> #include <fcntl.h> #include <utils/threads.h> #include "jni.h" Loading Loading @@ -303,7 +305,7 @@ android_media_MediaRecorder_setMaxFileSize( sp<MediaRecorder> mr = getMediaRecorder(env, thiz); char params[64]; sprintf(params, "max-filesize=%lld", max_filesize_bytes); sprintf(params, "max-filesize=%" PRId64, max_filesize_bytes); process_media_recorder_call(env, mr->setParameters(String8(params)), "java/lang/RuntimeException", "setMaxFileSize failed."); } Loading media/jni/mediaeditor/VideoEditorMain.cpp +5 −4 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ #define LOG_NDEBUG 1 #define LOG_TAG "VideoEditorMain" #include <dlfcn.h> #include <inttypes.h> #include <stdio.h> #include <unistd.h> #include <utils/Log.h> Loading Loading @@ -3371,7 +3372,7 @@ M4OSA_ERR M4MA_generateAudioGraphFile(JNIEnv* pEnv, M4OSA_Char* pInputFileURL, err = M4OSA_fileReadOpen (&inputFileHandle, pInputFileURL, M4OSA_kFileRead); if (inputFileHandle == M4OSA_NULL) { VIDEOEDIT_LOG_ERROR(ANDROID_LOG_INFO, "VIDEO_EDITOR", "M4MA_generateAudioGraphFile: Cannot open input file 0x%lx", err); "M4MA_generateAudioGraphFile: Cannot open input file 0x%" PRIx32, err); return err; } Loading Loading @@ -3405,7 +3406,7 @@ M4OSA_ERR M4MA_generateAudioGraphFile(JNIEnv* pEnv, M4OSA_Char* pInputFileURL, bufferIn.m_bufferSize = samplesCountInBytes*sizeof(M4OSA_UInt16); } else { VIDEOEDIT_LOG_ERROR(ANDROID_LOG_INFO, "VIDEO_EDITOR", "M4MA_generateAudioGraphFile: Malloc failed for bufferIn.m_dataAddress 0x%lx", "M4MA_generateAudioGraphFile: Malloc failed for bufferIn.m_dataAddress 0x%" PRIx32, M4ERR_ALLOC); return M4ERR_ALLOC; } Loading Loading @@ -3445,7 +3446,7 @@ M4OSA_ERR M4MA_generateAudioGraphFile(JNIEnv* pEnv, M4OSA_Char* pInputFileURL, if (err != M4NO_ERROR) { // if out value of bytes-read is 0, break if ( numBytesToRead == 0) { VIDEOEDIT_LOG_ERROR(ANDROID_LOG_INFO, "VIDEO_EDITOR", "numBytesToRead 0x%lx", VIDEOEDIT_LOG_ERROR(ANDROID_LOG_INFO, "VIDEO_EDITOR", "numBytesToRead 0x%" PRIx32, numBytesToRead); break; /* stop if file is empty or EOF */ } Loading Loading @@ -3497,7 +3498,7 @@ M4OSA_ERR M4MA_generateAudioGraphFile(JNIEnv* pEnv, M4OSA_Char* pInputFileURL, } while (numBytesToRead != 0); VIDEOEDIT_LOG_ERROR(ANDROID_LOG_INFO, "VIDEO_EDITOR", "loop 0x%lx", volumeValuesCount); VIDEOEDIT_LOG_ERROR(ANDROID_LOG_INFO, "VIDEO_EDITOR", "loop 0x%" PRIx32, volumeValuesCount); /* if some error occured in fwrite */ if (numBytesToRead != 0) { Loading Loading
core/jni/android_database_CursorWindow.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #undef LOG_TAG #define LOG_TAG "CursorWindow" #include <inttypes.h> #include <jni.h> #include <JNIHelp.h> #include <android_runtime/AndroidRuntime.h> Loading Loading @@ -225,7 +226,7 @@ static jstring nativeGetString(JNIEnv* env, jclass clazz, jlong windowPtr, } else if (type == CursorWindow::FIELD_TYPE_INTEGER) { int64_t value = window->getFieldSlotValueLong(fieldSlot); char buf[32]; snprintf(buf, sizeof(buf), "%lld", value); snprintf(buf, sizeof(buf), "%" PRId64, value); return env->NewStringUTF(buf); } else if (type == CursorWindow::FIELD_TYPE_FLOAT) { double value = window->getFieldSlotValueDouble(fieldSlot); Loading Loading @@ -314,7 +315,7 @@ static void nativeCopyStringToBuffer(JNIEnv* env, jclass clazz, jlong windowPtr, } else if (type == CursorWindow::FIELD_TYPE_INTEGER) { int64_t value = window->getFieldSlotValueLong(fieldSlot); char buf[32]; snprintf(buf, sizeof(buf), "%lld", value); snprintf(buf, sizeof(buf), "%" PRId64, value); fillCharArrayBufferUTF(env, bufferObj, buf, strlen(buf)); } else if (type == CursorWindow::FIELD_TYPE_FLOAT) { double value = window->getFieldSlotValueDouble(fieldSlot); Loading
core/jni/android_net_TrafficStats.cpp +9 −6 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <dirent.h> #include <errno.h> #include <fcntl.h> #include <inttypes.h> #include <sys/stat.h> #include <sys/types.h> Loading Loading @@ -85,9 +86,9 @@ static int parseIfaceStats(const char* iface, struct Stats* stats) { uint64_t rxBytes, rxPackets, txBytes, txPackets, tcpRxPackets, tcpTxPackets; while (fgets(buffer, sizeof(buffer), fp) != NULL) { int matched = sscanf(buffer, "%31s %llu %llu %llu %llu " "%*u %llu %*u %*u %*u %*u " "%*u %llu %*u %*u %*u %*u", cur_iface, &rxBytes, int matched = sscanf(buffer, "%31s %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 " " "%*u %" SCNu64 " %*u %*u %*u %*u " "%*u %" SCNu64 " %*u %*u %*u %*u", cur_iface, &rxBytes, &rxPackets, &txBytes, &txPackets, &tcpRxPackets, &tcpTxPackets); if (matched >= 5) { if (matched == 7) { Loading Loading @@ -129,9 +130,11 @@ static int parseUidStats(const uint32_t uid, struct Stats* stats) { uint64_t tag, rxBytes, rxPackets, txBytes, txPackets; while (fgets(buffer, sizeof(buffer), fp) != NULL) { if (sscanf(buffer, "%d %31s 0x%llx %u %u %llu %llu %llu %llu", &idx, iface, &tag, &cur_uid, &set, &rxBytes, &rxPackets, &txBytes, &txPackets) == 9) { if (sscanf(buffer, "%" SCNu32 " %31s 0x%" SCNx64 " %u %u %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 "", &idx, iface, &tag, &cur_uid, &set, &rxBytes, &rxPackets, &txBytes, &txPackets) == 9) { if (uid == cur_uid && tag == 0L) { stats->rxBytes += rxBytes; stats->rxPackets += rxPackets; Loading
core/jni/android_os_Debug.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ #include <cutils/log.h> #include <fcntl.h> #include <inttypes.h> #include <stdio.h> #include <stdlib.h> #include <string.h> Loading Loading @@ -824,9 +825,9 @@ static void dumpNativeHeap(FILE* fp) break; } else { #ifdef __LP64__ fprintf(fp, " %016x", backtrace[bt]); fprintf(fp, " %016" PRIxPTR, backtrace[bt]); #else fprintf(fp, " %08x", backtrace[bt]); fprintf(fp, " %08" PRIxPTR, backtrace[bt]); #endif } } Loading
media/jni/android_media_MediaRecorder.cpp +8 −6 Original line number Diff line number Diff line Loading @@ -14,6 +14,13 @@ * limitations under the License. */ #include <assert.h> #include <fcntl.h> #include <inttypes.h> #include <limits.h> #include <stdio.h> #include <unistd.h> //#define LOG_NDEBUG 0 #define LOG_TAG "MediaRecorderJNI" #include <utils/Log.h> Loading @@ -22,11 +29,6 @@ #include <camera/ICameraService.h> #include <camera/Camera.h> #include <media/mediarecorder.h> #include <stdio.h> #include <assert.h> #include <limits.h> #include <unistd.h> #include <fcntl.h> #include <utils/threads.h> #include "jni.h" Loading Loading @@ -303,7 +305,7 @@ android_media_MediaRecorder_setMaxFileSize( sp<MediaRecorder> mr = getMediaRecorder(env, thiz); char params[64]; sprintf(params, "max-filesize=%lld", max_filesize_bytes); sprintf(params, "max-filesize=%" PRId64, max_filesize_bytes); process_media_recorder_call(env, mr->setParameters(String8(params)), "java/lang/RuntimeException", "setMaxFileSize failed."); } Loading
media/jni/mediaeditor/VideoEditorMain.cpp +5 −4 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ #define LOG_NDEBUG 1 #define LOG_TAG "VideoEditorMain" #include <dlfcn.h> #include <inttypes.h> #include <stdio.h> #include <unistd.h> #include <utils/Log.h> Loading Loading @@ -3371,7 +3372,7 @@ M4OSA_ERR M4MA_generateAudioGraphFile(JNIEnv* pEnv, M4OSA_Char* pInputFileURL, err = M4OSA_fileReadOpen (&inputFileHandle, pInputFileURL, M4OSA_kFileRead); if (inputFileHandle == M4OSA_NULL) { VIDEOEDIT_LOG_ERROR(ANDROID_LOG_INFO, "VIDEO_EDITOR", "M4MA_generateAudioGraphFile: Cannot open input file 0x%lx", err); "M4MA_generateAudioGraphFile: Cannot open input file 0x%" PRIx32, err); return err; } Loading Loading @@ -3405,7 +3406,7 @@ M4OSA_ERR M4MA_generateAudioGraphFile(JNIEnv* pEnv, M4OSA_Char* pInputFileURL, bufferIn.m_bufferSize = samplesCountInBytes*sizeof(M4OSA_UInt16); } else { VIDEOEDIT_LOG_ERROR(ANDROID_LOG_INFO, "VIDEO_EDITOR", "M4MA_generateAudioGraphFile: Malloc failed for bufferIn.m_dataAddress 0x%lx", "M4MA_generateAudioGraphFile: Malloc failed for bufferIn.m_dataAddress 0x%" PRIx32, M4ERR_ALLOC); return M4ERR_ALLOC; } Loading Loading @@ -3445,7 +3446,7 @@ M4OSA_ERR M4MA_generateAudioGraphFile(JNIEnv* pEnv, M4OSA_Char* pInputFileURL, if (err != M4NO_ERROR) { // if out value of bytes-read is 0, break if ( numBytesToRead == 0) { VIDEOEDIT_LOG_ERROR(ANDROID_LOG_INFO, "VIDEO_EDITOR", "numBytesToRead 0x%lx", VIDEOEDIT_LOG_ERROR(ANDROID_LOG_INFO, "VIDEO_EDITOR", "numBytesToRead 0x%" PRIx32, numBytesToRead); break; /* stop if file is empty or EOF */ } Loading Loading @@ -3497,7 +3498,7 @@ M4OSA_ERR M4MA_generateAudioGraphFile(JNIEnv* pEnv, M4OSA_Char* pInputFileURL, } while (numBytesToRead != 0); VIDEOEDIT_LOG_ERROR(ANDROID_LOG_INFO, "VIDEO_EDITOR", "loop 0x%lx", volumeValuesCount); VIDEOEDIT_LOG_ERROR(ANDROID_LOG_INFO, "VIDEO_EDITOR", "loop 0x%" PRIx32, volumeValuesCount); /* if some error occured in fwrite */ if (numBytesToRead != 0) { Loading