Bug 1257410 - Use %p and cast in printf to avoid C4477 on VS2015; r=khuey
authorGregory Szorc <gps@mozilla.com>
Mon, 21 Mar 2016 14:19:18 -0700
changeset 289785 cdf79a0b9a3b9c26741e67df444ce000a0b8baa4
parent 289784 7f3a38541755d5803b13a9a794a687d19c50aec4
child 289786 36595ad87d9cc2dc85b2f4eaebeed57bdd203544
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs1257410
milestone48.0a1
Bug 1257410 - Use %p and cast in printf to avoid C4477 on VS2015; r=khuey MozReview-Commit-ID: 21XrhzPiJFQ
xpcom/tests/windows/TestCOM.cpp
--- a/xpcom/tests/windows/TestCOM.cpp
+++ b/xpcom/tests/windows/TestCOM.cpp
@@ -49,25 +49,25 @@ private:
 };
 
 NS_IMPL_QUERY_INTERFACE(nsTestCom, nsITestCom)
 
 MozExternalRefCountType nsTestCom::AddRef()
 {
   nsrefcnt res = ++mRefCnt;
   NS_LOG_ADDREF(this, mRefCnt, "nsTestCom", sizeof(*this));
-  printf("nsTestCom: Adding ref = %d\n", res);
+  printf("nsTestCom: Adding ref = %p\n", (void *)res);
   return res;
 }
 
 MozExternalRefCountType nsTestCom::Release()
 {
   nsrefcnt res = --mRefCnt;
   NS_LOG_RELEASE(this, mRefCnt, "nsTestCom");
-  printf("nsTestCom: Releasing = %d\n", res);
+  printf("nsTestCom: Releasing = %p\n", (void *)res);
   if (res == 0) {
     delete this;
   }
   return res;
 }
 
 class nsTestComFactory final : public nsIFactory {
   ~nsTestComFactory() {}