[commit: ghc] master: rts/sm: Add missing argument names in function definitions (4c8e69e)

git at git.haskell.org git at git.haskell.org
Thu Jul 23 12:55:15 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/4c8e69e0c09bfee989b747ba4028686f48cf8aa1/ghc

>---------------------------------------------------------------

commit 4c8e69e0c09bfee989b747ba4028686f48cf8aa1
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Thu Jul 23 08:49:13 2015 -0400

    rts/sm: Add missing argument names in function definitions
    
    C99 does not allow unnamed parameters in definition argument lists [1].
    
    [1] http://stackoverflow.com/questions/8776810/parameter-name-omitted-c-vs-c


>---------------------------------------------------------------

4c8e69e0c09bfee989b747ba4028686f48cf8aa1
 rts/sm/MBlock.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/rts/sm/MBlock.c b/rts/sm/MBlock.c
index c77a9e0..35a11bf 100644
--- a/rts/sm/MBlock.c
+++ b/rts/sm/MBlock.c
@@ -120,7 +120,7 @@ static void *getAllocatedMBlock(free_list **start_iter, W_ startingAt)
     return (void*)p;
 }
 
-void * getFirstMBlock(void **state)
+void * getFirstMBlock(void **state STG_UNUSED)
 {
     free_list *fake_state;
     free_list **casted_state;
@@ -134,7 +134,7 @@ void * getFirstMBlock(void **state)
     return getAllocatedMBlock(casted_state, mblock_address_space_begin);
 }
 
-void * getNextMBlock(void **state, void *mblock)
+void * getNextMBlock(void **state STG_UNUSED, void *mblock)
 {
     free_list *fake_state = free_list_head;
     free_list **casted_state;
@@ -442,7 +442,7 @@ void * mapEntryToMBlock(nat i)
     return (void *)((StgWord)i << MBLOCK_SHIFT);
 }
 
-void * getFirstMBlock(void **)
+void * getFirstMBlock(void **state STG_UNUSED)
 {
     nat i;
 
@@ -452,7 +452,7 @@ void * getFirstMBlock(void **)
     return NULL;
 }
 
-void * getNextMBlock(void **, void *mblock)
+void * getNextMBlock(void **state STG_UNUSED, void *mblock)
 {
     nat i;
 
@@ -464,7 +464,7 @@ void * getNextMBlock(void **, void *mblock)
 
 #elif SIZEOF_VOID_P == 8
 
-void * getNextMBlock(void **, void *p)
+void * getNextMBlock(void **state STG_UNUSED, void *p)
 {
     MBlockMap *map;
     nat off, j;
@@ -501,7 +501,7 @@ void * getNextMBlock(void **, void *p)
     return NULL;
 }
 
-void * getFirstMBlock(void **)
+void * getFirstMBlock(void **state STG_UNUSED)
 {
     MBlockMap *map = mblock_maps[0];
     nat line_no, off;



More information about the ghc-commits mailing list