Skip to content

Commit

Permalink
Bug 1073003 - Fix more -Wunused-variable and -Wunused-but-set-variabl…
Browse files Browse the repository at this point in the history
…e warnings. r=ehsan

--HG--
extra : rebase_source : bb768dd07c19dc39994d5cca6e0f59048d12130a
  • Loading branch information
theres-waldo committed Dec 17, 2014
1 parent c97b750 commit edd363a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion dom/fmradio/FMRadioService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "nsJSUtils.h"
#include "mozilla/dom/BindingUtils.h"
#include "mozilla/dom/SettingChangeNotificationBinding.h"
#include "mozilla/DebugOnly.h"

#define TUNE_THREAD_TIMEOUT_MS 5000

Expand Down Expand Up @@ -780,7 +781,7 @@ FMRadioService::SetRDSGroupMask(uint32_t aRDSGroupMask)
{
mRDSGroupMask = aRDSGroupMask;
if (IsFMRadioOn() && mRDSEnabled) {
bool enabled = hal::EnableRDS(mRDSGroupMask | DOM_PARSED_RDS_GROUPS);
DebugOnly<bool> enabled = hal::EnableRDS(mRDSGroupMask | DOM_PARSED_RDS_GROUPS);
MOZ_ASSERT(enabled);
}
}
Expand Down
7 changes: 4 additions & 3 deletions hal/gonk/GonkHal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#include "HalLog.h"
#include "mozilla/ArrayUtils.h"
#include "mozilla/dom/battery/Constants.h"
#include "mozilla/DebugOnly.h"
#include "mozilla/FileUtils.h"
#include "mozilla/Monitor.h"
#include "mozilla/RefPtr.h"
Expand Down Expand Up @@ -529,7 +530,7 @@ GetCurrentBatteryCharge(int* aCharge)
static bool
GetCurrentBatteryCharging(int* aCharging)
{
static const int BATTERY_NOT_CHARGING = 0;
static const DebugOnly<int> BATTERY_NOT_CHARGING = 0;
static const int BATTERY_CHARGING_USB = 1;
static const int BATTERY_CHARGING_AC = 2;

Expand Down Expand Up @@ -1313,8 +1314,8 @@ EnsureKernelLowMemKillerParamsSet()
nsAutoCString adjParams;
nsAutoCString minfreeParams;

int32_t lowerBoundOfNextOomScoreAdj = OOM_SCORE_ADJ_MIN - 1;
int32_t lowerBoundOfNextKillUnderKB = 0;
DebugOnly<int32_t> lowerBoundOfNextOomScoreAdj = OOM_SCORE_ADJ_MIN - 1;
DebugOnly<int32_t> lowerBoundOfNextKillUnderKB = 0;
int32_t countOfLowmemorykillerParametersSets = 0;

long page_size = sysconf(_SC_PAGESIZE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,6 @@ WebrtcOMXH264VideoDecoder::Decode(const webrtc::EncodedImage& aInputImage,

bool feedFrame = true;
while (feedFrame) {
int64_t timeUs;
status_t err = mOMX->FillInput(aInputImage, !configured, aRenderTimeMs);
feedFrame = (err == -EAGAIN); // No input buffer available. Try again.
}
Expand Down
5 changes: 3 additions & 2 deletions netwerk/protocol/rtsp/rtsp/RTSPSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "nsString.h"
#include "nsStringStream.h"
#include "nsAutoPtr.h"
#include "mozilla/DebugOnly.h"

using namespace mozilla;
using namespace mozilla::net;
Expand Down Expand Up @@ -595,7 +596,7 @@ void RTSPSource::onConnected(bool isSeekable)
meta->SetTotalTracks(numTracks);
meta->SetMimeType(mimeType);

bool success;
DebugOnly<bool> success;
success = format->findInt64(kKeyDuration, &int64Value);
MOZ_ASSERT(success);
meta->SetDuration(int64Value);
Expand Down Expand Up @@ -713,7 +714,7 @@ void RTSPSource::onTrackDataAvailable(size_t trackIndex)
meta = new mozilla::net::RtspMetaData();

MOZ_ASSERT(accessUnit != NULL);
bool success = accessUnit->meta()->findInt64("timeUs", &int64Value);
DebugOnly<bool> success = accessUnit->meta()->findInt64("timeUs", &int64Value);
MOZ_ASSERT(success);
meta->SetTimeStamp(int64Value);

Expand Down

0 comments on commit edd363a

Please sign in to comment.