[commit: ghc] master: rts/Printer.h: fix constness of argument declaration (affcec7)

git at git.haskell.org git at git.haskell.org
Sat Aug 6 11:07:02 UTC 2016


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

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

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

commit affcec7d5b0426be332022d546486bef31248b72
Author: Sergei Trofimovich <siarheit at google.com>
Date:   Sat Aug 6 11:55:14 2016 +0100

    rts/Printer.h: fix constness of argument declaration
    
    Noticed on today's build failure:
    
      rts/Printer.c:659:13: error:
         error: conflicting types for 'DEBUG_LoadSymbols'
         extern void DEBUG_LoadSymbols( const char *name )
                     ^~~~~~~~~~~~~~~~~
    
      In file included from rts/Printer.c:17:0: error:
    
      rts/Printer.h:29:13: error:
         note: previous declaration of 'DEBUG_LoadSymbols' was here
         extern void DEBUG_LoadSymbols( char *name );
                     ^~~~~~~~~~~~~~~~~
    
    Signed-off-by: Sergei Trofimovich <siarheit at google.com>


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

affcec7d5b0426be332022d546486bef31248b72
 rts/Printer.c | 2 +-
 rts/Printer.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/rts/Printer.c b/rts/Printer.c
index 6789225..95dd854 100644
--- a/rts/Printer.c
+++ b/rts/Printer.c
@@ -714,7 +714,7 @@ extern void DEBUG_LoadSymbols( const char *name )
 
 #else /* USING_LIBBFD */
 
-extern void DEBUG_LoadSymbols( char *name STG_UNUSED )
+extern void DEBUG_LoadSymbols( const char *name STG_UNUSED )
 {
   /* nothing, yet */
 }
diff --git a/rts/Printer.h b/rts/Printer.h
index 4db7605..e72fdb0 100644
--- a/rts/Printer.h
+++ b/rts/Printer.h
@@ -26,7 +26,7 @@ extern void        printClosure    ( const StgClosure *obj );
 extern void        printStackChunk ( StgPtr sp, StgPtr spLim );
 extern void        printTSO        ( StgTSO *tso );
 
-extern void DEBUG_LoadSymbols( char *name );
+extern void DEBUG_LoadSymbols( const char *name );
 
 extern const char *lookupGHCName( void *addr );
 



More information about the ghc-commits mailing list