summaryrefslogtreecommitdiffstats
path: root/media/mtp/MtpServer.cpp
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-04-04 14:47:28 -0700
committerMark Salyzyn <salyzyn@google.com>2014-04-15 13:18:22 -0700
commitdb43b34c3428e480f8c4c66e7e88f4001f37f91e (patch)
treebe194bf06c84b61f277a1c29c7499aa7862494a4 /media/mtp/MtpServer.cpp
parent1df2557ac95a6d8a087fb15f6f842dc049f2759b (diff)
downloadframeworks_av-db43b34c3428e480f8c4c66e7e88f4001f37f91e.zip
frameworks_av-db43b34c3428e480f8c4c66e7e88f4001f37f91e.tar.gz
frameworks_av-db43b34c3428e480f8c4c66e7e88f4001f37f91e.tar.bz2
media: 64 bit compile issues
- change internal sized types to use stdint.h - printf & scanf formats - size_t or unsigned int for iterators Change-Id: Id993a70d8bf54c667c5d652b34179a2c727ed446
Diffstat (limited to 'media/mtp/MtpServer.cpp')
-rw-r--r--media/mtp/MtpServer.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/media/mtp/MtpServer.cpp b/media/mtp/MtpServer.cpp
index df87db4..0b1f527 100644
--- a/media/mtp/MtpServer.cpp
+++ b/media/mtp/MtpServer.cpp
@@ -20,6 +20,7 @@
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include <inttypes.h>
#include <errno.h>
#include <sys/stat.h>
#include <dirent.h>
@@ -124,7 +125,7 @@ void MtpServer::addStorage(MtpStorage* storage) {
void MtpServer::removeStorage(MtpStorage* storage) {
Mutex::Autolock autoLock(mMutex);
- for (int i = 0; i < mStorages.size(); i++) {
+ for (unsigned int i = 0; i < mStorages.size(); i++) {
if (mStorages[i] == storage) {
mStorages.removeAt(i);
sendStoreRemoved(storage->getStorageID());
@@ -136,7 +137,7 @@ void MtpServer::removeStorage(MtpStorage* storage) {
MtpStorage* MtpServer::getStorage(MtpStorageID id) {
if (id == 0)
return mStorages[0];
- for (int i = 0; i < mStorages.size(); i++) {
+ for (unsigned int i = 0; i < mStorages.size(); i++) {
MtpStorage* storage = mStorages[i];
if (storage->getStorageID() == id)
return storage;
@@ -1110,7 +1111,7 @@ MtpResponseCode MtpServer::doSendPartialObject() {
}
const char* filePath = (const char *)edit->mPath;
- ALOGV("receiving partial %s %lld %lld\n", filePath, offset, length);
+ ALOGV("receiving partial %s %lld %" PRIu32 "\n", filePath, offset, length);
// read the header, and possibly some data
int ret = mData.read(mFD);