Bug 1021494 - Fix a compiler error with clang-cl in nsScriptableInputStream.cpp; r=froydnj
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 06 Jun 2014 18:56:07 -0400
changeset 206579 f5232023af37ef92f3facd5833b318a3119448e0
parent 206578 6c2881dc61419924c9bf3f1f7000600492e47e30
child 206580 115ea0cc4b22c9b30ff5545dc1d5f33c89cddbbe
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1021494
milestone32.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1021494 - Fix a compiler error with clang-cl in nsScriptableInputStream.cpp; r=froydnj
xpcom/io/nsScriptableInputStream.cpp
--- a/xpcom/io/nsScriptableInputStream.cpp
+++ b/xpcom/io/nsScriptableInputStream.cpp
@@ -50,17 +50,17 @@ nsScriptableInputStream::Read(uint32_t a
   }
 
   rv = mInputStream->Available(&count64);
   if (NS_FAILED(rv)) {
     return rv;
   }
 
   // bug716556 - Ensure count+1 doesn't overflow
-  uint32_t count = XPCOM_MIN((uint32_t)XPCOM_MIN<uint64_t>(count64, aCount), UINT32_MAX - 1);
+  uint32_t count = XPCOM_MIN(uint32_t(XPCOM_MIN<uint64_t>(count64, aCount)), uint32_t(UINT32_MAX - 1));
   buffer = (char*)moz_malloc(count + 1);  // make room for '\0'
   if (!buffer) {
     return NS_ERROR_OUT_OF_MEMORY;
   }
 
   rv = ReadHelper(buffer, count);
   if (NS_FAILED(rv)) {
     nsMemory::Free(buffer);