Bug 1073003 - Fix -Wunused-variable / -Wunused-but-set-variable warnings. r=ehsan
authorBotond Ballo <botond@mozilla.com>
Wed, 31 Dec 2014 16:49:13 -0500
changeset 222560 0340001fb80a110b70d8a4fd0ea1f6b5cca51d1a
parent 222559 c717d72546c79708d90f22a9d352fc0cfc4bda86
child 222561 e186ff7a5b4038b8f96285cc884f2fbd7fe652a9
push id28068
push usercbook@mozilla.com
push dateThu, 08 Jan 2015 13:16:34 +0000
treeherdermozilla-central@2880e05d5e32 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs1073003
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1073003 - Fix -Wunused-variable / -Wunused-but-set-variable warnings. r=ehsan
dom/media/omx/MediaCodecProxy.cpp
dom/media/omx/OMXCodecDescriptorUtil.cpp
dom/media/omx/OmxDecoder.cpp
dom/system/gonk/VolumeManager.cpp
gfx/layers/opengl/GrallocTextureHost.cpp
--- a/dom/media/omx/MediaCodecProxy.cpp
+++ b/dom/media/omx/MediaCodecProxy.cpp
@@ -177,17 +177,17 @@ MediaCodecProxy::releaseCodec()
   {
     // Write Lock for mCodec
     RWLock::AutoWLock awl(mCodecLock);
 
     codec = mCodec;
 
     // Release MediaCodec
     if (mCodec != nullptr) {
-      status_t err = mCodec->stop();
+      mCodec->stop();
       mCodec->release();
       mCodec = nullptr;
     }
   }
 
   while (codec.promote() != nullptr) {
     // this value come from stagefright's AwesomePlayer.
     usleep(1000);
@@ -488,17 +488,16 @@ MediaCodecProxy::resourceCanceled()
   if (listener != nullptr) {
     listener->codecCanceled();
   }
 }
 
 bool MediaCodecProxy::Prepare()
 {
 
-  status_t err;
   if (start() != OK) {
     MCP_LOG("Couldn't start MediaCodec");
     return false;
   }
   if (getInputBuffers(&mInputBuffers) != OK) {
     MCP_LOG("Couldn't get input buffers from MediaCodec");
     return false;
   }
--- a/dom/media/omx/OMXCodecDescriptorUtil.cpp
+++ b/dom/media/omx/OMXCodecDescriptorUtil.cpp
@@ -184,17 +184,16 @@ GenerateAVCDescriptorBlob(sp<AMessage>& 
     }
   }
 
   MOZ_ASSERT(sps != nullptr && pps != nullptr);
   if (sps == nullptr || pps == nullptr) {
     return ERROR_MALFORMED;
   }
 
-  status_t result = OK;
   if (aFormat == OMXVideoEncoder::BlobFormat::AVC_NAL) {
     // SPS + PPS.
     aOutputBuf->AppendElements(sps->data(), sps->size());
     aOutputBuf->AppendElements(pps->data(), pps->size());
     return OK;
   } else {
     status_t result = ConvertParamSetsToDescriptorBlob(sps, pps, aOutputBuf);
     MOZ_ASSERT(result == OK);
--- a/dom/media/omx/OmxDecoder.cpp
+++ b/dom/media/omx/OmxDecoder.cpp
@@ -113,17 +113,16 @@ static sp<IOMX> GetOMX()
 
 bool OmxDecoder::Init(sp<MediaExtractor>& extractor) {
 #ifdef PR_LOGGING
   if (!gOmxDecoderLog) {
     gOmxDecoderLog = PR_NewLogModule("OmxDecoder");
   }
 #endif
 
-  const char* extractorMime;
   sp<MetaData> meta = extractor->getMetaData();
 
   ssize_t audioTrackIndex = -1;
   ssize_t videoTrackIndex = -1;
 
   for (size_t i = 0; i < extractor->countTracks(); ++i) {
     sp<MetaData> meta = extractor->getTrackMetaData(i);
 
@@ -171,17 +170,16 @@ bool OmxDecoder::EnsureMetadata() {
   int64_t totalDurationUs = 0;
   int64_t durationUs = 0;
   if (mVideoTrack.get() && mVideoTrack->getFormat()->findInt64(kKeyDuration, &durationUs)) {
     if (durationUs > totalDurationUs)
       totalDurationUs = durationUs;
   }
   if (mAudioTrack.get()) {
     durationUs = -1;
-    const char* audioMime;
     sp<MetaData> meta = mAudioTrack->getFormat();
 
     if ((durationUs == -1) && meta->findInt64(kKeyDuration, &durationUs)) {
       if (durationUs > totalDurationUs) {
         totalDurationUs = durationUs;
       }
     }
   }
--- a/dom/system/gonk/VolumeManager.cpp
+++ b/dom/system/gonk/VolumeManager.cpp
@@ -175,17 +175,16 @@ void VolumeManager::InitConfig()
   int n = 0;
   char line[255];
   const char *filename = "/system/etc/volume.cfg";
   if (!(fp = fopen(filename, "r"))) {
     LOG("Unable to open volume configuration file '%s' - ignoring", filename);
     return;
   }
   while(fgets(line, sizeof(line), fp)) {
-    const char *delim = " \t\n";
     n++;
 
     if (line[0] == '#')
       continue;
 
     nsCString commandline(line);
     nsCWhitespaceTokenizer tokenizer(commandline);
     if (!tokenizer.hasMoreTokens()) {
--- a/gfx/layers/opengl/GrallocTextureHost.cpp
+++ b/gfx/layers/opengl/GrallocTextureHost.cpp
@@ -226,17 +226,17 @@ GrallocTextureHostOGL::GetRenderState()
 
   return LayerRenderState();
 }
 
 TemporaryRef<gfx::DataSourceSurface>
 GrallocTextureHostOGL::GetAsSurface() {
   android::GraphicBuffer* graphicBuffer = GetGraphicBufferFromDesc(mGrallocHandle).get();
   uint8_t* grallocData;
-  int32_t rv = graphicBuffer->lock(GRALLOC_USAGE_SW_READ_OFTEN, reinterpret_cast<void**>(&grallocData));
+  graphicBuffer->lock(GRALLOC_USAGE_SW_READ_OFTEN, reinterpret_cast<void**>(&grallocData));
   RefPtr<gfx::DataSourceSurface> grallocTempSurf =
     gfx::Factory::CreateWrappingDataSourceSurface(grallocData,
                                                   graphicBuffer->getStride() * android::bytesPerPixel(graphicBuffer->getPixelFormat()),
                                                   GetSize(), GetFormat());
   RefPtr<gfx::DataSourceSurface> surf = CreateDataSourceSurfaceByCloning(grallocTempSurf);
 
   graphicBuffer->unlock();