emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r103140: Merge: * xterm.c: Avoid unpo


From: Paul Eggert
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r103140: Merge: * xterm.c: Avoid unportable int assumption.
Date: Sat, 05 Feb 2011 19:14:24 -0800
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 103140 [merge]
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Sat 2011-02-05 19:14:24 -0800
message:
  Merge: * xterm.c: Avoid unportable int assumption.
modified:
  src/ChangeLog
  src/xterm.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-02-06 02:50:02 +0000
+++ b/src/ChangeLog     2011-02-06 03:13:16 +0000
@@ -1,5 +1,9 @@
 2011-02-06  Paul Eggert  <address@hidden>
 
+       * 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):

=== modified file 'src/xterm.c'
--- a/src/xterm.c       2011-02-06 02:50:02 +0000
+++ b/src/xterm.c       2011-02-06 03:13:16 +0000
@@ -1706,7 +1706,7 @@
         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);
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]