[llvm] r192955 - Fix a conversion warning in the mingw32 build

Alp Toker alp at nuanti.com
Fri Oct 18 00:53:26 PDT 2013


Author: alp
Date: Fri Oct 18 02:53:25 2013
New Revision: 192955

URL: http://llvm.org/viewvc/llvm-project?rev=192955&view=rev
Log:
Fix a conversion warning in the mingw32 build

gcc diagnoses this:
  warning: converting to non-pointer type 'unsigned int' from NULL

Also remove an empty statement.

No change in functionality.

Modified:
    llvm/trunk/lib/Support/Windows/Memory.inc

Modified: llvm/trunk/lib/Support/Windows/Memory.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Memory.inc?rev=192955&r1=192954&r2=192955&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Windows/Memory.inc (original)
+++ llvm/trunk/lib/Support/Windows/Memory.inc Fri Oct 18 02:53:25 2013
@@ -82,7 +82,7 @@ MemoryBlock Memory::allocateMappedMemory
 
   uintptr_t Start = NearBlock ? reinterpret_cast<uintptr_t>(NearBlock->base()) +
                                 NearBlock->size()
-                           : NULL;
+                           : 0;
 
   // If the requested address is not aligned to the allocation granularity,
   // round up to get beyond NearBlock. VirtualAlloc would have rounded down.
@@ -106,7 +106,7 @@ MemoryBlock Memory::allocateMappedMemory
   MemoryBlock Result;
   Result.Address = PA;
   Result.Size = NumBlocks*Granularity;
-                                 ;
+
   if (Flags & MF_EXEC)
     Memory::InvalidateInstructionCache(Result.Address, Result.Size);
 





More information about the llvm-commits mailing list