summaryrefslogtreecommitdiffstats
path: root/media/mtp/MtpServer.cpp
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-06-18 16:32:27 -0700
committerMark Salyzyn <salyzyn@google.com>2014-06-25 10:15:22 -0700
commitd239cb6e6898bdf2300e9038111727a9056c58ee (patch)
treefded306f76cc93e76d8354dab66cf55828b5ff0c /media/mtp/MtpServer.cpp
parent1ee7a03fafe9b1983465979729a630e5be3be4e1 (diff)
downloadframeworks_av-d239cb6e6898bdf2300e9038111727a9056c58ee.zip
frameworks_av-d239cb6e6898bdf2300e9038111727a9056c58ee.tar.gz
frameworks_av-d239cb6e6898bdf2300e9038111727a9056c58ee.tar.bz2
mtp: 64-bit compile warnings
Change-Id: I9ebc270c990d2f83311cec8fef8f1d2842ebf291
Diffstat (limited to 'media/mtp/MtpServer.cpp')
-rw-r--r--media/mtp/MtpServer.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/media/mtp/MtpServer.cpp b/media/mtp/MtpServer.cpp
index 3892fb1..aa43967 100644
--- a/media/mtp/MtpServer.cpp
+++ b/media/mtp/MtpServer.cpp
@@ -802,7 +802,7 @@ MtpResponseCode MtpServer::doGetPartialObject(MtpOperationCode operation) {
int result = mDatabase->getObjectFilePath(handle, pathBuf, fileLength, format);
if (result != MTP_RESPONSE_OK)
return result;
- if (offset + length > fileLength)
+ if (offset + length > (uint64_t)fileLength)
length = fileLength - offset;
const char* filePath = (const char *)pathBuf;
@@ -1005,7 +1005,7 @@ done:
static void deleteRecursive(const char* path) {
char pathbuf[PATH_MAX];
- int pathLength = strlen(path);
+ size_t pathLength = strlen(path);
if (pathLength >= sizeof(pathbuf) - 1) {
ALOGE("path too long: %s\n", path);
}
@@ -1127,12 +1127,13 @@ MtpResponseCode MtpServer::doSendPartialObject() {
// can't start writing past the end of the file
if (offset > edit->mSize) {
- ALOGD("writing past end of object, offset: %lld, edit->mSize: %lld", offset, edit->mSize);
+ ALOGD("writing past end of object, offset: %" PRIu64 ", edit->mSize: %" PRIu64,
+ offset, edit->mSize);
return MTP_RESPONSE_GENERAL_ERROR;
}
const char* filePath = (const char *)edit->mPath;
- ALOGV("receiving partial %s %lld %" PRIu32 "\n", filePath, offset, length);
+ ALOGV("receiving partial %s %" PRIu64 " %" PRIu32, filePath, offset, length);
// read the header, and possibly some data
int ret = mData.read(mFD);