am 4e3abafc: am 5daf51c0: Merge "jni: 64-bit compile issue"

* commit '4e3abafc9400eed38a1e76897b79e923acfaf8ed':
  jni: 64-bit compile issue
This commit is contained in:
Mark Salyzyn
2014-03-26 20:00:13 +00:00
committed by Android Git Automerger

View File

@ -17,11 +17,12 @@
#define LOG_TAG "MtpDatabaseJNI" #define LOG_TAG "MtpDatabaseJNI"
#include "utils/Log.h" #include "utils/Log.h"
#include <stdio.h>
#include <assert.h> #include <assert.h>
#include <limits.h>
#include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <inttypes.h>
#include <limits.h>
#include <stdio.h>
#include <unistd.h>
#include "jni.h" #include "jni.h"
#include "JNIHelp.h" #include "JNIHelp.h"
@ -391,7 +392,7 @@ MtpResponseCode MyMtpDatabase::getObjectPropertyValue(MtpObjectHandle handle,
// release date is stored internally as just the year // release date is stored internally as just the year
if (property == MTP_PROPERTY_ORIGINAL_RELEASE_DATE) { if (property == MTP_PROPERTY_ORIGINAL_RELEASE_DATE) {
char date[20]; char date[20];
snprintf(date, sizeof(date), "%04lld0101T000000", longValue); snprintf(date, sizeof(date), "%04" PRId64 "0101T000000", longValue);
packet.putString(date); packet.putString(date);
goto out; goto out;
} }
@ -648,7 +649,7 @@ MtpResponseCode MyMtpDatabase::setDevicePropertyValue(MtpDeviceProperty property
return result; return result;
} }
MtpResponseCode MyMtpDatabase::resetDeviceProperty(MtpDeviceProperty property) { MtpResponseCode MyMtpDatabase::resetDeviceProperty(MtpDeviceProperty /*property*/) {
return -1; return -1;
} }
@ -1102,7 +1103,7 @@ android_mtp_MtpDatabase_finalize(JNIEnv *env, jobject thiz)
} }
static jstring static jstring
android_mtp_MtpPropertyGroup_format_date_time(JNIEnv *env, jobject thiz, jlong seconds) android_mtp_MtpPropertyGroup_format_date_time(JNIEnv *env, jobject /*thiz*/, jlong seconds)
{ {
char date[20]; char date[20];
formatDateTime(seconds, date, sizeof(date)); formatDateTime(seconds, date, sizeof(date));