[commit: ghc] wip/erikd/rts: RtsFlags.c: Const correct fixes (da861e6)

git at git.haskell.org git at git.haskell.org
Sat May 28 11:03:45 UTC 2016


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

On branch  : wip/erikd/rts
Link       : http://ghc.haskell.org/trac/ghc/changeset/da861e6da95c68905aa4a863f3caaff81adb6aee/ghc

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

commit da861e6da95c68905aa4a863f3caaff81adb6aee
Author: Erik de Castro Lopo <erikd at mega-nerd.com>
Date:   Fri May 27 19:37:55 2016 +1000

    RtsFlags.c: Const correct fixes
    
    Test Plan: validate
    
    Reviewers: hvr, austin, bgamari, simonmar
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2275


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

da861e6da95c68905aa4a863f3caaff81adb6aee
 rts/RtsFlags.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c
index 31a2c8b..1ec5db0 100644
--- a/rts/RtsFlags.c
+++ b/rts/RtsFlags.c
@@ -1609,8 +1609,8 @@ static rtsBool read_heap_profiling_flag(const char *arg)
     case 'b':
         if (arg[2] != '\0' && arg[3] != '\0') {
             {
-                char *left  = strchr(arg, '{');
-                char *right = strrchr(arg, '}');
+                const char *left  = strchr(arg, '{');
+                const char *right = strrchr(arg, '}');
 
                 // curly braces are optional, for
                 // backwards compat.



More information about the ghc-commits mailing list