Bug 1273079 - Use MOZ_MUST_USE in hal. r=gsvelto

MozReview-Commit-ID: 7VLDpz34DRu

--HG--
extra : transplant_source : O%9DK%DCOc%D8%CB%FD%EFf%04%C4%B4%DA%A2x%FF%88%99
This commit is contained in:
Wei-Cheng Pan 2016-05-16 17:24:03 +08:00
parent 0b04616a47
commit 4743ce02cd
3 changed files with 7 additions and 6 deletions

View File

@ -553,7 +553,8 @@ ScreenOrientation::UpdateActiveOrientationLock(ScreenOrientationInternal aOrient
if (aOrientation == eScreenOrientation_None) {
hal::UnlockScreenOrientation();
} else {
hal::LockScreenOrientation(aOrientation);
bool rv = hal::LockScreenOrientation(aOrientation);
NS_WARN_IF(!rv);
}
}

View File

@ -394,7 +394,7 @@ void NotifyScreenConfigurationChange(const hal::ScreenConfiguration& aScreenConf
* Lock the screen orientation to the specific orientation.
* @return Whether the lock has been accepted.
*/
bool LockScreenOrientation(const dom::ScreenOrientationInternal& aOrientation);
MOZ_MUST_USE bool LockScreenOrientation(const dom::ScreenOrientationInternal& aOrientation);
/**
* Unlock the screen orientation.
@ -438,7 +438,7 @@ void NotifySwitchStateFromInputDevice(hal::SwitchDevice aDevice,
*
* Currently, there can only be 0 or 1 alarm observers.
*/
bool RegisterTheOneAlarmObserver(hal::AlarmObserver* aObserver);
MOZ_MUST_USE bool RegisterTheOneAlarmObserver(hal::AlarmObserver* aObserver);
/**
* Unregister the alarm observer. Doing so will implicitly cancel any
@ -465,7 +465,7 @@ void NotifyAlarmFired();
* This API is currently only allowed to be used from non-sandboxed
* contexts.
*/
bool SetAlarm(int32_t aSeconds, int32_t aNanoseconds);
MOZ_MUST_USE bool SetAlarm(int32_t aSeconds, int32_t aNanoseconds);
/**
* Set the priority of the given process.
@ -585,7 +585,7 @@ hal::FMRadioSettings GetFMBandSettings(hal::FMRadioCountry aCountry);
/**
* Enable RDS data reception
*/
bool EnableRDS(uint32_t aMask);
MOZ_MUST_USE bool EnableRDS(uint32_t aMask);
/**
* Disable RDS data reception

View File

@ -67,7 +67,7 @@ void DisableSwitchNotifications(hal::SwitchDevice aDevice);
/**
* Enable alarm notifications from the backend.
*/
bool EnableAlarm();
MOZ_MUST_USE bool EnableAlarm();
/**
* Disable alarm notifications from the backend.