diff options
| author | Paul Eggert | 2011-04-10 09:44:27 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-04-10 09:44:27 -0700 |
| commit | b2ded58d7e0eb75f00071036d1c07bbd55313b60 (patch) | |
| tree | 5546bb6d7214033a83d13ce87a15f65595f6ae74 /src/syntax.c | |
| parent | 37f1c9309eb0e6b3bc3dda1ffa7f99410c22355d (diff) | |
| parent | 12020a9e6dcfc2213e8bbb0fec259c1ed1202f30 (diff) | |
| download | emacs-b2ded58d7e0eb75f00071036d1c07bbd55313b60.tar.gz emacs-b2ded58d7e0eb75f00071036d1c07bbd55313b60.zip | |
Fix more problems found by GCC 4.6.0's static checks.
Diffstat (limited to 'src/syntax.c')
| -rw-r--r-- | src/syntax.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/syntax.c b/src/syntax.c index 56176f32418..1301c0689ad 100644 --- a/src/syntax.c +++ b/src/syntax.c | |||
| @@ -1541,7 +1541,8 @@ skip_chars (int forwardp, Lisp_Object string, Lisp_Object lim, int handle_iso_cl | |||
| 1541 | 1541 | ||
| 1542 | if (c <= c2) | 1542 | if (c <= c2) |
| 1543 | { | 1543 | { |
| 1544 | while (c <= c2) | 1544 | unsigned lim2 = c2 + 1; |
| 1545 | while (c < lim2) | ||
| 1545 | fastmap[c++] = 1; | 1546 | fastmap[c++] = 1; |
| 1546 | if (! ASCII_CHAR_P (c2)) | 1547 | if (! ASCII_CHAR_P (c2)) |
| 1547 | string_has_eight_bit = 1; | 1548 | string_has_eight_bit = 1; |
| @@ -1681,7 +1682,8 @@ skip_chars (int forwardp, Lisp_Object string, Lisp_Object lim, int handle_iso_cl | |||
| 1681 | } | 1682 | } |
| 1682 | if (! ASCII_CHAR_P (c)) | 1683 | if (! ASCII_CHAR_P (c)) |
| 1683 | { | 1684 | { |
| 1684 | while (leading_code <= leading_code2) | 1685 | unsigned lim2 = leading_code2 + 1; |
| 1686 | while (leading_code < lim2) | ||
| 1685 | fastmap[leading_code++] = 1; | 1687 | fastmap[leading_code++] = 1; |
| 1686 | if (c <= c2) | 1688 | if (c <= c2) |
| 1687 | { | 1689 | { |
| @@ -1713,9 +1715,9 @@ skip_chars (int forwardp, Lisp_Object string, Lisp_Object lim, int handle_iso_cl | |||
| 1713 | for (i = 0; i < n_char_ranges; i += 2) | 1715 | for (i = 0; i < n_char_ranges; i += 2) |
| 1714 | { | 1716 | { |
| 1715 | int c1 = char_ranges[i]; | 1717 | int c1 = char_ranges[i]; |
| 1716 | int c2 = char_ranges[i + 1]; | 1718 | unsigned lim2 = char_ranges[i + 1] + 1; |
| 1717 | 1719 | ||
| 1718 | for (; c1 <= c2; c1++) | 1720 | for (; c1 < lim2; c1++) |
| 1719 | { | 1721 | { |
| 1720 | int b = CHAR_TO_BYTE_SAFE (c1); | 1722 | int b = CHAR_TO_BYTE_SAFE (c1); |
| 1721 | if (b >= 0) | 1723 | if (b >= 0) |