From bb8702d5d8d4929c768d0747c270e41ab3269e8f Mon Sep 17 00:00:00 2001 From: Wei-Cheng Pan Date: Mon, 3 Oct 2016 14:54:10 +0800 Subject: [PATCH] Bug 1307360 - Use MOZ_MUST_USE in netwerk/protocol/device r=valentin MozReview-Commit-ID: Kc7a7GksoZl --HG-- extra : rebase_source : 3c42b88d4780c21401a1e10c87d3e51b83faba5c --- netwerk/protocol/device/AndroidCaptureProvider.h | 2 +- netwerk/protocol/device/CameraStreamImpl.h | 2 +- netwerk/protocol/device/nsDeviceCaptureProvider.h | 6 +++--- netwerk/protocol/device/nsDeviceChannel.h | 8 ++++---- netwerk/protocol/device/nsDeviceProtocolHandler.h | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/netwerk/protocol/device/AndroidCaptureProvider.h b/netwerk/protocol/device/AndroidCaptureProvider.h index 099f3f4312a1..dd99ea54115b 100644 --- a/netwerk/protocol/device/AndroidCaptureProvider.h +++ b/netwerk/protocol/device/AndroidCaptureProvider.h @@ -25,7 +25,7 @@ class AndroidCaptureProvider final : public nsDeviceCaptureProvider { NS_DECL_THREADSAFE_ISUPPORTS - nsresult Init(nsACString& aContentType, nsCaptureParams* aParams, nsIInputStream** aStream) override; + MOZ_MUST_USE nsresult Init(nsACString& aContentType, nsCaptureParams* aParams, nsIInputStream** aStream) override; static AndroidCaptureProvider* sInstance; }; diff --git a/netwerk/protocol/device/CameraStreamImpl.h b/netwerk/protocol/device/CameraStreamImpl.h index f5ea97cb587e..93037caf66f2 100644 --- a/netwerk/protocol/device/CameraStreamImpl.h +++ b/netwerk/protocol/device/CameraStreamImpl.h @@ -37,7 +37,7 @@ public: return mCallback; } - bool Init(const nsCString& contentType, const uint32_t& camera, const uint32_t& width, const uint32_t& height, FrameCallback* callback); + MOZ_MUST_USE bool Init(const nsCString& contentType, const uint32_t& camera, const uint32_t& width, const uint32_t& height, FrameCallback* callback); void Close(); uint32_t GetWidth() { return mWidth; } diff --git a/netwerk/protocol/device/nsDeviceCaptureProvider.h b/netwerk/protocol/device/nsDeviceCaptureProvider.h index edfe378fcb50..024f6689d616 100644 --- a/netwerk/protocol/device/nsDeviceCaptureProvider.h +++ b/netwerk/protocol/device/nsDeviceCaptureProvider.h @@ -23,9 +23,9 @@ struct nsCaptureParams { class nsDeviceCaptureProvider : public nsISupports { public: - virtual nsresult Init(nsACString& aContentType, - nsCaptureParams* aParams, - nsIInputStream** aStream) = 0; + virtual MOZ_MUST_USE nsresult Init(nsACString& aContentType, + nsCaptureParams* aParams, + nsIInputStream** aStream) = 0; }; #endif diff --git a/netwerk/protocol/device/nsDeviceChannel.h b/netwerk/protocol/device/nsDeviceChannel.h index 6361dafd9a71..8c3e44793101 100644 --- a/netwerk/protocol/device/nsDeviceChannel.h +++ b/netwerk/protocol/device/nsDeviceChannel.h @@ -15,10 +15,10 @@ public: nsDeviceChannel(); - nsresult Init(nsIURI* uri); - nsresult OpenContentStream(bool aAsync, - nsIInputStream **aStream, - nsIChannel **aChannel) override; + MOZ_MUST_USE nsresult Init(nsIURI* uri); + MOZ_MUST_USE nsresult OpenContentStream(bool aAsync, + nsIInputStream **aStream, + nsIChannel **aChannel) override; protected: ~nsDeviceChannel(); diff --git a/netwerk/protocol/device/nsDeviceProtocolHandler.h b/netwerk/protocol/device/nsDeviceProtocolHandler.h index 006f70328cd7..dee9b4f8f0b7 100644 --- a/netwerk/protocol/device/nsDeviceProtocolHandler.h +++ b/netwerk/protocol/device/nsDeviceProtocolHandler.h @@ -26,7 +26,7 @@ public: nsDeviceProtocolHandler() {} - nsresult Init(); + MOZ_MUST_USE nsresult Init(); }; } // namespace net