diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-07-15 07:48:35 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-07-15 07:48:35 +0000 |
commit | 8d7a70d65e07c387fcd54f8b5cfea4bd334c94c1 (patch) | |
tree | f6518b5e2ceb9fcbe8955c66affd5a2e171f9e58 /src/regex.c | |
parent | 704f0eb148d65f654141dc2f55065d45d95bbc3e (diff) | |
download | emacs-8d7a70d65e07c387fcd54f8b5cfea4bd334c94c1.tar.gz |
(re_match_2_internal): Add casts to shut up some compilers.
(FREE_STACK_RETURN): Nest the free inside the return.
Diffstat (limited to 'src/regex.c')
-rw-r--r-- | src/regex.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/regex.c b/src/regex.c index 0cfd4969982..88ccc69a208 100644 --- a/src/regex.c +++ b/src/regex.c @@ -1493,12 +1493,7 @@ typedef struct /* Return, freeing storage we allocated. */ #define FREE_STACK_RETURN(value) \ -do \ -{ \ - free (compile_stack.stack); \ - return value; \ -} \ -while (1) + return (free (compile_stack.stack), value) static reg_errcode_t regex_compile (pattern, size, syntax, bufp) @@ -4298,7 +4293,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) #endif if ((re_opcode_t) p1[3] == exactn - && ! (p2[1] * BYTEWIDTH > p1[4] + && ! ((int) p2[1] * BYTEWIDTH > (int) p1[4] && (p2[1 + p1[4] / BYTEWIDTH] & (1 << (p1[4] % BYTEWIDTH))))) { @@ -4312,9 +4307,9 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) int idx; /* We win if the charset_not inside the loop lists every character listed in the charset after. */ - for (idx = 0; idx < p2[1]; idx++) + for (idx = 0; idx < (int) p2[1]; idx++) if (! (p2[2 + idx] == 0 - || (idx < p1[4] + || (idx < (int) p1[4] && ((p2[2 + idx] & ~ p1[5 + idx]) == 0)))) break; @@ -4329,7 +4324,9 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) int idx; /* We win if the charset inside the loop has no overlap with the one after the loop. */ - for (idx = 0; idx < p2[1] && idx < p1[4]; idx++) + for (idx = 0; + idx < (int) p2[1] && idx < (int) p1[4]; + idx++) if ((p2[2 + idx] & p1[5 + idx]) != 0) break; |