diff src/event-msw.c @ 2286:04bc9d2f42c7

[xemacs-hg @ 2004-09-20 19:18:55 by james] Mark all unused parameters as unused. Also eliminate some unneeded local variables.
author james
date Mon, 20 Sep 2004 19:20:08 +0000
parents a8d8f419b459
children ecf1ebac70d8
line wrap: on
line diff
--- a/src/event-msw.c	Mon Sep 20 19:11:29 2004 +0000
+++ b/src/event-msw.c	Mon Sep 20 19:20:08 2004 +0000
@@ -39,6 +39,14 @@
 #include <config.h>
 #include "lisp.h"
 
+#ifdef CYGWIN
+# define USED_IF_CYGWIN(decl) decl
+# define UNUSED_IF_CYGWIN(decl) UNUSED (decl)
+#else
+# define USED_IF_CYGWIN(decl) UNUSED (decl)
+# define UNUSED_IF_CYGWIN(decl) decl
+#endif
+
 #if defined (CYGWIN) && !defined (HAVE_MSG_SELECT)
 #error We do not support non-select() versions (i.e. very old) of Cygwin.
 #endif
@@ -1107,7 +1115,7 @@
  * handle since it will be invalid and will cause the wait to fail
  */
 void
-mswindows_unwait_process (Lisp_Process *p)
+mswindows_unwait_process (Lisp_Process *UNUSED_IF_CYGWIN (p))
 {
 #ifndef CYGWIN
   remove_waitable_handle (get_nt_process_handle (p));
@@ -1145,7 +1153,7 @@
  * condition_case. See mswindows_pump_outstanding_events
  */
 static Lisp_Object
-mswindows_unsafe_pump_events (void *arg)
+mswindows_unsafe_pump_events (void *UNUSED (arg))
 {
   /* This function can call lisp */
   Lisp_Object event = Fmake_event (Qnil, Qnil);
@@ -1669,7 +1677,8 @@
  * Callback procedure for synchronous timer messages
  */
 static void CALLBACK
-mswindows_wm_timer_callback (HWND hwnd, UINT umsg, UINT id_timer, DWORD dwtime)
+mswindows_wm_timer_callback (HWND UNUSED (hwnd), UINT UNUSED (umsg),
+			     UINT id_timer, DWORD dwtime)
 {
   Lisp_Object emacs_event = Fmake_event (Qnil, Qnil);
 
@@ -1712,7 +1721,7 @@
 static Lisp_Object dde_eval_error;
 
 static Lisp_Object
-dde_error (Lisp_Object err, Lisp_Object obj)
+dde_error (Lisp_Object err, Lisp_Object UNUSED (obj))
 {
   dde_eval_error = err;
   return Qnil;
@@ -1881,9 +1890,9 @@
 }
 
 HDDEDATA CALLBACK
-mswindows_dde_callback (UINT uType, UINT uFmt, HCONV hconv,
+mswindows_dde_callback (UINT uType, UINT uFmt, HCONV UNUSED (hconv),
 			HSZ hszTopic, HSZ hszItem, HDDEDATA hdata,
-			DWORD dwData1, DWORD dwData2)
+			DWORD UNUSED (dwData1), DWORD UNUSED (dwData2))
 {
   switch (uType)
     {
@@ -4054,8 +4063,8 @@
  * Only returns non-Qnil for keys that don't generate WM_CHAR messages
  * or whose ASCII codes (like space) xemacs doesn't like.
  */
-Lisp_Object mswindows_key_to_emacs_keysym (int mswindows_key, int mods,
-					   int extendedp)
+Lisp_Object mswindows_key_to_emacs_keysym (int mswindows_key,
+					   int UNUSED (mods), int extendedp)
 {
   if (extendedp)	/* Keys not present on a 82 key keyboard */
     {
@@ -4269,7 +4278,7 @@
  * Find the console that matches the supplied mswindows window handle
  */
 Lisp_Object
-mswindows_find_console (HWND hwnd)
+mswindows_find_console (HWND UNUSED (hwnd))
 {
   /* We only support one console */
   return XCAR (Vconsole_list);
@@ -4614,7 +4623,7 @@
 }
 
 static void
-emacs_mswindows_select_console (struct console *con)
+emacs_mswindows_select_console (struct console *USED_IF_CYGWIN (con))
 {
 #ifdef CYGWIN
   if (CONSOLE_MSWINDOWS_P (con))
@@ -4649,7 +4658,7 @@
 }
 
 static void
-emacs_mswindows_unselect_console (struct console *con)
+emacs_mswindows_unselect_console (struct console *USED_IF_CYGWIN (con))
 {
 #ifdef CYGWIN
   if (CONSOLE_MSWINDOWS_P (con))
@@ -4739,7 +4748,7 @@
 
 static void
 emacs_mswindows_delete_io_streams (Lisp_Object instream,
-				   Lisp_Object outstream,
+				   Lisp_Object USED_IF_CYGWIN (outstream),
 				   Lisp_Object errstream,
 				   USID *in_usid,
 				   USID *err_usid)
@@ -4765,7 +4774,7 @@
 }
 
 static int
-emacs_mswindows_current_event_timestamp (struct console *c)
+emacs_mswindows_current_event_timestamp (struct console *UNUSED (c))
 {
   return GetTickCount ();
 }
@@ -4776,7 +4785,7 @@
 */
 void debug_process_finalization (Lisp_Process *p);
 void
-debug_process_finalization (Lisp_Process *p)
+debug_process_finalization (Lisp_Process *UNUSED (p))
 {
 #if 0 /* #### */
   Lisp_Object instr, outstr, errstr;