emacs-diffs
[Top][All Lists]
Advanced

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

master 7460648: Pacify gcc -Wunused-variable


From: Paul Eggert
Subject: master 7460648: Pacify gcc -Wunused-variable
Date: Thu, 6 Aug 2020 22:12:54 -0400 (EDT)

branch: master
commit 74606481c2859b843ebf3f744c215447458becc2
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>

    Pacify gcc -Wunused-variable
    
    * src/frame.c (Fset_mouse_position, Fset_mouse_pixel_position)
    (Fset_frame_position): Always use xval, yval.  Simplify #if nesting.
---
 src/frame.c | 33 +++++++++++++++------------------
 1 file changed, 15 insertions(+), 18 deletions(-)

diff --git a/src/frame.c b/src/frame.c
index c21d470..c4dfc35 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -2565,21 +2565,18 @@ before calling this function on it, like this.
   if (FRAME_WINDOW_P (XFRAME (frame)))
     /* Warping the mouse will cause enternotify and focus events.  */
     frame_set_mouse_position (XFRAME (frame), xval, yval);
-#else
-#if defined (MSDOS)
+#elif defined MSDOS
   if (FRAME_MSDOS_P (XFRAME (frame)))
     {
       Fselect_frame (frame, Qnil);
       mouse_moveto (xval, yval);
     }
+#elif defined HAVE_GPM
+  Fselect_frame (frame, Qnil);
+  term_mouse_moveto (xval, yval);
 #else
-#ifdef HAVE_GPM
-    {
-      Fselect_frame (frame, Qnil);
-      term_mouse_moveto (xval, yval);
-    }
-#endif
-#endif
+  (void) xval;
+  (void) yval;
 #endif
 
   return Qnil;
@@ -2606,21 +2603,18 @@ before calling this function on it, like this.
   if (FRAME_WINDOW_P (XFRAME (frame)))
     /* Warping the mouse will cause enternotify and focus events.  */
     frame_set_mouse_pixel_position (XFRAME (frame), xval, yval);
-#else
-#if defined (MSDOS)
+#elif defined MSDOS
   if (FRAME_MSDOS_P (XFRAME (frame)))
     {
       Fselect_frame (frame, Qnil);
       mouse_moveto (xval, yval);
     }
+#elif defined HAVE_GPM
+  Fselect_frame (frame, Qnil);
+  term_mouse_moveto (xval, yval);
 #else
-#ifdef HAVE_GPM
-    {
-      Fselect_frame (frame, Qnil);
-      term_mouse_moveto (xval, yval);
-    }
-#endif
-#endif
+  (void) xval;
+  (void) yval;
 #endif
 
   return Qnil;
@@ -3657,6 +3651,9 @@ bottom edge of FRAME's display.  */)
 #ifdef HAVE_WINDOW_SYSTEM
       if (FRAME_TERMINAL (f)->set_frame_offset_hook)
        FRAME_TERMINAL (f)->set_frame_offset_hook (f, xval, yval, 1);
+#else
+      (void) xval;
+      (void) yval;
 #endif
     }
 



reply via email to

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