emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r116664: Fix minor --enable-gcc-warnings issues.


From: Paul Eggert
Subject: [Emacs-diffs] trunk r116664: Fix minor --enable-gcc-warnings issues.
Date: Wed, 05 Mar 2014 06:28:27 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116664
revision-id: address@hidden
parent: address@hidden
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Tue 2014-03-04 22:28:20 -0800
message:
  Fix minor --enable-gcc-warnings issues.
  
  * widget.c (update_various_frame_slots, EmacsFrameResize):
  Avoid unused locals.  Prefer 'if' to '#if' when either will do.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/widget.c                   widget.c-20091113204419-o5vbwnq5f7feedwu-676
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-03-04 19:02:49 +0000
+++ b/src/ChangeLog     2014-03-05 06:28:20 +0000
@@ -1,3 +1,9 @@
+2014-03-05  Paul Eggert  <address@hidden>
+
+       Fix minor --enable-gcc-warnings issues.
+       * widget.c (update_various_frame_slots, EmacsFrameResize):
+       Avoid unused locals.  Prefer 'if' to '#if' when either will do.
+
 2014-03-04  Ken Brown  <address@hidden>
 
        * gmalloc.c (aligned_alloc): Clarify the code by making `adj'

=== modified file 'src/widget.c'
--- a/src/widget.c      2014-02-18 10:52:00 +0000
+++ b/src/widget.c      2014-03-05 06:28:20 +0000
@@ -598,16 +598,18 @@
 update_various_frame_slots (EmacsFrame ew)
 {
   struct frame *f = ew->emacs_frame.frame;
-  struct x_output *x = f->output_data.x;
+
   /* Don't do that: It confuses the check in change_frame_size_1 whether
      the pixel size of the frame changed due to a change of the internal
      border width.  Bug#16736.  */
-#if 0
-  FRAME_PIXEL_HEIGHT (f) = ew->core.height + x->menubar_height;
-  FRAME_PIXEL_WIDTH (f) = ew->core.width;
-#endif
+  if (false)
+    {
+      struct x_output *x = f->output_data.x;
+      FRAME_PIXEL_HEIGHT (f) = ew->core.height + x->menubar_height;
+      FRAME_PIXEL_WIDTH (f) = ew->core.width;
+    }
+
   f->internal_border_width = ew->emacs_frame.internal_border_width;
-
 }
 
 static void
@@ -682,13 +684,11 @@
 {
   EmacsFrame ew = (EmacsFrame)widget;
   struct frame *f = ew->emacs_frame.frame;
-  struct x_output *x = f->output_data.x;
 
-#if 0  /* Always process resize requests pixelwise.  Frame maximizing
-         should work even when frame_resize_pixelwise is nil.  */
-  if (frame_resize_pixelwise)
+  /* Always process resize requests pixelwise.  Frame maximizing
+     should work even when frame_resize_pixelwise is nil.  */
+  if (true || frame_resize_pixelwise)
     {
-#endif /* 0 */
       int width, height;
 
       pixel_to_text_size (ew, ew->core.width, ew->core.height, &width, 
&height);
@@ -698,10 +698,10 @@
       update_various_frame_slots (ew);
 
       cancel_mouse_face (f);
-#if 0  /* See comment above.  */
     }
   else
     {
+      struct x_output *x = f->output_data.x;
       int columns, rows;
 
       pixel_to_char_size (ew, ew->core.width, ew->core.height, &columns, 
&rows);
@@ -717,7 +717,6 @@
          cancel_mouse_face (f);
        }
     }
-#endif /* 0 */
 }
 
 static Boolean


reply via email to

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