Bug 1316116: Fix the clang-cl build in TestNamedPipeService.cpp. r=bagder
authorDavid Major <dmajor@mozilla.com>
Wed, 09 Nov 2016 10:38:36 -0600
changeset 348604 f8636cfef9241541c548e89b0e89f487380f496a
parent 348603 02876b8cf2b0fa790cd608317c54c117a05994cd
child 348605 986861e6c5ce12b224d94c3de0b8af6df25a01a4
push id10298
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:33:03 +0000
treeherdermozilla-aurora@7e29173b1641 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbagder
bugs1316116
milestone52.0a1
Bug 1316116: Fix the clang-cl build in TestNamedPipeService.cpp. r=bagder MozReview-Commit-ID: 8ZLGIHc8PyA
netwerk/test/TestNamedPipeService.cpp
--- a/netwerk/test/TestNamedPipeService.cpp
+++ b/netwerk/test/TestNamedPipeService.cpp
@@ -22,17 +22,17 @@ class nsNamedPipeDataObserver : public n
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSINAMEDPIPEDATAOBSERVER
 
   explicit nsNamedPipeDataObserver(HANDLE aPipe);
 
   int Read(void* aBuffer, uint32_t aSize);
-  int Write(void* aBuffer, uint32_t aSize);
+  int Write(const void* aBuffer, uint32_t aSize);
 
   uint32_t Transferred() const { return mBytesTransferred; }
 
 private:
   ~nsNamedPipeDataObserver() = default;
 
   HANDLE mPipe;
   OVERLAPPED mOverlapped;
@@ -87,17 +87,17 @@ nsNamedPipeDataObserver::Read(void* aBuf
   }
 
   mBytesTransferred = 0;
   passed("[read] match");
   return bytesRead;
 }
 
 int
-nsNamedPipeDataObserver::Write(void* aBuffer, uint32_t aSize)
+nsNamedPipeDataObserver::Write(const void* aBuffer, uint32_t aSize)
 {
   DWORD bytesWritten = 0;
   if (!WriteFile(mPipe, aBuffer, aSize, &bytesWritten, &mOverlapped)) {
     switch(GetLastError()) {
       case ERROR_IO_PENDING:
         {
           MonitorAutoLock lock(mMonitor);
           mMonitor.Wait();