Commit 4c83cffc authored by Paul Eggert's avatar Paul Eggert
Browse files

* 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.
parent 82470039
2011-02-06 Paul Eggert <eggert@cs.ucla.edu>
 
* 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.
conform to C89 pointer rules
 
* xterm.c (x_draw_fringe_bitmap, handle_one_xevent, x_bitmap_icon):
......@@ -1706,7 +1706,7 @@ x_alloc_nearest_color_1 (Display *dpy, Colormap cmap, XColor *color)
a least-squares matching, which is what X uses for closest
color matching with StaticColor visuals. */
int nearest, i;
unsigned long nearest_delta = ~0;
unsigned long nearest_delta = ~ (unsigned long) 0;
int ncells;
const XColor *cells = x_color_cells (dpy, &ncells);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment