diff options
| -rw-r--r-- | drm/common/DrmSupportInfo.cpp | 4 | ||||
| -rw-r--r-- | drm/drmserver/DrmManager.cpp | 20 | ||||
| -rw-r--r-- | drm/libdrmframework/include/PlugInManager.h | 4 | ||||
| -rw-r--r-- | media/libstagefright/CameraSourceTimeLapse.cpp | 2 | ||||
| -rw-r--r-- | media/mtp/MtpDevice.cpp | 4 | ||||
| -rw-r--r-- | media/mtp/MtpServer.cpp | 4 | ||||
| -rw-r--r-- | services/audioflinger/AudioFlinger.cpp | 4 | ||||
| -rw-r--r-- | services/audioflinger/Tracks.cpp | 2 | 
8 files changed, 22 insertions, 22 deletions
diff --git a/drm/common/DrmSupportInfo.cpp b/drm/common/DrmSupportInfo.cpp index 5400bdd..584c6a6 100644 --- a/drm/common/DrmSupportInfo.cpp +++ b/drm/common/DrmSupportInfo.cpp @@ -47,7 +47,7 @@ bool DrmSupportInfo::isSupportedMimeType(const String8& mimeType) const {          return false;      } -    for (unsigned int i = 0; i < mMimeTypeVector.size(); i++) { +    for (size_t i = 0; i < mMimeTypeVector.size(); i++) {          const String8 item = mMimeTypeVector.itemAt(i);          if (!strcasecmp(item.string(), mimeType.string())) { @@ -58,7 +58,7 @@ bool DrmSupportInfo::isSupportedMimeType(const String8& mimeType) const {  }  bool DrmSupportInfo::isSupportedFileSuffix(const String8& fileType) const { -    for (unsigned int i = 0; i < mFileSuffixVector.size(); i++) { +    for (size_t i = 0; i < mFileSuffixVector.size(); i++) {          const String8 item = mFileSuffixVector.itemAt(i);          if (!strcasecmp(item.string(), fileType.string())) { diff --git a/drm/drmserver/DrmManager.cpp b/drm/drmserver/DrmManager.cpp index dccd23d..d8aeb0c 100644 --- a/drm/drmserver/DrmManager.cpp +++ b/drm/drmserver/DrmManager.cpp @@ -101,7 +101,7 @@ status_t DrmManager::loadPlugIns() {  status_t DrmManager::loadPlugIns(const String8& plugInDirPath) {      mPlugInManager.loadPlugIns(plugInDirPath);      Vector<String8> plugInPathList = mPlugInManager.getPlugInIdList(); -    for (unsigned int i = 0; i < plugInPathList.size(); ++i) { +    for (size_t i = 0; i < plugInPathList.size(); ++i) {          String8 plugInPath = plugInPathList[i];          DrmSupportInfo* info = mPlugInManager.getPlugIn(plugInPath).getSupportInfo(0);          if (NULL != info) { @@ -138,7 +138,7 @@ void DrmManager::addClient(int uniqueId) {      Mutex::Autolock _l(mLock);      if (!mSupportInfoToPlugInIdMap.isEmpty()) {          Vector<String8> plugInIdList = mPlugInManager.getPlugInIdList(); -        for (unsigned int index = 0; index < plugInIdList.size(); index++) { +        for (size_t index = 0; index < plugInIdList.size(); index++) {              IDrmEngine& rDrmEngine = mPlugInManager.getPlugIn(plugInIdList.itemAt(index));              rDrmEngine.initialize(uniqueId);              rDrmEngine.setOnInfoListener(uniqueId, this); @@ -149,7 +149,7 @@ void DrmManager::addClient(int uniqueId) {  void DrmManager::removeClient(int uniqueId) {      Mutex::Autolock _l(mLock);      Vector<String8> plugInIdList = mPlugInManager.getPlugInIdList(); -    for (unsigned int index = 0; index < plugInIdList.size(); index++) { +    for (size_t index = 0; index < plugInIdList.size(); index++) {          IDrmEngine& rDrmEngine = mPlugInManager.getPlugIn(plugInIdList.itemAt(index));          rDrmEngine.terminate(uniqueId);      } @@ -208,7 +208,7 @@ bool DrmManager::canHandle(int uniqueId, const String8& path) {      bool result = false;      Vector<String8> plugInPathList = mPlugInManager.getPlugInIdList(); -    for (unsigned int i = 0; i < plugInPathList.size(); ++i) { +    for (size_t i = 0; i < plugInPathList.size(); ++i) {          IDrmEngine& rDrmEngine = mPlugInManager.getPlugIn(plugInPathList[i]);          result = rDrmEngine.canHandle(uniqueId, path); @@ -318,7 +318,7 @@ status_t DrmManager::removeRights(int uniqueId, const String8& path) {  status_t DrmManager::removeAllRights(int uniqueId) {      Vector<String8> plugInIdList = mPlugInManager.getPlugInIdList();      status_t result = DRM_ERROR_UNKNOWN; -    for (unsigned int index = 0; index < plugInIdList.size(); index++) { +    for (size_t index = 0; index < plugInIdList.size(); index++) {          IDrmEngine& rDrmEngine = mPlugInManager.getPlugIn(plugInIdList.itemAt(index));          result = rDrmEngine.removeAllRights(uniqueId);          if (DRM_NO_ERROR != result) { @@ -412,7 +412,7 @@ DecryptHandle* DrmManager::openDecryptSession(      if (NULL != handle) {          handle->decryptId = mDecryptSessionId + 1; -        for (unsigned int index = 0; index < plugInIdList.size(); index++) { +        for (size_t index = 0; index < plugInIdList.size(); index++) {              String8 plugInId = plugInIdList.itemAt(index);              IDrmEngine& rDrmEngine = mPlugInManager.getPlugIn(plugInId);              result = rDrmEngine.openDecryptSession(uniqueId, handle, fd, offset, length, mime); @@ -440,7 +440,7 @@ DecryptHandle* DrmManager::openDecryptSession(      if (NULL != handle) {          handle->decryptId = mDecryptSessionId + 1; -        for (unsigned int index = 0; index < plugInIdList.size(); index++) { +        for (size_t index = 0; index < plugInIdList.size(); index++) {              String8 plugInId = plugInIdList.itemAt(index);              IDrmEngine& rDrmEngine = mPlugInManager.getPlugIn(plugInId);              result = rDrmEngine.openDecryptSession(uniqueId, handle, uri, mime); @@ -565,7 +565,7 @@ String8 DrmManager::getSupportedPlugInId(const String8& mimeType) {      String8 plugInId("");      if (EMPTY_STRING != mimeType) { -        for (unsigned int index = 0; index < mSupportInfoToPlugInIdMap.size(); index++) { +        for (size_t index = 0; index < mSupportInfoToPlugInIdMap.size(); index++) {              const DrmSupportInfo& drmSupportInfo = mSupportInfoToPlugInIdMap.keyAt(index);              if (drmSupportInfo.isSupportedMimeType(mimeType)) { @@ -581,7 +581,7 @@ String8 DrmManager::getSupportedPlugInIdFromPath(int uniqueId, const String8& pa      String8 plugInId("");      const String8 fileSuffix = path.getPathExtension(); -    for (unsigned int index = 0; index < mSupportInfoToPlugInIdMap.size(); index++) { +    for (size_t index = 0; index < mSupportInfoToPlugInIdMap.size(); index++) {          const DrmSupportInfo& drmSupportInfo = mSupportInfoToPlugInIdMap.keyAt(index);          if (drmSupportInfo.isSupportedFileSuffix(fileSuffix)) { @@ -599,7 +599,7 @@ String8 DrmManager::getSupportedPlugInIdFromPath(int uniqueId, const String8& pa  void DrmManager::onInfo(const DrmInfoEvent& event) {      Mutex::Autolock _l(mListenerLock); -    for (unsigned int index = 0; index < mServiceListeners.size(); index++) { +    for (size_t index = 0; index < mServiceListeners.size(); index++) {          int uniqueId = mServiceListeners.keyAt(index);          if (uniqueId == event.getUniqueId()) { diff --git a/drm/libdrmframework/include/PlugInManager.h b/drm/libdrmframework/include/PlugInManager.h index 7bb143f..c1d019a 100644 --- a/drm/libdrmframework/include/PlugInManager.h +++ b/drm/libdrmframework/include/PlugInManager.h @@ -80,7 +80,7 @@ public:          Vector<String8> plugInFileList = getPlugInPathList(rsPlugInDirPath);          if (!plugInFileList.isEmpty()) { -            for (unsigned int i = 0; i < plugInFileList.size(); ++i) { +            for (size_t i = 0; i < plugInFileList.size(); ++i) {                  loadPlugIn(plugInFileList[i]);              }          } @@ -91,7 +91,7 @@ public:       *       */      void unloadPlugIns() { -        for (unsigned int i = 0; i < m_plugInIdList.size(); ++i) { +        for (size_t i = 0; i < m_plugInIdList.size(); ++i) {              unloadPlugIn(m_plugInIdList[i]);          }          m_plugInIdList.clear(); diff --git a/media/libstagefright/CameraSourceTimeLapse.cpp b/media/libstagefright/CameraSourceTimeLapse.cpp index daf788b..591daac 100644 --- a/media/libstagefright/CameraSourceTimeLapse.cpp +++ b/media/libstagefright/CameraSourceTimeLapse.cpp @@ -134,7 +134,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/mtp/MtpDevice.cpp b/media/mtp/MtpDevice.cpp index 1df7af9..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 (unsigned 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 (unsigned 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 0b1f527..155f645 100644 --- a/media/mtp/MtpServer.cpp +++ b/media/mtp/MtpServer.cpp @@ -125,7 +125,7 @@ void MtpServer::addStorage(MtpStorage* storage) {  void MtpServer::removeStorage(MtpStorage* storage) {      Mutex::Autolock autoLock(mMutex); -    for (unsigned 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 +137,7 @@ void MtpServer::removeStorage(MtpStorage* storage) {  MtpStorage* MtpServer::getStorage(MtpStorageID id) {      if (id == 0)          return mStorages[0]; -    for (unsigned 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; diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index 26dac95..c0c34f7 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -525,7 +525,7 @@ sp<IAudioTrack> AudioFlinger::createTrack(          }          // Look for sync events awaiting for a session to be used. -        for (int i = 0; i < (int)mPendingSyncEvents.size(); i++) { +        for (size_t i = 0; i < mPendingSyncEvents.size(); i++) {              if (mPendingSyncEvents[i]->triggerSession() == lSessionId) {                  if (thread->isValidSyncEvent(mPendingSyncEvents[i])) {                      if (lStatus == NO_ERROR) { @@ -831,7 +831,7 @@ status_t AudioFlinger::setStreamMute(audio_stream_type_t stream, bool muted)      AutoMutex lock(mLock);      mStreamTypes[stream].mute = muted; -    for (uint32_t i = 0; i < mPlaybackThreads.size(); i++) +    for (size_t i = 0; i < mPlaybackThreads.size(); i++)          mPlaybackThreads.valueAt(i)->setStreamMute(stream, muted);      return NO_ERROR; diff --git a/services/audioflinger/Tracks.cpp b/services/audioflinger/Tracks.cpp index fccc7b8..b59333f 100644 --- a/services/audioflinger/Tracks.cpp +++ b/services/audioflinger/Tracks.cpp @@ -895,7 +895,7 @@ bool AudioFlinger::PlaybackThread::Track::presentationComplete(size_t framesWrit  void AudioFlinger::PlaybackThread::Track::triggerEvents(AudioSystem::sync_event_t type)  { -    for (int i = 0; i < (int)mSyncEvents.size(); i++) { +    for (size_t i = 0; i < mSyncEvents.size(); i++) {          if (mSyncEvents[i]->type() == type) {              mSyncEvents[i]->trigger();              mSyncEvents.removeAt(i);  | 
