Bug 1404035 Address unused-result warning in toolkit/components/filewatcher/NativeFileWatcherWin.cpp
We are intentionally releasing a UniquePtr here, so mark it Unused.
MozReview-Commit-ID: LkLgh4PxyIG
--- a/toolkit/components/filewatcher/NativeFileWatcherWin.cpp
+++ b/toolkit/components/filewatcher/NativeFileWatcherWin.cpp
@@ -1334,17 +1334,17 @@ NativeFileWatcherService::AddPath(const
&NativeFileWatcherIOTask::AddPathRunnableMethod,
wrappedCallbacks.get()),
nsIEventTarget::DISPATCH_NORMAL);
if (NS_FAILED(rv)) {
return rv;
}
// Since the dispatch succeeded, we let the runnable own the pointer.
- wrappedCallbacks.release();
+ Unused << wrappedCallbacks.release();
WakeUpWorkerThread();
return NS_OK;
}
/**
* Removes the path from the list of watched resources. Silently ignores the request
@@ -1408,17 +1408,17 @@ NativeFileWatcherService::RemovePath(con
&NativeFileWatcherIOTask::RemovePathRunnableMethod,
wrappedCallbacks.get()),
nsIEventTarget::DISPATCH_NORMAL);
if (NS_FAILED(rv)) {
return rv;
}
// Since the dispatch succeeded, we let the runnable own the pointer.
- wrappedCallbacks.release();
+ Unused << wrappedCallbacks.release();
WakeUpWorkerThread();
return NS_OK;
}
/**
* Removes all the watched resources from the watch list and stops the