aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-02-05 19:13:16 -0800
committerPaul Eggert2011-02-05 19:13:16 -0800
commit4c83cffccec286575d36b63e0183fed480726352 (patch)
tree796617b45d929f15487fb28ac9395560ee65755d /src
parent82470039aeab10d2c6e374ef860c96e6ad610079 (diff)
downloademacs-4c83cffccec286575d36b63e0183fed480726352.tar.gz
emacs-4c83cffccec286575d36b63e0183fed480726352.zip
* xterm.c (x_alloc_nearest_color_1): Avoid unportable int assumption.
Emacs assumes two's complement elsewhere, but the assumption is easy to remove here, and this suppresses a warning with Sun C 5.8.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/xterm.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 90c64e143be..5a269965186 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
12011-02-06 Paul Eggert <eggert@cs.ucla.edu> 12011-02-06 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 * xterm.c (x_alloc_nearest_color_1): Avoid unportable int assumption.
4 Emacs assumes two's complement elsewhere, but the assumption is
5 easy to remove here, and this suppresses a warning with Sun C 5.8.
6
3 conform to C89 pointer rules 7 conform to C89 pointer rules
4 8
5 * xterm.c (x_draw_fringe_bitmap, handle_one_xevent, x_bitmap_icon): 9 * xterm.c (x_draw_fringe_bitmap, handle_one_xevent, x_bitmap_icon):
diff --git a/src/xterm.c b/src/xterm.c
index 034df89679c..31f002fa05c 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -1706,7 +1706,7 @@ x_alloc_nearest_color_1 (Display *dpy, Colormap cmap, XColor *color)
1706 a least-squares matching, which is what X uses for closest 1706 a least-squares matching, which is what X uses for closest
1707 color matching with StaticColor visuals. */ 1707 color matching with StaticColor visuals. */
1708 int nearest, i; 1708 int nearest, i;
1709 unsigned long nearest_delta = ~0; 1709 unsigned long nearest_delta = ~ (unsigned long) 0;
1710 int ncells; 1710 int ncells;
1711 const XColor *cells = x_color_cells (dpy, &ncells); 1711 const XColor *cells = x_color_cells (dpy, &ncells);
1712 1712