Bug 1273079 - Use MOZ_MUST_USE in hal. r=gsvelto

MozReview-Commit-ID: 7VLDpz34DRu

--HG--
extra : transplant_source : %D5%E0%AF%84%AE%B2%0B%B8%E3%8D%A4%A8/%A41M%FA%81%AA%7D
This commit is contained in:
Wei-Cheng Pan 2016-05-16 17:24:03 +08:00
Родитель 72c8e58003
Коммит 8e81e61205
3 изменённых файлов: 7 добавлений и 6 удалений

Просмотреть файл

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

Просмотреть файл

@ -394,7 +394,7 @@ void NotifyScreenConfigurationChange(const hal::ScreenConfiguration& aScreenConf
* Lock the screen orientation to the specific orientation. * Lock the screen orientation to the specific orientation.
* @return Whether the lock has been accepted. * @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. * Unlock the screen orientation.
@ -438,7 +438,7 @@ void NotifySwitchStateFromInputDevice(hal::SwitchDevice aDevice,
* *
* Currently, there can only be 0 or 1 alarm observers. * 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 * 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 * This API is currently only allowed to be used from non-sandboxed
* contexts. * 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. * Set the priority of the given process.
@ -585,7 +585,7 @@ hal::FMRadioSettings GetFMBandSettings(hal::FMRadioCountry aCountry);
/** /**
* Enable RDS data reception * Enable RDS data reception
*/ */
bool EnableRDS(uint32_t aMask); MOZ_MUST_USE bool EnableRDS(uint32_t aMask);
/** /**
* Disable RDS data reception * Disable RDS data reception

Просмотреть файл

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