Fix 3 MSVC warnings:
authorFrancois Pichet <pichet2000@gmail.com>
Wed, 25 May 2011 16:32:33 +0000 (16:32 +0000)
committerFrancois Pichet <pichet2000@gmail.com>
Wed, 25 May 2011 16:32:33 +0000 (16:32 +0000)
'void (__cdecl *)()' differs in parameter lists from 'void (__cdecl *)(void)'

atexit really expects a "void f(void)" function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132061 91177308-0d34-0410-b5e6-96231b3b80d8

runtime/libprofile/BasicBlockTracing.c
runtime/libprofile/EdgeProfiling.c
runtime/libprofile/OptimalEdgeProfiling.c

index dbe81e3f650486793b3c1aa971bab2a5824e26de..0815e2e516a0b26b2956c24ea046b789eea6b57a 100644 (file)
@@ -30,7 +30,7 @@ static void WriteAndFlushBBTraceData () {
 /* BBTraceAtExitHandler - When the program exits, just write out any remaining 
  * data and free the trace buffer.
  */
-static void BBTraceAtExitHandler() {
+static void BBTraceAtExitHandler(void) {
   WriteAndFlushBBTraceData ();
   free (ArrayStart);
 }
index 4a68a086fbce4858261d402ed593ae8e147e5481..f19e188f0d2b3ff84584dc36819386104a5b658b 100644 (file)
@@ -22,7 +22,7 @@ static unsigned NumElements;
 /* EdgeProfAtExitHandler - When the program exits, just write out the profiling
  * data.
  */
-static void EdgeProfAtExitHandler() {
+static void EdgeProfAtExitHandler(void) {
   /* Note that if this were doing something more intelligent with the
    * instrumentation, we could do some computation here to expand what we
    * collected into simple edge profiles.  Since we directly count each edge, we
index 947da532605dda01189bc8ec52f34cb7c4db551d..3a7631b6e83bc39a109915469cef81d9440096c8 100644 (file)
@@ -22,7 +22,7 @@ static unsigned NumElements;
 /* OptEdgeProfAtExitHandler - When the program exits, just write out the
  * profiling data.
  */
-static void OptEdgeProfAtExitHandler() {
+static void OptEdgeProfAtExitHandler(void) {
   /* Note that, although the array has a counter for each edge, not all
    * counters are updated, the ones that are not used are initialised with -1.
    * When loading this information the counters with value -1 have to be