]> git.eshelyaron.com Git - emacs.git/commitdiff
src/frame.c (x_report_frame_params): Cast to avoid compiler warnings.
authorEli Zaretskii <eliz@gnu.org>
Fri, 9 Sep 2011 08:32:43 +0000 (11:32 +0300)
committerEli Zaretskii <eliz@gnu.org>
Fri, 9 Sep 2011 08:32:43 +0000 (11:32 +0300)
src/ChangeLog
src/frame.c

index ad50d5bb3d1b44445e30ca0bb679121f6f0a57df..97a70e87fcdbf3407eb86a48b5594a76a579ce54 100644 (file)
@@ -1,3 +1,7 @@
+2011-09-09  Eli Zaretskii  <eliz@gnu.org>
+
+       * frame.c (x_report_frame_params): Cast to avoid compiler warnings.
+
 2011-09-08  Martin Rudalics  <rudalics@gmx.at>
 
        * window.c (Fset_window_prev_buffers, Fset_window_next_buffers):
index e20b3a7fdb27eb9744d8c31cd3fba8dec71290ea..cf866e66578fe4bbabc037273ca5c0ce7af6af27 100644 (file)
@@ -3098,7 +3098,11 @@ x_report_frame_params (struct frame *f, Lisp_Object *alistptr)
                      for non-toolkit scroll bar.
                      ruler-mode.el depends on this.  */
                   : Qnil));
-  w = FRAME_X_WINDOW (f);
+  /* FRAME_X_WINDOW is not guaranteed to return an integer.  E.g., on
+     MS-Windows it returns a value whose type is HANDLE, which is
+     actually a pointer.  Explicit casting avoids compiler
+     warnings.  */
+  w = (unsigned long) FRAME_X_WINDOW (f);
   sprintf (buf, "%lu", w);
   store_in_alist (alistptr, Qwindow_id,
                  build_string (buf));
@@ -3108,7 +3112,7 @@ x_report_frame_params (struct frame *f, Lisp_Object *alistptr)
   if (FRAME_X_OUTPUT (f)->widget)
 #endif
     {
-      w = FRAME_OUTER_WINDOW (f);
+      w = (unsigned long) FRAME_OUTER_WINDOW (f);
       sprintf (buf, "%lu", w);
     }
   store_in_alist (alistptr, Qouter_window_id,