diff options
| author | Stefan Monnier | 2024-02-03 16:07:24 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2024-02-03 16:07:24 -0500 |
| commit | d41cdceb133e30c71a95fe893d70645472b326e3 (patch) | |
| tree | 6b184ba21a06ee3e3122e7fe36407a86ee2cd587 /src/textconv.c | |
| parent | 8fc7e8c2b0cb33b0e8e9822f116e6dbb530ab1b6 (diff) | |
| download | emacs-d41cdceb133e30c71a95fe893d70645472b326e3.tar.gz emacs-d41cdceb133e30c71a95fe893d70645472b326e3.zip | |
textconv.c: Fix warnings with-wide-int
* src/textconv.c (set_composing_region, textconv_set_point_and_mark):
Use `min/max`.
Diffstat (limited to 'src/textconv.c')
| -rw-r--r-- | src/textconv.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/textconv.c b/src/textconv.c index 0d35ec19c55..0941848dd09 100644 --- a/src/textconv.c +++ b/src/textconv.c | |||
| @@ -1705,11 +1705,8 @@ set_composing_region (struct frame *f, ptrdiff_t start, | |||
| 1705 | { | 1705 | { |
| 1706 | struct text_conversion_action *action, **last; | 1706 | struct text_conversion_action *action, **last; |
| 1707 | 1707 | ||
| 1708 | if (start > MOST_POSITIVE_FIXNUM) | 1708 | start = min (start, MOST_POSITIVE_FIXNUM); |
| 1709 | start = MOST_POSITIVE_FIXNUM; | 1709 | end = min (end, MOST_POSITIVE_FIXNUM); |
| 1710 | |||
| 1711 | if (end > MOST_POSITIVE_FIXNUM) | ||
| 1712 | end = MOST_POSITIVE_FIXNUM; | ||
| 1713 | 1710 | ||
| 1714 | action = xmalloc (sizeof *action); | 1711 | action = xmalloc (sizeof *action); |
| 1715 | action->operation = TEXTCONV_SET_COMPOSING_REGION; | 1712 | action->operation = TEXTCONV_SET_COMPOSING_REGION; |
| @@ -1734,8 +1731,7 @@ textconv_set_point_and_mark (struct frame *f, ptrdiff_t point, | |||
| 1734 | { | 1731 | { |
| 1735 | struct text_conversion_action *action, **last; | 1732 | struct text_conversion_action *action, **last; |
| 1736 | 1733 | ||
| 1737 | if (point > MOST_POSITIVE_FIXNUM) | 1734 | point = min (point, MOST_POSITIVE_FIXNUM); |
| 1738 | point = MOST_POSITIVE_FIXNUM; | ||
| 1739 | 1735 | ||
| 1740 | action = xmalloc (sizeof *action); | 1736 | action = xmalloc (sizeof *action); |
| 1741 | action->operation = TEXTCONV_SET_POINT_AND_MARK; | 1737 | action->operation = TEXTCONV_SET_POINT_AND_MARK; |