[compiler-rt] r204521 - Avoid GCC's "cast from pointer to integer of different size" warning.

David Blaikie dblaikie at gmail.com
Fri Mar 21 14:45:49 PDT 2014


Author: dblaikie
Date: Fri Mar 21 16:45:49 2014
New Revision: 204521

URL: http://llvm.org/viewvc/llvm-project?rev=204521&view=rev
Log:
Avoid GCC's "cast from pointer to integer of different size" warning.

This is a bit of a stab in the dark as I'm not sure I've got these
source files compiling correctly locally. (and the warning only
reproduces on a 32bit build anyway)

Modified:
    compiler-rt/trunk/lib/profile/InstrProfilingBuffer.c
    compiler-rt/trunk/lib/profile/InstrProfilingFile.c

Modified: compiler-rt/trunk/lib/profile/InstrProfilingBuffer.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfilingBuffer.c?rev=204521&r1=204520&r2=204521&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/InstrProfilingBuffer.c (original)
+++ compiler-rt/trunk/lib/profile/InstrProfilingBuffer.c Fri Mar 21 16:45:49 2014
@@ -41,8 +41,8 @@ int __llvm_profile_write_buffer(char *Bu
     DataSize,
     CountersSize,
     NamesSize,
-    (uint64_t)CountersBegin,
-    (uint64_t)NamesBegin
+    (uintptr_t)CountersBegin,
+    (uintptr_t)NamesBegin
   };
 
   /* Write the data. */

Modified: compiler-rt/trunk/lib/profile/InstrProfilingFile.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfilingFile.c?rev=204521&r1=204520&r2=204521&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/InstrProfilingFile.c (original)
+++ compiler-rt/trunk/lib/profile/InstrProfilingFile.c Fri Mar 21 16:45:49 2014
@@ -33,8 +33,8 @@ static int writeFile(FILE *File) {
     DataSize,
     CountersSize,
     NamesSize,
-    (uint64_t)CountersBegin,
-    (uint64_t)NamesBegin
+    (uintptr_t)CountersBegin,
+    (uintptr_t)NamesBegin
   };
 
   /* Write the data. */





More information about the llvm-commits mailing list