* 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.
This commit is contained in:
parent
82470039ae
commit
4c83cffcce
2 changed files with 5 additions and 1 deletions
|
@ -1,5 +1,9 @@
|
|||
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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue