gecko-dev/dom/system/gonk
Nicholas Nethercote 34dcc7b852 Bug 1299384 - Use MOZ_MUST_USE with NS_warn_if_impl(). r=erahm.
This change avoids lots of false positives for Coverity's CHECKED_RETURN
warning, caused by NS_WARN_IF's current use in both statement-style and
expression-style.

In the case where the code within the NS_WARN_IF has side-effects, I made the
following change.

> NS_WARN_IF(NS_FAILED(FunctionWithSideEffects()));
> -->
> Unused << NS_WARN_IF(NS_FAILED(FunctionWithSideEffects()));

In the case where the code within the NS_WARN_IF lacks side-effects, I made the
following change.

> NS_WARN_IF(!condWithoutSideEffects);
> -->
> NS_WARNING_ASSERTION(condWithoutSideEffects, "msg");

This has two improvements.
- The condition is not evaluated in non-debug builds.
- The sense of the condition is inverted to the familiar "this condition should
  be true" sense used in assertions.

A common variation on the side-effect-free case is the following.

> nsresult rv = Fn();
> NS_WARN_IF_(NS_FAILED(rv));
> -->
> DebugOnly<nsresult rv> = Fn();
> NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Fn failed");

--HG--
extra : rebase_source : 58788245021096efa8372a9dc1d597a611d45611
2016-09-02 17:12:24 +10:00
..
android_audio Bug 1218629 - Save audio volume for each device to setting db r=alwu 2015-12-23 23:31:34 -08:00
mozstumbler Bug 1297010 - Check nsGZFileWriter::Write() return value r=gsvelto 2016-08-22 14:00:00 +02:00
tests Bug 1292999 - Replace Iterator() in dom/; r=arai 2016-08-11 22:05:49 -04:00
AudioChannelManager.cpp Bug 1299384 - Use MOZ_MUST_USE with NS_warn_if_impl(). r=erahm. 2016-09-02 17:12:24 +10:00
AudioChannelManager.h Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
AudioManager.cpp Bug 1294463 - Followup 1292892, remove nsContentUtils::RootingCx() r=jandem 2016-08-11 20:42:53 +02:00
AudioManager.h Bug 1249437 - Remove workaround of volume control r=alwu 2016-03-09 15:34:07 -08:00
AutoMounter.cpp Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01:00
AutoMounter.h
AutoMounterSetting.cpp Bug 1294463 - Followup 1292892, remove nsContentUtils::RootingCx() r=jandem 2016-08-11 20:42:53 +02:00
AutoMounterSetting.h
DataCallInterfaceService.js Bug 1174998 - Part 3: Read data call's MTU from network/apn settings. r=echen 2015-09-23 15:35:32 +08:00
DataCallInterfaceService.manifest
DataCallManager.js Bug 1110619 - Part 2: Implementation Changes. r=echen 2015-11-10 15:30:48 +08:00
DataCallManager.manifest
GeolocationUtil.cpp
GeolocationUtil.h
GonkGPSGeolocationProvider.cpp Bug 1294463 - Followup 1292892, remove nsContentUtils::RootingCx() r=jandem 2016-08-11 20:42:53 +02:00
GonkGPSGeolocationProvider.h
MozMtpCommon.h
MozMtpDatabase.cpp Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm. 2016-08-08 12:18:10 +10:00
MozMtpDatabase.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
MozMtpServer.cpp Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm. 2016-08-08 12:18:10 +10:00
MozMtpServer.h Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01:00
MozMtpStorage.cpp Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
MozMtpStorage.h Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01:00
NetIdManager.cpp
NetIdManager.h
NetworkInterfaceListService.js
NetworkInterfaceListService.manifest
NetworkManager.js Bug 1000040 - Part 2: Implement EthernetManager; r=vicamo 2016-02-19 16:06:29 +08:00
NetworkManager.manifest Bug 1000040 - Part 2: Implement EthernetManager; r=vicamo 2016-02-19 16:06:29 +08:00
NetworkService.js Bug 1000040 - Part 1: Add required APIs for Ethernet; r=vicamo,bholley 2016-02-19 16:06:21 +08:00
NetworkService.manifest Bug 1000040 - Part 1: Add required APIs for Ethernet; r=vicamo,bholley 2016-02-19 16:06:21 +08:00
NetworkUtils.cpp Bug 1293384 - Part 1: Rename snprintf_literal to SprintfLiteral. r=froydnj 2016-08-14 23:44:00 -07:00
NetworkUtils.h Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01:00
NetworkWorker.cpp Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm. 2016-08-08 12:18:10 +10:00
NetworkWorker.h
OpenFileFinder.cpp
OpenFileFinder.h
RILSystemMessenger.jsm
RILSystemMessengerHelper.js Bug 1202902 - Mass replace toplevel 'let' with 'var' in preparation for global lexical scope. (rs=jorendorff) 2015-09-15 11:19:45 -07:00
RILSystemMessengerHelper.manifest
RadioInterfaceLayer.js Bug 1110619 - Part 2: Implementation Changes. r=echen 2015-11-10 15:30:48 +08:00
RadioInterfaceLayer.manifest
SystemProperty.cpp Bug 1245100: Include missing headers in SystemProperty.cpp, r=edgar 2016-02-03 09:52:24 +01:00
SystemProperty.h Bug 1236433 - Part 1: Provide a Native Wrapper to Allow Fallback When property_get/set is Unavailable; r=edgar 2016-01-07 18:40:19 +08:00
SystemWorkerManager.cpp Bug 1257335. Replace some AutoSafeJSContext uses with AutoJSAPI or AutoJSContext uses. r=bholley 2016-03-18 10:48:38 -04:00
SystemWorkerManager.h Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01:00
TetheringService.js Bug 1217093 - Remove for-each from dom/. r=smaug 2015-10-19 02:00:50 +09:00
TetheringService.manifest
TimeZoneSettingObserver.cpp
TimeZoneSettingObserver.h
Volume.cpp Bug 1262557 Correct misspelled comment r=jdm 2016-04-06 14:22:14 -04:00
Volume.h Bug 1177374 - Call realpath on volume mount points so thatVolumeService::GetVolumeByPath works properly. r=achen 2015-10-15 11:42:10 -07:00
VolumeCommand.cpp
VolumeCommand.h Bug 1245093: Explictly refer to |class ResponseCode| in global namespace, r=dhylands 2016-02-03 09:51:49 +01:00
VolumeManager.cpp Bug 1273520 - NS_NewRunnable* renaming and include task.h r=fabrice 2016-05-18 18:25:35 +02:00
VolumeManager.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
VolumeManagerLog.h
VolumeServiceIOThread.cpp Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
VolumeServiceIOThread.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
VolumeServiceTest.cpp Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm. 2016-08-08 12:18:10 +10:00
VolumeServiceTest.h
moz.build Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00
nsIAudioManager.idl
nsIDataCallInterfaceService.idl Bug 1174998 - Part 3: Read data call's MTU from network/apn settings. r=echen 2015-09-23 15:35:32 +08:00
nsIDataCallManager.idl
nsIGonkDataCallInterfaceService.idl
nsINetworkInterface.idl Bug 1000040 - Part 2: Implement EthernetManager; r=vicamo 2016-02-19 16:06:29 +08:00
nsINetworkInterfaceListService.idl
nsINetworkManager.idl Bug 1000040 - Part 2: Implement EthernetManager; r=vicamo 2016-02-19 16:06:29 +08:00
nsINetworkService.idl Bug 1000040 - Part 1: Add required APIs for Ethernet; r=vicamo,bholley 2016-02-19 16:06:21 +08:00
nsINetworkWorker.idl
nsIRadioInterfaceLayer.idl Bug 1239906 - Deprecate nsIRadioInterfaceLayer.getClientIdForEmergencyCall(). r=bevis 2015-10-24 19:57:20 +08:00
nsISystemWorkerManager.idl
nsITetheringService.idl Bug 1187262 - Let the flag 'Services.io.offline' reference the state of tethering. r=jjong 2015-10-05 09:59:08 +08:00
nsIVolume.idl
nsIVolumeMountLock.idl
nsIVolumeService.idl
nsIVolumeStat.idl
nsIWorkerHolder.idl
nsVolume.cpp Bug 1273520 - NS_NewRunnable* renaming and include task.h r=fabrice 2016-05-18 18:25:35 +02:00
nsVolume.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
nsVolumeMountLock.cpp Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
nsVolumeMountLock.h Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01:00
nsVolumeService.cpp Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm. 2016-08-08 12:18:10 +10:00
nsVolumeService.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
nsVolumeStat.cpp
nsVolumeStat.h
ril_consts.js Bug 1122376 - Support read SIM contact dialling number exceed 20 digits. r=echen 2015-09-20 19:48:00 +02:00
ril_worker.js Bug 1292999 - Replace Iterator() in dom/; r=arai 2016-08-11 22:05:49 -04:00
ril_worker_buf_object.js
ril_worker_telephony_request_queue.js
systemlibs.js Bug 1202902 - Mass replace toplevel 'let' with 'var' in preparation for global lexical scope. (rs=jorendorff) 2015-09-15 11:19:45 -07:00
worker_buf.js Bug 1202902 - Mass replace toplevel 'let' with 'var' in preparation for global lexical scope. (rs=jorendorff) 2015-09-15 11:19:45 -07:00