summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-04-15 23:37:19 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-04-15 23:37:19 +0000
commit1b24cf32e02a1372e57b3a2a432bc0adfe496e6d (patch)
tree220f4583ae1081df62fa5c861eed3e9e90a24515 /media
parent4845b69f70ff457be8d8908f6eb61e2af67e00d3 (diff)
parente80631aa1992ca50af679cd6a018c0ffda7f9b17 (diff)
downloadframeworks_av-1b24cf32e02a1372e57b3a2a432bc0adfe496e6d.zip
frameworks_av-1b24cf32e02a1372e57b3a2a432bc0adfe496e6d.tar.gz
frameworks_av-1b24cf32e02a1372e57b3a2a432bc0adfe496e6d.tar.bz2
am e80631aa: am 839d11d1: Merge changes I0a744dc7,Id993a70d
* commit 'e80631aa1992ca50af679cd6a018c0ffda7f9b17': media: use size_t for integer iterator to Vector::size() media: 64 bit compile issues
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/AMRExtractor.cpp2
-rw-r--r--media/libstagefright/CameraSourceTimeLapse.cpp2
-rw-r--r--media/libstagefright/NuCachedSource2.cpp2
-rw-r--r--media/libstagefright/OMXCodec.cpp28
-rw-r--r--media/libstagefright/codecs/on2/h264dec/omxdl/arm11/api/omxtypes.h60
-rwxr-xr-xmedia/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/omxtypes.h60
-rw-r--r--media/libstagefright/codecs/on2/h264dec/omxdl/reference/api/omxtypes.h60
-rw-r--r--media/libstagefright/omx/GraphicBufferSource.cpp6
-rw-r--r--media/libstagefright/omx/OMX.cpp4
-rw-r--r--media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp4
-rw-r--r--media/mtp/MtpDevice.cpp4
-rw-r--r--media/mtp/MtpServer.cpp7
12 files changed, 61 insertions, 178 deletions
diff --git a/media/libstagefright/AMRExtractor.cpp b/media/libstagefright/AMRExtractor.cpp
index 3f592ed..a6fb3d8 100644
--- a/media/libstagefright/AMRExtractor.cpp
+++ b/media/libstagefright/AMRExtractor.cpp
@@ -265,7 +265,7 @@ status_t AMRSource::read(
mOffset = mOffsetTable[index] + (mIsWide ? 9 : 6);
- for (int i = 0; i< seekFrame - index * 50; i++) {
+ for (size_t i = 0; i< seekFrame - index * 50; i++) {
status_t err;
if ((err = getFrameSizeByOffset(mDataSource, mOffset,
mIsWide, &size)) != OK) {
diff --git a/media/libstagefright/CameraSourceTimeLapse.cpp b/media/libstagefright/CameraSourceTimeLapse.cpp
index 60cdf66..15ba967 100644
--- a/media/libstagefright/CameraSourceTimeLapse.cpp
+++ b/media/libstagefright/CameraSourceTimeLapse.cpp
@@ -135,7 +135,7 @@ bool CameraSourceTimeLapse::trySettingVideoSize(
}
bool videoSizeSupported = false;
- for (uint32_t i = 0; i < supportedSizes.size(); ++i) {
+ for (size_t i = 0; i < supportedSizes.size(); ++i) {
int32_t pictureWidth = supportedSizes[i].width;
int32_t pictureHeight = supportedSizes[i].height;
diff --git a/media/libstagefright/NuCachedSource2.cpp b/media/libstagefright/NuCachedSource2.cpp
index 72ea32d..61cf0ad 100644
--- a/media/libstagefright/NuCachedSource2.cpp
+++ b/media/libstagefright/NuCachedSource2.cpp
@@ -648,7 +648,7 @@ void NuCachedSource2::updateCacheParamsFromString(const char *s) {
ssize_t lowwaterMarkKb, highwaterMarkKb;
int keepAliveSecs;
- if (sscanf(s, "%d/%d/%d",
+ if (sscanf(s, "%zd/%zd/%d",
&lowwaterMarkKb, &highwaterMarkKb, &keepAliveSecs) != 3) {
ALOGE("Failed to parse cache parameters from '%s'.", s);
return;
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 1cfe6c0..a879656 100644
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#include <inttypes.h>
+
//#define LOG_NDEBUG 0
#define LOG_TAG "OMXCodec"
#include <utils/Log.h>
@@ -4251,9 +4253,9 @@ void OMXCodec::dumpPortStatus(OMX_U32 portIndex) {
CHECK((portIndex == kPortIndexInput && def.eDir == OMX_DirInput)
|| (portIndex == kPortIndexOutput && def.eDir == OMX_DirOutput));
- printf(" nBufferCountActual = %ld\n", def.nBufferCountActual);
- printf(" nBufferCountMin = %ld\n", def.nBufferCountMin);
- printf(" nBufferSize = %ld\n", def.nBufferSize);
+ printf(" nBufferCountActual = %" PRIu32 "\n", def.nBufferCountActual);
+ printf(" nBufferCountMin = %" PRIu32 "\n", def.nBufferCountMin);
+ printf(" nBufferSize = %" PRIu32 "\n", def.nBufferSize);
switch (def.eDomain) {
case OMX_PortDomainImage:
@@ -4262,9 +4264,9 @@ void OMXCodec::dumpPortStatus(OMX_U32 portIndex) {
printf("\n");
printf(" // Image\n");
- printf(" nFrameWidth = %ld\n", imageDef->nFrameWidth);
- printf(" nFrameHeight = %ld\n", imageDef->nFrameHeight);
- printf(" nStride = %ld\n", imageDef->nStride);
+ printf(" nFrameWidth = %" PRIu32 "\n", imageDef->nFrameWidth);
+ printf(" nFrameHeight = %" PRIu32 "\n", imageDef->nFrameHeight);
+ printf(" nStride = %" PRIu32 "\n", imageDef->nStride);
printf(" eCompressionFormat = %s\n",
imageCompressionFormatString(imageDef->eCompressionFormat));
@@ -4281,9 +4283,9 @@ void OMXCodec::dumpPortStatus(OMX_U32 portIndex) {
printf("\n");
printf(" // Video\n");
- printf(" nFrameWidth = %ld\n", videoDef->nFrameWidth);
- printf(" nFrameHeight = %ld\n", videoDef->nFrameHeight);
- printf(" nStride = %ld\n", videoDef->nStride);
+ printf(" nFrameWidth = %" PRIu32 "\n", videoDef->nFrameWidth);
+ printf(" nFrameHeight = %" PRIu32 "\n", videoDef->nFrameHeight);
+ printf(" nStride = %" PRIu32 "\n", videoDef->nStride);
printf(" eCompressionFormat = %s\n",
videoCompressionFormatString(videoDef->eCompressionFormat));
@@ -4312,10 +4314,10 @@ void OMXCodec::dumpPortStatus(OMX_U32 portIndex) {
mNode, OMX_IndexParamAudioPcm, &params, sizeof(params));
CHECK_EQ(err, (status_t)OK);
- printf(" nSamplingRate = %ld\n", params.nSamplingRate);
- printf(" nChannels = %ld\n", params.nChannels);
+ printf(" nSamplingRate = %" PRIu32 "\n", params.nSamplingRate);
+ printf(" nChannels = %" PRIu32 "\n", params.nChannels);
printf(" bInterleaved = %d\n", params.bInterleaved);
- printf(" nBitPerSample = %ld\n", params.nBitPerSample);
+ printf(" nBitPerSample = %" PRIu32 "\n", params.nBitPerSample);
printf(" eNumData = %s\n",
params.eNumData == OMX_NumericalDataSigned
@@ -4331,7 +4333,7 @@ void OMXCodec::dumpPortStatus(OMX_U32 portIndex) {
mNode, OMX_IndexParamAudioAmr, &amr, sizeof(amr));
CHECK_EQ(err, (status_t)OK);
- printf(" nChannels = %ld\n", amr.nChannels);
+ printf(" nChannels = %" PRIu32 "\n", amr.nChannels);
printf(" eAMRBandMode = %s\n",
amrBandModeString(amr.eAMRBandMode));
printf(" eAMRFrameFormat = %s\n",
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm11/api/omxtypes.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm11/api/omxtypes.h
index 8b295a6..912cb0d 100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm11/api/omxtypes.h
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm11/api/omxtypes.h
@@ -32,6 +32,7 @@
#define _OMXTYPES_H_
#include <limits.h>
+#include <stdint.h>
#define OMX_IN
#define OMX_OUT
@@ -75,64 +76,22 @@ typedef enum {
/* OMX_U8 */
-#if UCHAR_MAX == 0xff
-typedef unsigned char OMX_U8;
-#elif USHRT_MAX == 0xff
-typedef unsigned short int OMX_U8;
-#else
-#error OMX_U8 undefined
-#endif
-
+typedef uint8_t OMX_U8;
/* OMX_S8 */
-#if SCHAR_MAX == 0x7f
-typedef signed char OMX_S8;
-#elif SHRT_MAX == 0x7f
-typedef signed short int OMX_S8;
-#else
-#error OMX_S8 undefined
-#endif
-
+typedef int8_t OMX_S8;
/* OMX_U16 */
-#if USHRT_MAX == 0xffff
-typedef unsigned short int OMX_U16;
-#elif UINT_MAX == 0xffff
-typedef unsigned int OMX_U16;
-#else
-#error OMX_U16 undefined
-#endif
-
+typedef uint16_t OMX_U16;
/* OMX_S16 */
-#if SHRT_MAX == 0x7fff
-typedef signed short int OMX_S16;
-#elif INT_MAX == 0x7fff
-typedef signed int OMX_S16;
-#else
-#error OMX_S16 undefined
-#endif
-
+typedef int16_t OMX_S16;
/* OMX_U32 */
-#if UINT_MAX == 0xffffffff
-typedef unsigned int OMX_U32;
-#elif LONG_MAX == 0xffffffff
-typedef unsigned long int OMX_U32;
-#else
-#error OMX_U32 undefined
-#endif
-
+typedef uint32_t OMX_U32;
/* OMX_S32 */
-#if INT_MAX == 0x7fffffff
-typedef signed int OMX_S32;
-#elif LONG_MAX == 0x7fffffff
-typedef long signed int OMX_S32;
-#else
-#error OMX_S32 undefined
-#endif
-
+typedef int32_t OMX_S32;
/* OMX_U64 & OMX_S64 */
#if defined( _WIN32 ) || defined ( _WIN64 )
@@ -143,15 +102,14 @@ typedef long signed int OMX_S32;
#define OMX_MAX_S64 (0x7FFFFFFFFFFFFFFFi64)
#define OMX_MAX_U64 (0xFFFFFFFFFFFFFFFFi64)
#else
- typedef long long OMX_S64; /** Signed 64-bit integer */
- typedef unsigned long long OMX_U64; /** Unsigned 64-bit integer */
+ typedef int64_t OMX_S64; /** Signed 64-bit integer */
+ typedef uint64_t OMX_U64; /** Unsigned 64-bit integer */
#define OMX_MIN_S64 (0x8000000000000000LL)
#define OMX_MIN_U64 (0x0000000000000000LL)
#define OMX_MAX_S64 (0x7FFFFFFFFFFFFFFFLL)
#define OMX_MAX_U64 (0xFFFFFFFFFFFFFFFFLL)
#endif
-
/* OMX_SC8 */
typedef struct
{
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/omxtypes.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/omxtypes.h
index 8b295a6..912cb0d 100755
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/omxtypes.h
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/omxtypes.h
@@ -32,6 +32,7 @@
#define _OMXTYPES_H_
#include <limits.h>
+#include <stdint.h>
#define OMX_IN
#define OMX_OUT
@@ -75,64 +76,22 @@ typedef enum {
/* OMX_U8 */
-#if UCHAR_MAX == 0xff
-typedef unsigned char OMX_U8;
-#elif USHRT_MAX == 0xff
-typedef unsigned short int OMX_U8;
-#else
-#error OMX_U8 undefined
-#endif
-
+typedef uint8_t OMX_U8;
/* OMX_S8 */
-#if SCHAR_MAX == 0x7f
-typedef signed char OMX_S8;
-#elif SHRT_MAX == 0x7f
-typedef signed short int OMX_S8;
-#else
-#error OMX_S8 undefined
-#endif
-
+typedef int8_t OMX_S8;
/* OMX_U16 */
-#if USHRT_MAX == 0xffff
-typedef unsigned short int OMX_U16;
-#elif UINT_MAX == 0xffff
-typedef unsigned int OMX_U16;
-#else
-#error OMX_U16 undefined
-#endif
-
+typedef uint16_t OMX_U16;
/* OMX_S16 */
-#if SHRT_MAX == 0x7fff
-typedef signed short int OMX_S16;
-#elif INT_MAX == 0x7fff
-typedef signed int OMX_S16;
-#else
-#error OMX_S16 undefined
-#endif
-
+typedef int16_t OMX_S16;
/* OMX_U32 */
-#if UINT_MAX == 0xffffffff
-typedef unsigned int OMX_U32;
-#elif LONG_MAX == 0xffffffff
-typedef unsigned long int OMX_U32;
-#else
-#error OMX_U32 undefined
-#endif
-
+typedef uint32_t OMX_U32;
/* OMX_S32 */
-#if INT_MAX == 0x7fffffff
-typedef signed int OMX_S32;
-#elif LONG_MAX == 0x7fffffff
-typedef long signed int OMX_S32;
-#else
-#error OMX_S32 undefined
-#endif
-
+typedef int32_t OMX_S32;
/* OMX_U64 & OMX_S64 */
#if defined( _WIN32 ) || defined ( _WIN64 )
@@ -143,15 +102,14 @@ typedef long signed int OMX_S32;
#define OMX_MAX_S64 (0x7FFFFFFFFFFFFFFFi64)
#define OMX_MAX_U64 (0xFFFFFFFFFFFFFFFFi64)
#else
- typedef long long OMX_S64; /** Signed 64-bit integer */
- typedef unsigned long long OMX_U64; /** Unsigned 64-bit integer */
+ typedef int64_t OMX_S64; /** Signed 64-bit integer */
+ typedef uint64_t OMX_U64; /** Unsigned 64-bit integer */
#define OMX_MIN_S64 (0x8000000000000000LL)
#define OMX_MIN_U64 (0x0000000000000000LL)
#define OMX_MAX_S64 (0x7FFFFFFFFFFFFFFFLL)
#define OMX_MAX_U64 (0xFFFFFFFFFFFFFFFFLL)
#endif
-
/* OMX_SC8 */
typedef struct
{
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/reference/api/omxtypes.h b/media/libstagefright/codecs/on2/h264dec/omxdl/reference/api/omxtypes.h
index 8b295a6..912cb0d 100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/reference/api/omxtypes.h
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/reference/api/omxtypes.h
@@ -32,6 +32,7 @@
#define _OMXTYPES_H_
#include <limits.h>
+#include <stdint.h>
#define OMX_IN
#define OMX_OUT
@@ -75,64 +76,22 @@ typedef enum {
/* OMX_U8 */
-#if UCHAR_MAX == 0xff
-typedef unsigned char OMX_U8;
-#elif USHRT_MAX == 0xff
-typedef unsigned short int OMX_U8;
-#else
-#error OMX_U8 undefined
-#endif
-
+typedef uint8_t OMX_U8;
/* OMX_S8 */
-#if SCHAR_MAX == 0x7f
-typedef signed char OMX_S8;
-#elif SHRT_MAX == 0x7f
-typedef signed short int OMX_S8;
-#else
-#error OMX_S8 undefined
-#endif
-
+typedef int8_t OMX_S8;
/* OMX_U16 */
-#if USHRT_MAX == 0xffff
-typedef unsigned short int OMX_U16;
-#elif UINT_MAX == 0xffff
-typedef unsigned int OMX_U16;
-#else
-#error OMX_U16 undefined
-#endif
-
+typedef uint16_t OMX_U16;
/* OMX_S16 */
-#if SHRT_MAX == 0x7fff
-typedef signed short int OMX_S16;
-#elif INT_MAX == 0x7fff
-typedef signed int OMX_S16;
-#else
-#error OMX_S16 undefined
-#endif
-
+typedef int16_t OMX_S16;
/* OMX_U32 */
-#if UINT_MAX == 0xffffffff
-typedef unsigned int OMX_U32;
-#elif LONG_MAX == 0xffffffff
-typedef unsigned long int OMX_U32;
-#else
-#error OMX_U32 undefined
-#endif
-
+typedef uint32_t OMX_U32;
/* OMX_S32 */
-#if INT_MAX == 0x7fffffff
-typedef signed int OMX_S32;
-#elif LONG_MAX == 0x7fffffff
-typedef long signed int OMX_S32;
-#else
-#error OMX_S32 undefined
-#endif
-
+typedef int32_t OMX_S32;
/* OMX_U64 & OMX_S64 */
#if defined( _WIN32 ) || defined ( _WIN64 )
@@ -143,15 +102,14 @@ typedef long signed int OMX_S32;
#define OMX_MAX_S64 (0x7FFFFFFFFFFFFFFFi64)
#define OMX_MAX_U64 (0xFFFFFFFFFFFFFFFFi64)
#else
- typedef long long OMX_S64; /** Signed 64-bit integer */
- typedef unsigned long long OMX_U64; /** Unsigned 64-bit integer */
+ typedef int64_t OMX_S64; /** Signed 64-bit integer */
+ typedef uint64_t OMX_U64; /** Unsigned 64-bit integer */
#define OMX_MIN_S64 (0x8000000000000000LL)
#define OMX_MIN_U64 (0x0000000000000000LL)
#define OMX_MAX_S64 (0x7FFFFFFFFFFFFFFFLL)
#define OMX_MAX_U64 (0xFFFFFFFFFFFFFFFFLL)
#endif
-
/* OMX_SC8 */
typedef struct
{
diff --git a/media/libstagefright/omx/GraphicBufferSource.cpp b/media/libstagefright/omx/GraphicBufferSource.cpp
index 1be76b3..3df57b4 100644
--- a/media/libstagefright/omx/GraphicBufferSource.cpp
+++ b/media/libstagefright/omx/GraphicBufferSource.cpp
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#include <inttypes.h>
+
#define LOG_TAG "GraphicBufferSource"
//#define LOG_NDEBUG 0
#include <utils/Log.h>
@@ -205,7 +207,7 @@ void GraphicBufferSource::addCodecBuffer(OMX_BUFFERHEADERTYPE* header) {
return;
}
- ALOGV("addCodecBuffer h=%p size=%lu p=%p",
+ ALOGV("addCodecBuffer h=%p size=%" PRIu32 " p=%p",
header, header->nAllocLen, header->pBuffer);
CodecBuffer codecBuffer;
codecBuffer.mHeader = header;
@@ -226,7 +228,7 @@ void GraphicBufferSource::codecBufferEmptied(OMX_BUFFERHEADERTYPE* header) {
return;
}
- ALOGV("codecBufferEmptied h=%p size=%lu filled=%lu p=%p",
+ ALOGV("codecBufferEmptied h=%p size=%" PRIu32 " filled=%" PRIu32 " p=%p",
header, header->nAllocLen, header->nFilledLen,
header->pBuffer);
CodecBuffer& codecBuffer(mCodecBuffers.editItemAt(cbi));
diff --git a/media/libstagefright/omx/OMX.cpp b/media/libstagefright/omx/OMX.cpp
index a608479..74076c6 100644
--- a/media/libstagefright/omx/OMX.cpp
+++ b/media/libstagefright/omx/OMX.cpp
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#include <inttypes.h>
+
//#define LOG_NDEBUG 0
#define LOG_TAG "OMX"
#include <utils/Log.h>
@@ -425,7 +427,7 @@ OMX_ERRORTYPE OMX::OnEvent(
OMX_IN OMX_U32 nData1,
OMX_IN OMX_U32 nData2,
OMX_IN OMX_PTR /* pEventData */) {
- ALOGV("OnEvent(%d, %ld, %ld)", eEvent, nData1, nData2);
+ ALOGV("OnEvent(%d, %" PRIu32", %" PRIu32 ")", eEvent, nData1, nData2);
// Forward to OMXNodeInstance.
findInstance(node)->onEvent(eEvent, nData1, nData2);
diff --git a/media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp b/media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp
index 08a3d42..eb9fcf7 100644
--- a/media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp
+++ b/media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#include <inttypes.h>
+
//#define LOG_NDEBUG 0
#define LOG_TAG "SoftVideoDecoderOMXComponent"
#include <utils/Log.h>
@@ -177,7 +179,7 @@ OMX_ERRORTYPE SoftVideoDecoderOMXComponent::internalGetParameter(
(OMX_VIDEO_PARAM_PROFILELEVELTYPE *) params;
if (profileLevel->nPortIndex != kInputPortIndex) {
- ALOGE("Invalid port index: %ld", profileLevel->nPortIndex);
+ ALOGE("Invalid port index: %" PRIu32, profileLevel->nPortIndex);
return OMX_ErrorUnsupportedIndex;
}
diff --git a/media/mtp/MtpDevice.cpp b/media/mtp/MtpDevice.cpp
index d672dff..d6d5dd5 100644
--- a/media/mtp/MtpDevice.cpp
+++ b/media/mtp/MtpDevice.cpp
@@ -195,7 +195,7 @@ MtpDevice::MtpDevice(struct usb_device* device, int interface,
MtpDevice::~MtpDevice() {
close();
- for (int i = 0; i < mDeviceProperties.size(); i++)
+ for (size_t i = 0; i < mDeviceProperties.size(); i++)
delete mDeviceProperties[i];
usb_request_free(mRequestIn1);
usb_request_free(mRequestIn2);
@@ -253,7 +253,7 @@ void MtpDevice::print() {
ALOGI("*** FORMAT: %s\n", MtpDebug::getFormatCodeName(format));
MtpObjectPropertyList* props = getObjectPropsSupported(format);
if (props) {
- for (int j = 0; j < props->size(); j++) {
+ for (size_t j = 0; j < props->size(); j++) {
MtpObjectProperty prop = (*props)[j];
MtpProperty* property = getObjectPropDesc(prop, format);
if (property) {
diff --git a/media/mtp/MtpServer.cpp b/media/mtp/MtpServer.cpp
index dadfb54..157f2ce 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>
@@ -125,7 +126,7 @@ void MtpServer::addStorage(MtpStorage* storage) {
void MtpServer::removeStorage(MtpStorage* storage) {
Mutex::Autolock autoLock(mMutex);
- for (int i = 0; i < mStorages.size(); i++) {
+ for (size_t i = 0; i < mStorages.size(); i++) {
if (mStorages[i] == storage) {
mStorages.removeAt(i);
sendStoreRemoved(storage->getStorageID());
@@ -137,7 +138,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 (size_t i = 0; i < mStorages.size(); i++) {
MtpStorage* storage = mStorages[i];
if (storage->getStorageID() == id)
return storage;
@@ -1116,7 +1117,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);