Bug 797316 - Fix -Werror=conversion-null errors in Windows-only code (xpcom/threads part) r=ehsan
authorJacek Caban <jacek@codeweavers.com>
Thu, 04 Oct 2012 10:30:03 +0200
changeset 115522 5d2aec62e1550db2f5bdef6f244e44dced480b3d
parent 115521 739f8aac68a6ba0a57d9dfc2b45630fd300d9e57
child 115523 64ac66fde0afa8721692dc8f65efb882dc301307
push id1
push usersledru@mozilla.com
push dateThu, 04 Dec 2014 17:57:20 +0000
reviewersehsan
bugs797316
milestone18.0a1
Bug 797316 - Fix -Werror=conversion-null errors in Windows-only code (xpcom/threads part) r=ehsan
xpcom/threads/HangMonitor.cpp
xpcom/threads/nsProcessCommon.cpp
--- a/xpcom/threads/HangMonitor.cpp
+++ b/xpcom/threads/HangMonitor.cpp
@@ -314,16 +314,18 @@ NotifyActivity(ActivityType activityType
     break;
   case kActivityUIAVail:
   case kUIActivity:
     if (gTimestamp != PR_INTERVAL_NO_WAIT) {
       cumulativeUILagMS += PR_IntervalToMilliseconds(PR_IntervalNow() -
                                                      gTimestamp);
     }
     break;
+  default:
+    break;
   }
 
   // This is not a locked activity because PRTimeStamp is a 32-bit quantity
   // which can be read/written atomically, and we don't want to pay locking
   // penalties here.
   gTimestamp = PR_IntervalNow();
 
   // If we have UI activity we should reset the timer and report it if it is
--- a/xpcom/threads/nsProcessCommon.cpp
+++ b/xpcom/threads/nsProcessCommon.cpp
@@ -560,17 +560,17 @@ NS_IMETHODIMP
 nsProcess::Kill()
 {
     if (!mThread)
         return NS_ERROR_FAILURE;
 
     {
         MutexAutoLock lock(mLock);
 #if defined(PROCESSMODEL_WINAPI)
-        if (TerminateProcess(mProcess, NULL) == 0)
+        if (TerminateProcess(mProcess, 0) == 0)
             return NS_ERROR_FAILURE;
 #elif defined(XP_MACOSX)
         if (kill(mPid, SIGKILL) != 0)
             return NS_ERROR_FAILURE;
 #else
         if (!mProcess || (PR_KillProcess(mProcess) != PR_SUCCESS))
             return NS_ERROR_FAILURE;
 #endif