Typecast to get rid of warnings that index into cc[] is a char.
authorDan Harkless <dan@harkless.org>
Tue, 25 Jan 2000 05:53:40 +0000 (05:53 +0000)
committerDan Harkless <dan@harkless.org>
Tue, 25 Jan 2000 05:53:40 +0000 (05:53 +0000)
uip/picksbr.c

index b13ea66..3d4e978 100644 (file)
@@ -690,7 +690,7 @@ plist
        if (*p2 == CCHR) {
            c = p2[1];
            do {
-               if (*p1 == c || cc[*p1] == c)
+               if (*p1 == c || cc[(int)*p1] == c)
                    if (advance (p1, p2))
                        return 1;
            } while (*p1++);
@@ -715,7 +715,7 @@ advance (char *alp, char *aep)
     for (;;)
        switch (*ep++) {
            case CCHR: 
-               if (*ep++ == *lp++ || ep[-1] == cc[lp[-1]])
+               if (*ep++ == *lp++ || ep[-1] == cc[(int)lp[-1]])
                    continue;
                return 0;
 
@@ -754,7 +754,7 @@ advance (char *alp, char *aep)
 
            case CCHR | STAR: 
                curlp = lp;
-               while (*lp++ == *ep || cc[lp[-1]] == *ep)
+               while (*lp++ == *ep || cc[(int)lp[-1]] == *ep)
                    continue;
                ep++;
                goto star;