]> git.lizzy.rs Git - rust.git/commitdiff
Fix compilation errors with linenoise
authorAlex Crichton <alex@alexcrichton.com>
Sat, 25 May 2013 05:40:12 +0000 (00:40 -0500)
committerAlex Crichton <alex@alexcrichton.com>
Sat, 25 May 2013 05:40:12 +0000 (00:40 -0500)
src/rt/linenoise/linenoise.c

index 230711b5b8c8bdd24d1df367be8bd0743aae77e6..0ce4d559bed99619894735c9ee7c8aee07b0e4ca 100644 (file)
@@ -395,7 +395,7 @@ static int countColorControlChars(const char* prompt, int plen)
         expect_inner,
         expect_trail
     } state = search_esc;
-    int len, found = 0;
+    int len = 0, found = 0;
     char ch;
 
     /* XXX: Strictly we should be checking utf8 chars rather than
@@ -698,7 +698,7 @@ static int fd_read(struct current *current)
     return -1;
 }
 
-static int countColorControlChars(char* prompt, int plen)
+static int countColorControlChars(const char* prompt, int plen)
 {
     /* For windows we assume that there are no embedded ansi color
      * control sequences.