changeset 1887:fc89a4f98a8b v7.2.184

updated for version 7.2-184
author vimboss
date Thu, 21 May 2009 21:27:43 +0000
parents 11472bbcdb6e
children ae2251be41f9
files src/auto/configure src/config.h.in src/configure.in src/gui.c src/gui_at_fs.c src/gui_at_sb.c src/gui_athena.c src/gui_beval.c src/gui_motif.c src/gui_x11.c src/gui_xmdlg.c src/gui_xmebw.c src/if_python.c src/version.c src/window.c src/workshop.c
diffstat 16 files changed, 373 insertions(+), 369 deletions(-) [+]
line wrap: on
line diff
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -7977,6 +7977,82 @@ rm -f core conftest.err conftest.$ac_obj
 
     LDFLAGS="$ac_save_LDFLAGS"
 
+    { $as_echo "$as_me:$LINENO: checking size of wchar_t is 2 bytes" >&5
+$as_echo_n "checking size of wchar_t is 2 bytes... " >&6; }
+    if test "${ac_cv_small_wchar_t+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then
+  { { $as_echo "$as_me:$LINENO: error: failed to compile test program" >&5
+$as_echo "$as_me: error: failed to compile test program" >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <X11/Xlib.h>
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#endif
+		main()
+		{
+		  if (sizeof(wchar_t) <= 2)
+		    exit(1);
+		  exit(0);
+		}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_small_wchar_t="no"
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_small_wchar_t="yes"
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+
+    { $as_echo "$as_me:$LINENO: result: $ac_cv_small_wchar_t" >&5
+$as_echo "$ac_cv_small_wchar_t" >&6; }
+    if test "x$ac_cv_small_wchar_t" = "xyes" ; then
+      cat >>confdefs.h <<\_ACEOF
+#define SMALL_WCHAR_T 1
+_ACEOF
+
+    fi
+
   fi
 fi
 
@@ -15417,7 +15493,6 @@ cat >>confdefs.h <<_ACEOF
 
 
 
-
 bcopy_test_prog='
 #include "confdefs.h"
 #ifdef HAVE_STRING_H
--- a/src/config.h.in
+++ b/src/config.h.in
@@ -39,6 +39,9 @@
 /* Defined to the size of an int */
 #undef SIZEOF_INT
 
+/* Define when wchar_t is only 2 bytes. */
+#undef SMALL_WCHAR_T
+
 /*
  * If we cannot trust one of the following from the libraries, we use our
  * own safe but probably slower vim_memmove().
--- a/src/configure.in
+++ b/src/configure.in
@@ -1193,6 +1193,28 @@ else
 
     LDFLAGS="$ac_save_LDFLAGS"
 
+    AC_MSG_CHECKING(size of wchar_t is 2 bytes)
+    AC_CACHE_VAL(ac_cv_small_wchar_t,
+	[AC_TRY_RUN([
+#include <X11/Xlib.h>
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#endif
+		main()
+		{
+		  if (sizeof(wchar_t) <= 2)
+		    exit(1);
+		  exit(0);
+		}],
+		ac_cv_small_wchar_t="no",
+		ac_cv_small_wchar_t="yes",
+		AC_MSG_ERROR(failed to compile test program))])
+    AC_MSG_RESULT($ac_cv_small_wchar_t)
+    if test "x$ac_cv_small_wchar_t" = "xyes" ; then
+      AC_DEFINE(SMALL_WCHAR_T)
+    fi
+
   fi
 fi
 
@@ -2881,7 +2903,6 @@ main()
 AC_MSG_RESULT($ac_cv_sizeof_int)
 AC_DEFINE_UNQUOTED(SIZEOF_INT, $ac_cv_sizeof_int)
 
-
 dnl Check for memmove() before bcopy(), makes memmove() be used when both are
 dnl present, fixes problem with incompatibility between Solaris 2.4 and 2.5.
 
--- a/src/gui.c
+++ b/src/gui.c
@@ -3119,7 +3119,7 @@ static int	prev_which_scrollbars[3];
  */
     void
 gui_init_which_components(oldval)
-    char_u	*oldval;
+    char_u	*oldval UNUSED;
 {
 #ifdef FEAT_MENU
     static int	prev_menu_is_active = -1;
@@ -4668,8 +4668,8 @@ gui_mouse_correct()
  */
     static win_T *
 xy2win(x, y)
-    int		x;
-    int		y;
+    int		x UNUSED;
+    int		y UNUSED;
 {
 #ifdef FEAT_WINDOWS
     int		row;
@@ -5121,8 +5121,8 @@ gui_wingoto_xy(x, y)
  */
     void
 gui_handle_drop(x, y, modifiers, fnames, count)
-    int		x;
-    int		y;
+    int		x UNUSED;
+    int		y UNUSED;
     int_u	modifiers;
     char_u	**fnames;
     int		count;
--- a/src/gui_at_fs.c
+++ b/src/gui_at_fs.c
@@ -829,7 +829,7 @@ SFsetText(path)
     text.format = FMT8BIT;
 
 #ifdef XtNinternational
-    if (_XawTextFormat((TextWidget)selFileField) == XawFmtWide)
+    if ((unsigned long)_XawTextFormat((TextWidget)selFileField) == XawFmtWide)
     {
 	XawTextReplace(selFileField, (XawTextPosition)0,
 				    (XawTextPosition)WcsLen((wchar_t *)&SFtextBuffer[0]), &text);
@@ -851,17 +851,15 @@ SFsetText(path)
 #endif
 }
 
-/* ARGSUSED */
     static void
 SFbuttonPressList(w, n, event)
-    Widget		w;
-    int			n;
-    XButtonPressedEvent	*event;
+    Widget		w UNUSED;
+    int			n UNUSED;
+    XButtonPressedEvent	*event UNUSED;
 {
     SFbuttonPressed = 1;
 }
 
-/* ARGSUSED */
     static void
 SFbuttonReleaseList(w, n, event)
     Widget		 w;
@@ -989,11 +987,10 @@ SFcheckFiles(dir)
     return result;
 }
 
-/* ARGSUSED */
     static void
 SFdirModTimer(cl, id)
-    XtPointer		cl;
-    XtIntervalId	*id;
+    XtPointer		cl UNUSED;
+    XtIntervalId	*id UNUSED;
 {
     static int		n = -1;
     static int		f = 0;
@@ -1596,11 +1593,10 @@ SFscrollTimerInterval()
 
 static void SFscrollTimer __ARGS((XtPointer p, XtIntervalId *id));
 
-/* ARGSUSED */
     static void
 SFscrollTimer(p, id)
     XtPointer		p;
-    XtIntervalId	*id;
+    XtIntervalId	*id UNUSED;
 {
     SFDir	*dir;
     int		save;
@@ -1695,10 +1691,9 @@ SFnewInvertEntry(n, event)
     }
 }
 
-/* ARGSUSED */
     static void
 SFenterList(w, n, event)
-    Widget		w;
+    Widget		w UNUSED;
     int			n;
     XEnterWindowEvent	*event;
 {
@@ -1719,12 +1714,11 @@ SFenterList(w, n, event)
     }
 }
 
-/* ARGSUSED */
     static void
 SFleaveList(w, n, event)
-    Widget	w;
+    Widget	w UNUSED;
     int		n;
-    XEvent	*event;
+    XEvent	*event UNUSED;
 {
     if (SFcurrentInvert[n] != -1)
     {
@@ -1733,10 +1727,9 @@ SFleaveList(w, n, event)
     }
 }
 
-/* ARGSUSED */
     static void
 SFmotionList(w, n, event)
-    Widget		w;
+    Widget		w UNUSED;
     int			n;
     XMotionEvent	*event;
 {
@@ -1754,7 +1747,6 @@ SFmotionList(w, n, event)
     }
 }
 
-/* ARGSUSED */
     static void
 SFvFloatSliderMovedCallback(w, n, fnew)
     Widget	w;
@@ -1767,10 +1759,9 @@ SFvFloatSliderMovedCallback(w, n, fnew)
     SFvSliderMovedCallback(w, (int)(long)n, nw);
 }
 
-/* ARGSUSED */
     static void
 SFvSliderMovedCallback(w, n, nw)
-    Widget	w;
+    Widget	w UNUSED;
     int		n;
     int		nw;
 {
@@ -1853,10 +1844,9 @@ SFvSliderMovedCallback(w, n, nw)
     }
 }
 
-/* ARGSUSED */
     static void
 SFvAreaSelectedCallback(w, n, pnew)
-    Widget		w;
+    Widget	w;
     XtPointer	n;
     XtPointer	pnew;
 {
@@ -1914,10 +1904,9 @@ SFvAreaSelectedCallback(w, n, pnew)
     SFvSliderMovedCallback(w, (int)(long)n, nw);
 }
 
-/* ARGSUSED */
     static void
 SFhSliderMovedCallback(w, n, nw)
-    Widget	w;
+    Widget	w UNUSED;
     XtPointer	n;
     XtPointer	nw;
 {
@@ -1933,10 +1922,9 @@ SFhSliderMovedCallback(w, n, nw)
     SFdrawList((int)(long)n, SF_DO_NOT_SCROLL);
 }
 
-/* ARGSUSED */
     static void
 SFhAreaSelectedCallback(w, n, pnew)
-    Widget		w;
+    Widget	w;
     XtPointer	n;
     XtPointer	pnew;
 {
@@ -1994,11 +1982,10 @@ SFhAreaSelectedCallback(w, n, pnew)
     }
 }
 
-/* ARGSUSED */
     static void
 SFpathSliderMovedCallback(w, client_data, nw)
-    Widget		w;
-    XtPointer	client_data;
+    Widget	w UNUSED;
+    XtPointer	client_data UNUSED;
     XtPointer	nw;
 {
     SFDir		*dir;
@@ -2031,11 +2018,10 @@ SFpathSliderMovedCallback(w, client_data
     XawTextSetInsertionPoint(selFileField, pos);
 }
 
-/* ARGSUSED */
     static void
 SFpathAreaSelectedCallback(w, client_data, pnew)
     Widget	w;
-    XtPointer	client_data;
+    XtPointer	client_data UNUSED;
     XtPointer	pnew;
 {
     int		nw = (int)(long)pnew;
@@ -2206,13 +2192,12 @@ static char *oneLineTextEditTranslations
 
 static void SFexposeList __ARGS((Widget w, XtPointer n, XEvent *event, Boolean *cont));
 
-/* ARGSUSED */
     static void
 SFexposeList(w, n, event, cont)
-    Widget	w;
+    Widget	w UNUSED;
     XtPointer	n;
     XEvent	*event;
-    Boolean	*cont;
+    Boolean	*cont UNUSED;
 {
     if ((event->type == NoExpose) || event->xexpose.count)
 	return;
@@ -2222,13 +2207,12 @@ SFexposeList(w, n, event, cont)
 
 static void SFmodVerifyCallback __ARGS((Widget w, XtPointer client_data, XEvent *event, Boolean *cont));
 
-/* ARGSUSED */
     static void
 SFmodVerifyCallback(w, client_data, event, cont)
-    Widget		w;
-    XtPointer		client_data;
+    Widget		w UNUSED;
+    XtPointer		client_data UNUSED;
     XEvent		*event;
-    Boolean		*cont;
+    Boolean		*cont UNUSED;
 {
     char	buf[2];
 
@@ -2241,11 +2225,11 @@ SFmodVerifyCallback(w, client_data, even
 
 static void SFokCallback __ARGS((Widget w, XtPointer cl, XtPointer cd));
 
-/* ARGSUSED */
     static void
 SFokCallback(w, cl, cd)
-    Widget	w;
-    XtPointer	cl, cd;
+    Widget	w UNUSED;
+    XtPointer	cl UNUSED;
+    XtPointer	cd UNUSED;
 {
     SFstatus = SEL_FILE_OK;
 }
@@ -2258,11 +2242,11 @@ static XtCallbackRec SFokSelect[] =
 
 static void SFcancelCallback __ARGS((Widget w, XtPointer cl, XtPointer cd));
 
-/* ARGSUSED */
     static void
 SFcancelCallback(w, cl, cd)
-    Widget	w;
-    XtPointer	cl, cd;
+    Widget	w UNUSED;
+    XtPointer	cl UNUSED;
+    XtPointer	cd UNUSED;
 {
     SFstatus = SEL_FILE_CANCEL;
 }
@@ -2275,16 +2259,15 @@ static XtCallbackRec SFcancelSelect[] =
 
 static void SFdismissAction __ARGS((Widget w, XEvent *event, String *params, Cardinal *num_params));
 
-/* ARGSUSED */
     static void
 SFdismissAction(w, event, params, num_params)
-    Widget	w;
-    XEvent *event;
-    String *params;
-    Cardinal *num_params;
+    Widget	w UNUSED;
+    XEvent	*event;
+    String	*params UNUSED;
+    Cardinal	*num_params UNUSED;
 {
-    if (event->type == ClientMessage &&
-	    event->xclient.data.l[0] != SFwmDeleteWindow)
+    if (event->type == ClientMessage
+	    && (Atom)event->xclient.data.l[0] != SFwmDeleteWindow)
 	return;
 
     SFstatus = SEL_FILE_CANCEL;
@@ -2703,7 +2686,7 @@ SFcreateWidgets(toplevel, prompt, ok, ca
 SFtextChanged()
 {
 #if defined(FEAT_XFONTSET) && defined(XtNinternational)
-    if (_XawTextFormat((TextWidget)selFileField) == XawFmtWide)
+    if ((unsigned long)_XawTextFormat((TextWidget)selFileField) == XawFmtWide)
     {
 	wchar_t *wcbuf=(wchar_t *)SFtextBuffer;
 
@@ -2749,7 +2732,7 @@ SFgetText()
 #if defined(FEAT_XFONTSET) && defined(XtNinternational)
     char *buf;
 
-    if (_XawTextFormat((TextWidget)selFileField) == XawFmtWide)
+    if ((unsigned long)_XawTextFormat((TextWidget)selFileField) == XawFmtWide)
     {
 	wchar_t *wcbuf;
 	int mbslength;
--- a/src/gui_at_sb.c
+++ b/src/gui_at_sb.c
@@ -198,10 +198,13 @@ ScrollbarClassRec vim_scrollbarClassRec 
     /* extension	*/  NULL
   },
   { /* simple fields */
-    /* change_sensitive	*/  XtInheritChangeSensitive
+    /* change_sensitive	*/  XtInheritChangeSensitive,
+#ifndef OLDXAW
+    /* extension */	    NULL
+#endif
   },
   { /* scrollbar fields */
-    /* ignore	    */	0
+    /* empty	    */	    0
   }
 };
 
@@ -241,7 +244,8 @@ FillArea(sbw, top, bottom, fill, draw_sh
 
     if (bottom <= 0 || bottom <= top)
 	return;
-    if ((sw = sbw->scrollbar.shadow_width) < 0)
+    sw = sbw->scrollbar.shadow_width;
+    if (sw < 0)
 	sw = 0;
     margin = MARGIN (sbw);
     floor = sbw->scrollbar.length - margin + 2;
@@ -516,13 +520,12 @@ SetDimensions(sbw)
     }
 }
 
-/* ARGSUSED */
     static void
 Initialize(request, new, args, num_args)
-    Widget	request;	/* what the client asked for */
+    Widget	request UNUSED;	/* what the client asked for */
     Widget	new;		/* what we're going to give him */
-    ArgList	args;
-    Cardinal	*num_args;
+    ArgList	args UNUSED;
+    Cardinal	*num_args UNUSED;
 {
     ScrollbarWidget sbw = (ScrollbarWidget) new;
 
@@ -556,14 +559,13 @@ Realize(w, valueMask, attributes)
 	(w, valueMask, attributes);
 }
 
-/* ARGSUSED */
     static Boolean
 SetValues(current, request, desired, args, num_args)
-    Widget  current,	    /* what I am */
-	    request,	    /* what he wants me to be */
-	    desired;	    /* what I will become */
-    ArgList args;
-    Cardinal *num_args;
+    Widget  current;	    /* what I am */
+    Widget  request UNUSED; /* what he wants me to be */
+    Widget  desired;	    /* what I will become */
+    ArgList args UNUSED;
+    Cardinal *num_args UNUSED;
 {
     ScrollbarWidget	sbw = (ScrollbarWidget) current;
     ScrollbarWidget	dsbw = (ScrollbarWidget) desired;
@@ -609,7 +611,6 @@ Resize(w)
 }
 
 
-/* ARGSUSED */
     static void
 Redisplay(w, event, region)
     Widget w;
@@ -789,11 +790,10 @@ HandleThumb(w, event, params, num_params
     }
 }
 
-/* ARGSUSED */
     static void
 RepeatNotify(client_data, idp)
     XtPointer client_data;
-    XtIntervalId *idp;
+    XtIntervalId *idp UNUSED;
 {
     ScrollbarWidget sbw = (ScrollbarWidget) client_data;
     int		    call_data;
@@ -839,46 +839,42 @@ FloatInRange(num, small, big)
     return (num < small) ? small : ((num > big) ? big : num);
 }
 
-/* ARGSUSED */
     static void
 ScrollOneLineUp(w, event, params, num_params)
     Widget	w;
     XEvent	*event;
-    String	*params;
-    Cardinal	*num_params;
+    String	*params UNUSED;
+    Cardinal	*num_params UNUSED;
 {
     ScrollSome(w, event, -ONE_LINE_DATA);
 }
 
-/* ARGSUSED */
     static void
 ScrollOneLineDown(w, event, params, num_params)
     Widget	w;
     XEvent	*event;
-    String	*params;
-    Cardinal	*num_params;
+    String	*params UNUSED;
+    Cardinal	*num_params UNUSED;
 {
     ScrollSome(w, event, ONE_LINE_DATA);
 }
 
-/* ARGSUSED */
     static void
 ScrollPageDown(w, event, params, num_params)
     Widget	w;
     XEvent	*event;
-    String	*params;
-    Cardinal	*num_params;
+    String	*params UNUSED;
+    Cardinal	*num_params UNUSED;
 {
     ScrollSome(w, event, ONE_PAGE_DATA);
 }
 
-/* ARGSUSED */
     static void
 ScrollPageUp(w, event, params, num_params)
     Widget	w;
     XEvent	*event;
-    String	*params;
-    Cardinal	*num_params;
+    String	*params UNUSED;
+    Cardinal	*num_params UNUSED;
 {
     ScrollSome(w, event, -ONE_PAGE_DATA);
 }
@@ -901,13 +897,12 @@ ScrollSome(w, event, call_data)
     XtCallCallbacks(w, XtNscrollProc, (XtPointer)call_data);
 }
 
-/* ARGSUSED */
     static void
 NotifyScroll(w, event, params, num_params)
     Widget	w;
     XEvent	*event;
-    String	*params;
-    Cardinal	*num_params;
+    String	*params UNUSED;
+    Cardinal	*num_params UNUSED;
 {
     ScrollbarWidget sbw = (ScrollbarWidget) w;
     Position	    x, y, loc;
@@ -991,13 +986,12 @@ NotifyScroll(w, event, params, num_param
 					   delay, RepeatNotify, (XtPointer)w);
 }
 
-/* ARGSUSED */
     static void
 EndScroll(w, event, params, num_params)
     Widget w;
-    XEvent *event;	/* unused */
-    String *params;	/* unused */
-    Cardinal *num_params;   /* unused */
+    XEvent *event UNUSED;
+    String *params UNUSED;
+    Cardinal *num_params UNUSED;
 {
     ScrollbarWidget sbw = (ScrollbarWidget) w;
 
@@ -1023,13 +1017,12 @@ FractionLoc(sbw, x, y)
     return PICKLENGTH(sbw, x / width, y / height);
 }
 
-/* ARGSUSED */
     static void
 MoveThumb(w, event, params, num_params)
     Widget	w;
     XEvent	*event;
-    String	*params;	/* unused */
-    Cardinal	*num_params;	/* unused */
+    String	*params UNUSED;
+    Cardinal	*num_params UNUSED;
 {
     ScrollbarWidget	sbw = (ScrollbarWidget)w;
     Position		x, y;
@@ -1069,13 +1062,12 @@ MoveThumb(w, event, params, num_params)
 }
 
 
-/* ARGSUSED */
     static void
 NotifyThumb(w, event, params, num_params)
     Widget	w;
     XEvent	*event;
-    String	*params;	/* unused */
-    Cardinal	*num_params;	/* unused */
+    String	*params UNUSED;
+    Cardinal	*num_params UNUSED;
 {
     ScrollbarWidget sbw = (ScrollbarWidget)w;
     /* Use a union to avoid a warning for the weird conversion from float to
@@ -1096,7 +1088,6 @@ NotifyThumb(w, event, params, num_params
     XtCallCallbacks(w, XtNjumpProc, (XtPointer)&sbw->scrollbar.top);
 }
 
-/* ARGSUSED */
     static void
 AllocTopShadowGC(w)
     Widget w;
@@ -1110,7 +1101,6 @@ AllocTopShadowGC(w)
     sbw->scrollbar.top_shadow_GC = XtGetGC(w, valuemask, &myXGCV);
 }
 
-/* ARGSUSED */
     static void
 AllocBotShadowGC(w)
     Widget w;
@@ -1124,11 +1114,10 @@ AllocBotShadowGC(w)
     sbw->scrollbar.bot_shadow_GC = XtGetGC(w, valuemask, &myXGCV);
 }
 
-/* ARGSUSED */
     static void
 _Xaw3dDrawShadows(gw, event, region, out)
     Widget  gw;
-    XEvent  *event;
+    XEvent  *event UNUSED;
     Region  region;
     int	    out;
 {
--- a/src/gui_athena.c
+++ b/src/gui_athena.c
@@ -86,10 +86,9 @@ static int		puller_width = 0;
  * Scrollbar callback (XtNjumpProc) for when the scrollbar is dragged with the
  * left or middle mouse button.
  */
-/* ARGSUSED */
     static void
 gui_athena_scroll_cb_jump(w, client_data, call_data)
-    Widget	w;
+    Widget	w UNUSED;
     XtPointer	client_data, call_data;
 {
     scrollbar_T *sb, *sb_info;
@@ -122,10 +121,9 @@ gui_athena_scroll_cb_jump(w, client_data
  * Scrollbar callback (XtNscrollProc) for paging up or down with the left or
  * right mouse buttons.
  */
-/* ARGSUSED */
     static void
 gui_athena_scroll_cb_scroll(w, client_data, call_data)
-    Widget	w;
+    Widget	w UNUSED;
     XtPointer	client_data, call_data;
 {
     scrollbar_T *sb, *sb_info;
@@ -492,7 +490,7 @@ get_toolbar_pixmap(menu, sen)
     if (menu->icon_builtin || gui_find_bitmap(menu->name, buf, "xpm") == FAIL)
     {
 	if (menu->iconidx >= 0 && menu->iconidx
-		   < (sizeof(built_in_pixmaps) / sizeof(built_in_pixmaps[0])))
+	      < (int)(sizeof(built_in_pixmaps) / sizeof(built_in_pixmaps[0])))
 	    xpm = built_in_pixmaps[menu->iconidx];
 	else
 	    xpm = tb_blank_xpm;
@@ -763,7 +761,7 @@ athena_calculate_ins_pos(widget)
     XtGetValues(XtParent(widget), args, n);
 
     retval = num_children;
-    for (i = 0; i < num_children; ++i)
+    for (i = 0; i < (int)num_children; ++i)
     {
 	Widget	current = children[i];
 	vimmenu_T	*menu = NULL;
@@ -780,11 +778,10 @@ athena_calculate_ins_pos(widget)
     return retval;
 }
 
-/* ARGSUSED */
     void
 gui_mch_add_menu(menu, idx)
     vimmenu_T	*menu;
-    int		idx;
+    int		idx UNUSED;
 {
     char_u	*pullright_name;
     Dimension	height, space, border;
@@ -869,7 +866,7 @@ gui_mch_add_menu(menu, idx)
 	    XtVaGetValues(parent->submenu_id, XtNchildren, &children,
 					      XtNnumChildren, &num_children,
 					      NULL);
-	    for (i = 0; i < num_children; ++i)
+	    for (i = 0; i < (int)num_children; ++i)
 	    {
 		XtVaSetValues(children[i],
 			      XtNrightMargin, puller_width,
@@ -913,7 +910,7 @@ gui_athena_menu_has_submenus(id, ignore)
     XtVaGetValues(id, XtNchildren, &children,
 		      XtNnumChildren, &num_children,
 		      NULL);
-    for (i = 0; i < num_children; ++i)
+    for (i = 0; i < (int)num_children; ++i)
     {
 	if (children[i] == ignore)
 	    continue;
@@ -1175,11 +1172,10 @@ make_pull_name(name)
     return pname;
 }
 
-/* ARGSUSED */
     void
 gui_mch_add_menu_item(menu, idx)
     vimmenu_T	*menu;
-    int		idx;
+    int		idx UNUSED;
 {
     vimmenu_T	*parent = menu->parent;
 
@@ -1444,7 +1440,7 @@ gui_mch_compute_toolbar_height()
 		XtNchildren,	    &children,
 		XtNnumChildren,	    &numChildren,
 		NULL);
-	for (i = 0; i < numChildren; i++)
+	for (i = 0; i < (int)numChildren; i++)
 	{
 	    whgt = 0;
 
@@ -1473,10 +1469,9 @@ gui_mch_get_toolbar_colors(bgp, fgp, bsp
 #endif
 
 
-/* ARGSUSED */
     void
 gui_mch_toggle_tearoffs(enable)
-    int		enable;
+    int		enable UNUSED;
 {
     /* no tearoff menus */
 }
@@ -1537,7 +1532,7 @@ gui_mch_destroy_menu(menu)
 	    else
 		get_left_margin = True;
 
-	    for (i = 0; i < num_children; ++i)
+	    for (i = 0; i < (int)num_children; ++i)
 	    {
 		if (children[i] == menu->id)
 		    continue;
@@ -1645,11 +1640,10 @@ gui_mch_destroy_menu(menu)
     }
 }
 
-/*ARGSUSED*/
     static void
 gui_athena_menu_timeout(client_data, id)
     XtPointer	    client_data;
-    XtIntervalId    *id;
+    XtIntervalId    *id UNUSED;
 {
     Widget  w = (Widget)client_data;
     Widget  popup;
@@ -1678,12 +1672,11 @@ gui_athena_menu_timeout(client_data, id)
  *
  * This is called when XtPopup() is called.
  */
-/*ARGSUSED*/
     static void
 gui_athena_popup_callback(w, client_data, call_data)
     Widget	w;
     XtPointer	client_data;
-    XtPointer	call_data;
+    XtPointer	call_data UNUSED;
 {
     /* Assumption: XtIsSubclass(XtParent(w),simpleMenuWidgetClass) */
     vimmenu_T	*menu = (vimmenu_T *)client_data;
@@ -1711,7 +1704,6 @@ gui_athena_popup_callback(w, client_data
 		     NULL);
 }
 
-/* ARGSUSED */
     static void
 gui_athena_popdown_submenus_action(w, event, args, nargs)
     Widget	w;
@@ -1756,7 +1748,6 @@ has_submenu(widget)
     return False;
 }
 
-/* ARGSUSED */
     static void
 gui_athena_delayed_arm_action(w, event, args, nargs)
     Widget	w;
@@ -1837,7 +1828,6 @@ submenu_widget(widget)
      * (XtIsSubclass(popup,simpleMenuWidgetClass) == True) */
 }
 
-/* ARGSUSED */
     void
 gui_mch_show_popupmenu(menu)
     vimmenu_T *menu;
@@ -2046,15 +2036,14 @@ gui_x11_get_wid()
  * Put up a file requester.
  * Returns the selected name in allocated memory, or NULL for Cancel.
  */
-/* ARGSUSED */
     char_u *
 gui_mch_browse(saving, title, dflt, ext, initdir, filter)
-    int		saving;		/* select file to write */
-    char_u	*title;		/* not used (title for the window) */
-    char_u	*dflt;		/* not used (default name) */
-    char_u	*ext;		/* not used (extension added) */
+    int		saving UNUSED;	/* select file to write */
+    char_u	*title;		/* title for the window */
+    char_u	*dflt;		/* default name */
+    char_u	*ext UNUSED;	/* extension added */
     char_u	*initdir;	/* initial directory, NULL for current dir */
-    char_u	*filter;	/* not used (file name filter) */
+    char_u	*filter UNUSED;	/* file name filter */
 {
     Position x, y;
     char_u	dirbuf[MAXPATHL];
@@ -2100,13 +2089,12 @@ static void dialog_wm_handler __ARGS((Wi
  * Callback function for the textfield.  When CR is hit this works like
  * hitting the "OK" button, ESC like "Cancel".
  */
-/* ARGSUSED */
     static void
 keyhit_callback(w, client_data, event, cont)
-    Widget		w;
-    XtPointer		client_data;
+    Widget		w UNUSED;
+    XtPointer		client_data UNUSED;
     XEvent		*event;
-    Boolean		*cont;
+    Boolean		*cont UNUSED;
 {
     char	buf[2];
 
@@ -2119,12 +2107,11 @@ keyhit_callback(w, client_data, event, c
     }
 }
 
-/* ARGSUSED */
     static void
 butproc(w, client_data, call_data)
-    Widget	w;
+    Widget	w UNUSED;
     XtPointer	client_data;
-    XtPointer	call_data;
+    XtPointer	call_data UNUSED;
 {
     dialogStatus = (int)(long)client_data + 1;
 }
@@ -2132,27 +2119,25 @@ butproc(w, client_data, call_data)
 /*
  * Function called when dialog window closed.
  */
-/*ARGSUSED*/
     static void
 dialog_wm_handler(w, client_data, event, dum)
-    Widget	w;
-    XtPointer	client_data;
+    Widget	w UNUSED;
+    XtPointer	client_data UNUSED;
     XEvent	*event;
-    Boolean	*dum;
+    Boolean	*dum UNUSED;
 {
     if (event->type == ClientMessage
-	    && ((XClientMessageEvent *)event)->data.l[0] == dialogatom)
+	    && (Atom)((XClientMessageEvent *)event)->data.l[0] == dialogatom)
 	dialogStatus = 0;
 }
 
-/* ARGSUSED */
     int
 gui_mch_dialog(type, title, message, buttons, dfltbutton, textfield)
-    int		type;
+    int		type UNUSED;
     char_u	*title;
     char_u	*message;
     char_u	*buttons;
-    int		dfltbutton;
+    int		dfltbutton UNUSED;
     char_u	*textfield;
 {
     char_u		*buts;
--- a/src/gui_beval.c
+++ b/src/gui_beval.c
@@ -18,7 +18,7 @@
     void
 general_beval_cb(beval, state)
     BalloonEval *beval;
-    int state;
+    int		state UNUSED;
 {
     win_T	*wp;
     int		col;
@@ -726,10 +726,10 @@ removeEventHandler(beval)
  */
     static void
 pointerEventEH(w, client_data, event, unused)
-    Widget	w;
+    Widget	w UNUSED;
     XtPointer	client_data;
     XEvent	*event;
-    Boolean	*unused;
+    Boolean	*unused UNUSED;
 {
     BalloonEval *beval = (BalloonEval *)client_data;
     pointerEvent(beval, event);
@@ -877,7 +877,7 @@ pointerEvent(beval, event)
     static void
 timerRoutine(dx, id)
     XtPointer	    dx;
-    XtIntervalId    *id;
+    XtIntervalId    *id UNUSED;
 {
     BalloonEval *beval = (BalloonEval *)dx;
 
--- a/src/gui_motif.c
+++ b/src/gui_motif.c
@@ -117,10 +117,9 @@ static void gui_motif_scroll_colors __AR
  * Call-back routines.
  */
 
-/* ARGSUSED */
     static void
 scroll_cb(w, client_data, call_data)
-    Widget	w;
+    Widget	w UNUSED;
     XtPointer	client_data, call_data;
 {
     scrollbar_T *sb;
@@ -136,11 +135,11 @@ scroll_cb(w, client_data, call_data)
 }
 
 #ifdef FEAT_GUI_TABLINE
-/*ARGSUSED*/
     static void
 tabline_cb(w, client_data, call_data)
-    Widget	w;
-    XtPointer	client_data, call_data;
+    Widget	w UNUSED;
+    XtPointer	client_data UNUSED;
+    XtPointer	call_data;
 {
     XmNotebookCallbackStruct *nptr;
 
@@ -149,11 +148,11 @@ tabline_cb(w, client_data, call_data)
 	send_tabline_event(nptr->page_number);
 }
 
-/*ARGSUSED*/
     static void
 tabline_button_cb(w, client_data, call_data)
     Widget	w;
-    XtPointer	client_data, call_data;
+    XtPointer	client_data UNUSED;
+    XtPointer	call_data UNUSED;
 {
     int		cmd, tab_idx;
 
@@ -166,11 +165,10 @@ tabline_button_cb(w, client_data, call_d
 /*
  * Tabline single mouse click timeout handler
  */
-/*ARGSUSED*/
     static void
 motif_tabline_timer_cb (timed_out, interval_id)
     XtPointer		timed_out;
-    XtIntervalId	*interval_id;
+    XtIntervalId	*interval_id UNUSED;
 {
     *((int *)timed_out) = TRUE;
 }
@@ -203,13 +201,12 @@ tabline_scroller_clicked(scroller_name, 
     return FALSE;
 }
 
-/*ARGSUSED*/
     static void
 tabline_menu_cb(w, closure, e, continue_dispatch)
     Widget	w;
-    XtPointer	closure;
+    XtPointer	closure UNUSED;
     XEvent	*e;
-    Boolean	*continue_dispatch;
+    Boolean	*continue_dispatch UNUSED;
 {
     Widget			tab_w;
     XButtonPressedEvent		*event;
@@ -277,11 +274,10 @@ tabline_menu_cb(w, closure, e, continue_
     XtManageChild(tabLine_menu);
 }
 
-/*ARGSUSED*/
     static void
 tabline_balloon_cb(beval, state)
     BalloonEval	*beval;
-    int		state;
+    int		state UNUSED;
 {
     int		nr;
     tabpage_T	*tp;
@@ -642,13 +638,12 @@ gui_x11_destroy_widgets()
 #endif
 }
 
-/*ARGSUSED*/
     void
 gui_mch_set_text_area_pos(x, y, w, h)
-    int	    x;
-    int	    y;
-    int	    w;
-    int	    h;
+    int	    x UNUSED;
+    int	    y UNUSED;
+    int	    w UNUSED;
+    int	    h UNUSED;
 {
 #ifdef FEAT_TOOLBAR
     /* Give keyboard focus to the textArea instead of the toolbar. */
@@ -1261,7 +1256,7 @@ get_toolbar_pixmap(menu, fname)
     if (menu->icon_builtin || gui_find_bitmap(menu->name, buf, "xpm") == FAIL)
     {
 	if (menu->iconidx >= 0 && menu->iconidx
-		   < (sizeof(built_in_pixmaps) / sizeof(built_in_pixmaps[0])))
+	       < (int)(sizeof(built_in_pixmaps) / sizeof(built_in_pixmaps[0])))
 	    xpm = built_in_pixmaps[menu->iconidx];
 	else
 	    xpm = tb_blank_xpm;
@@ -1716,10 +1711,9 @@ gui_mch_destroy_menu(menu)
     }
 }
 
-/* ARGSUSED */
     void
 gui_mch_show_popupmenu(menu)
-    vimmenu_T *menu;
+    vimmenu_T *menu UNUSED;
 {
 #ifdef MOTIF_POPUP
     XmMenuPosition(menu->submenu_id, gui_x11_get_last_mouse_event());
@@ -2046,9 +2040,8 @@ do_mnemonic(Widget w, unsigned int keyco
 /*
  * Callback routine for dialog mnemonic processing.
  */
-/*ARGSUSED*/
     static void
-mnemonic_event(Widget w, XtPointer call_data, XKeyEvent *event)
+mnemonic_event(Widget w, XtPointer call_data UNUSED, XKeyEvent *event)
 {
     do_mnemonic(w, event->keycode);
 }
@@ -2287,13 +2280,12 @@ set_predefined_fontlist(parent, name)
  * Put up a file requester.
  * Returns the selected name in allocated memory, or NULL for Cancel.
  */
-/* ARGSUSED */
     char_u *
 gui_mch_browse(saving, title, dflt, ext, initdir, filter)
-    int		saving;		/* select file to write */
+    int		saving UNUSED;	/* select file to write */
     char_u	*title;		/* title for the window */
     char_u	*dflt;		/* default name */
-    char_u	*ext;		/* not used (extension added) */
+    char_u	*ext UNUSED;	/* not used (extension added) */
     char_u	*initdir;	/* initial directory, NULL for current dir */
     char_u	*filter;	/* file name filter */
 {
@@ -2413,12 +2405,11 @@ gui_mch_browse(saving, title, dflt, ext,
 /*
  * Process callback from Dialog cancel actions.
  */
-/* ARGSUSED */
     static void
 DialogCancelCB(w, client_data, call_data)
-    Widget	w;		/*  widget id		*/
-    XtPointer	client_data;	/*  data from application   */
-    XtPointer	call_data;	/*  data from widget class  */
+    Widget	w UNUSED;		/*  widget id		*/
+    XtPointer	client_data UNUSED;	/*  data from application   */
+    XtPointer	call_data UNUSED;	/*  data from widget class  */
 {
     if (browse_fname != NULL)
     {
@@ -2431,12 +2422,11 @@ DialogCancelCB(w, client_data, call_data
 /*
  * Process callback from Dialog actions.
  */
-/* ARGSUSED */
     static void
 DialogAcceptCB(w, client_data, call_data)
-    Widget	w;		/*  widget id		*/
-    XtPointer	client_data;	/*  data from application   */
-    XtPointer	call_data;	/*  data from widget class  */
+    Widget	w UNUSED;		/*  widget id		*/
+    XtPointer	client_data UNUSED;	/*  data from application   */
+    XtPointer	call_data;		/*  data from widget class  */
 {
     XmFileSelectionBoxCallbackStruct *fcb;
 
@@ -2467,13 +2457,12 @@ static void butproc __ARGS((Widget w, Xt
  * Callback function for the textfield.  When CR is hit this works like
  * hitting the "OK" button, ESC like "Cancel".
  */
-/* ARGSUSED */
     static void
 keyhit_callback(w, client_data, event, cont)
     Widget		w;
-    XtPointer		client_data;
+    XtPointer		client_data UNUSED;
     XEvent		*event;
-    Boolean		*cont;
+    Boolean		*cont UNUSED;
 {
     char	buf[2];
     KeySym	key_sym;
@@ -2490,12 +2479,11 @@ keyhit_callback(w, client_data, event, c
 	XmTextFieldClearSelection(w, XtLastTimestampProcessed(gui.dpy));
 }
 
-/* ARGSUSED */
     static void
 butproc(w, client_data, call_data)
-    Widget	w;
+    Widget	w UNUSED;
     XtPointer	client_data;
-    XtPointer	call_data;
+    XtPointer	call_data UNUSED;
 {
     dialogStatus = (int)(long)client_data + 1;
 }
@@ -2567,10 +2555,9 @@ create_pixmap_label(parent, name, data, 
 }
 #endif
 
-/* ARGSUSED */
     int
 gui_mch_dialog(type, title, message, button_names, dfltbutton, textfield)
-    int		type;
+    int		type UNUSED;
     char_u	*title;
     char_u	*message;
     char_u	*button_names;
@@ -3197,7 +3184,7 @@ gui_mch_compute_toolbar_height()
 		XmNchildren, &children,
 		XmNnumChildren, &numChildren, NULL);
 	borders += tst + tmh;
-	for (i = 0; i < numChildren; i++)
+	for (i = 0; i < (int)numChildren; i++)
 	{
 	    whgt = 0;
 	    XtVaGetValues(children[i], XmNheight, &whgt, NULL);
@@ -3237,13 +3224,12 @@ motif_get_toolbar_colors(bgp, fgp, bsp, 
  * I have to use footer help for backwards compatability.  Hopefully both will
  * get implemented and the user will have a choice.
  */
-/*ARGSUSED*/
     static void
 toolbarbutton_enter_cb(w, client_data, event, cont)
-    Widget	w;
+    Widget	w UNUSED;
     XtPointer	client_data;
-    XEvent	*event;
-    Boolean	*cont;
+    XEvent	*event UNUSED;
+    Boolean	*cont UNUSED;
 {
     vimmenu_T	*menu = (vimmenu_T *) client_data;
 
@@ -3254,13 +3240,12 @@ toolbarbutton_enter_cb(w, client_data, e
     }
 }
 
-/*ARGSUSED*/
     static void
 toolbarbutton_leave_cb(w, client_data, event, cont)
-    Widget	w;
-    XtPointer	client_data;
-    XEvent	*event;
-    Boolean	*cont;
+    Widget	w UNUSED;
+    XtPointer	client_data UNUSED;
+    XEvent	*event UNUSED;
+    Boolean	*cont UNUSED;
 {
     gui_mch_set_footer((char_u *) "");
 }
@@ -3492,10 +3477,9 @@ gui_motif_scroll_colors(id)
 /*
  * Set the fontlist for Widget "id" to use gui.menu_fontset or gui.menu_font.
  */
-/*ARGSUSED*/
     void
 gui_motif_menu_fontlist(id)
-    Widget  id;
+    Widget  id UNUSED;
 {
 #ifdef FEAT_MENU
 #ifdef FONTSET_ALWAYS
@@ -3566,8 +3550,8 @@ typedef struct _SharedFindReplace
     Widget cancel;
 } SharedFindReplace;
 
-static SharedFindReplace find_widgets = { NULL };
-static SharedFindReplace repl_widgets = { NULL };
+static SharedFindReplace find_widgets = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
+static SharedFindReplace repl_widgets = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
 
 static void find_replace_destroy_callback __ARGS((Widget w, XtPointer client_data, XtPointer call_data));
 static void find_replace_dismiss_callback __ARGS((Widget w, XtPointer client_data, XtPointer call_data));
@@ -3576,12 +3560,11 @@ static void find_replace_callback __ARGS
 static void find_replace_keypress __ARGS((Widget w, SharedFindReplace * frdp, XKeyEvent * event));
 static void find_replace_dialog_create __ARGS((char_u *entry_text, int do_replace));
 
-/*ARGSUSED*/
     static void
 find_replace_destroy_callback(w, client_data, call_data)
-    Widget	w;
+    Widget	w UNUSED;
     XtPointer	client_data;
-    XtPointer	call_data;
+    XtPointer	call_data UNUSED;
 {
     SharedFindReplace *cd = (SharedFindReplace *)client_data;
 
@@ -3590,12 +3573,11 @@ find_replace_destroy_callback(w, client_
 	cd->dialog = (Widget)0;
 }
 
-/*ARGSUSED*/
     static void
 find_replace_dismiss_callback(w, client_data, call_data)
-    Widget	w;
+    Widget	w UNUSED;
     XtPointer	client_data;
-    XtPointer	call_data;
+    XtPointer	call_data UNUSED;
 {
     SharedFindReplace *cd = (SharedFindReplace *)client_data;
 
@@ -3603,22 +3585,20 @@ find_replace_dismiss_callback(w, client_
 	XtUnmanageChild(cd->dialog);
 }
 
-/*ARGSUSED*/
     static void
 entry_activate_callback(w, client_data, call_data)
-    Widget	w;
+    Widget	w UNUSED;
     XtPointer	client_data;
-    XtPointer	call_data;
+    XtPointer	call_data UNUSED;
 {
     XmProcessTraversal((Widget)client_data, XmTRAVERSE_CURRENT);
 }
 
-/*ARGSUSED*/
     static void
 find_replace_callback(w, client_data, call_data)
-    Widget	w;
+    Widget	w UNUSED;
     XtPointer	client_data;
-    XtPointer	call_data;
+    XtPointer	call_data UNUSED;
 {
     long_u	flags = (long_u)client_data;
     char	*find_text, *repl_text;
@@ -3668,10 +3648,9 @@ find_replace_callback(w, client_data, ca
 	XtFree(repl_text);
 }
 
-/*ARGSUSED*/
     static void
 find_replace_keypress(w, frdp, event)
-    Widget		w;
+    Widget		w UNUSED;
     SharedFindReplace	*frdp;
     XKeyEvent		*event;
 {
--- a/src/gui_x11.c
+++ b/src/gui_x11.c
@@ -570,22 +570,20 @@ static char **gui_argv = NULL;
  * Call-back routines.
  */
 
-/* ARGSUSED */
     static void
 gui_x11_timer_cb(timed_out, interval_id)
     XtPointer	    timed_out;
-    XtIntervalId    *interval_id;
+    XtIntervalId    *interval_id UNUSED;
 {
     *((int *)timed_out) = TRUE;
 }
 
-/* ARGSUSED */
     static void
 gui_x11_visibility_cb(w, dud, event, dum)
-    Widget	w;
-    XtPointer	dud;
+    Widget	w UNUSED;
+    XtPointer	dud UNUSED;
     XEvent	*event;
-    Boolean	*dum;
+    Boolean	*dum UNUSED;
 {
     if (event->type != VisibilityNotify)
 	return;
@@ -603,13 +601,12 @@ gui_x11_visibility_cb(w, dud, event, dum
     gui_mch_update();
 }
 
-/* ARGSUSED */
     static void
 gui_x11_expose_cb(w, dud, event, dum)
-    Widget	w;
-    XtPointer	dud;
+    Widget	w UNUSED;
+    XtPointer	dud UNUSED;
     XEvent	*event;
-    Boolean	*dum;
+    Boolean	*dum UNUSED;
 {
     XExposeEvent	*gevent;
     int			new_x;
@@ -680,13 +677,12 @@ shellRectangle(Widget shell, XRectangle 
 }
 #endif
 
-/* ARGSUSED */
     static void
 gui_x11_resize_window_cb(w, dud, event, dum)
-    Widget	w;
-    XtPointer	dud;
+    Widget	w UNUSED;
+    XtPointer	dud UNUSED;
     XEvent	*event;
-    Boolean	*dum;
+    Boolean	*dum UNUSED;
 {
     static int lastWidth, lastHeight;
 
@@ -727,35 +723,32 @@ gui_x11_resize_window_cb(w, dud, event, 
 #endif
 }
 
-/* ARGSUSED */
     static void
 gui_x11_focus_change_cb(w, data, event, dum)
-    Widget	w;
-    XtPointer	data;
+    Widget	w UNUSED;
+    XtPointer	data UNUSED;
     XEvent	*event;
-    Boolean	*dum;
+    Boolean	*dum UNUSED;
 {
     gui_focus_change(event->type == FocusIn);
 }
 
-/* ARGSUSED */
     static void
 gui_x11_enter_cb(w, data, event, dum)
-    Widget	w;
-    XtPointer	data;
-    XEvent	*event;
-    Boolean	*dum;
+    Widget	w UNUSED;
+    XtPointer	data UNUSED;
+    XEvent	*event UNUSED;
+    Boolean	*dum UNUSED;
 {
     gui_focus_change(TRUE);
 }
 
-/* ARGSUSED */
     static void
 gui_x11_leave_cb(w, data, event, dum)
-    Widget	w;
-    XtPointer	data;
-    XEvent	*event;
-    Boolean	*dum;
+    Widget	w UNUSED;
+    XtPointer	data UNUSED;
+    XEvent	*event UNUSED;
+    Boolean	*dum UNUSED;
 {
     gui_focus_change(FALSE);
 }
@@ -766,13 +759,12 @@ gui_x11_leave_cb(w, data, event, dum)
 # endif
 #endif
 
-/* ARGSUSED */
     void
 gui_x11_key_hit_cb(w, dud, event, dum)
-    Widget	w;
-    XtPointer	dud;
+    Widget	w UNUSED;
+    XtPointer	dud UNUSED;
     XEvent	*event;
-    Boolean	*dum;
+    Boolean	*dum UNUSED;
 {
     XKeyPressedEvent	*ev_press;
 #ifdef FEAT_XIM
@@ -1078,13 +1070,12 @@ theend:
 #endif
 }
 
-/* ARGSUSED */
     static void
 gui_x11_mouse_cb(w, dud, event, dum)
-    Widget	w;
-    XtPointer	dud;
+    Widget	w UNUSED;
+    XtPointer	dud UNUSED;
     XEvent	*event;
-    Boolean	*dum;
+    Boolean	*dum UNUSED;
 {
     static XtIntervalId timer = (XtIntervalId)0;
     static int	timed_out = TRUE;
@@ -1210,11 +1201,11 @@ gui_mch_prepare(argc, argv)
     while (arg < *argc)
     {
 	/* Look for argv[arg] in cmdline_options[] table */
-	for (i = 0; i < XtNumber(cmdline_options); i++)
+	for (i = 0; i < (int)XtNumber(cmdline_options); i++)
 	    if (strcmp(argv[arg], cmdline_options[i].option) == 0)
 		break;
 
-	if (i < XtNumber(cmdline_options))
+	if (i < (int)XtNumber(cmdline_options))
 	{
 	    /* Remember finding "-rv" or "-reverse" */
 	    if (strcmp("-rv", argv[arg]) == 0
@@ -1319,12 +1310,11 @@ static XtInputId _xsmp_xtinputid;
 
 static void local_xsmp_handle_requests __ARGS((XtPointer c, int *s, XtInputId *i));
 
-/*ARGSUSED*/
     static void
 local_xsmp_handle_requests(c, s, i)
-    XtPointer	c;
-    int		*s;
-    XtInputId	*i;
+    XtPointer	c UNUSED;
+    int		*s UNUSED;
+    XtInputId	*i UNUSED;
 {
     if (xsmp_handle_requests() == FAIL)
 	XtRemoveInput(_xsmp_xtinputid);
@@ -1438,7 +1428,7 @@ gui_mch_init()
 	    Columns = w;
 	if (mask & HeightValue)
 	{
-	    if (p_window > h - 1 || !option_was_set((char_u *)"window"))
+	    if (p_window > (long)h - 1 || !option_was_set((char_u *)"window"))
 		p_window = h - 1;
 	    Rows = h;
 	}
@@ -1753,10 +1743,9 @@ gui_init_menu_font()
 }
 #endif
 
-/*ARGSUSED*/
     void
 gui_mch_exit(rc)
-    int		rc;
+    int		rc UNUSED;
 {
 #if 0
     /* Lesstif gives an error message here, and so does Solaris.  The man page
@@ -1799,7 +1788,6 @@ gui_mch_set_winpos(x, y)
 	NULL);
 }
 
-/*ARGSUSED*/
     void
 gui_mch_set_shellsize(width, height, min_width, min_height,
 		    base_width, base_height, direction)
@@ -1809,7 +1797,7 @@ gui_mch_set_shellsize(width, height, min
     int		min_height;
     int		base_width;
     int		base_height;
-    int		direction;
+    int		direction UNUSED;
 {
 #ifdef FEAT_XIM
     height += xim_get_status_area_height(),
@@ -1847,11 +1835,10 @@ gui_mch_get_screen_dimensions(screen_w, 
  * If "fontset" is TRUE, load the "font_name" as a fontset.
  * Return FAIL if the font could not be loaded, OK otherwise.
  */
-/*ARGSUSED*/
     int
 gui_mch_init_font(font_name, do_fontset)
     char_u	*font_name;
-    int		do_fontset;
+    int		do_fontset UNUSED;
 {
     XFontStruct	*font = NULL;
 
@@ -2029,10 +2016,9 @@ gui_mch_get_font(name, giveErrorIfMissin
  * Return the name of font "font" in allocated memory.
  * Don't know how to get the actual name, thus use the provided name.
  */
-/*ARGSUSED*/
     char_u *
 gui_mch_get_fontname(font, name)
-    GuiFont font;
+    GuiFont font UNUSED;
     char_u  *name;
 {
     if (name == NULL)
@@ -2521,7 +2507,7 @@ draw_curl(row, col, cells)
 {
     int			i;
     int			offset;
-    const static int	val[8] = {1, 0, 0, 0, 1, 2, 2, 2 };
+    static const int	val[8] = {1, 0, 0, 0, 1, 2, 2, 2 };
 
     XSetForeground(gui.dpy, gui.text_gc, prev_sp_color);
     for (i = FILL_X(col); i < FILL_X(col + cells); ++i)
@@ -2569,8 +2555,10 @@ gui_mch_draw_string(row, col, s, len, fl
 # ifdef FEAT_XFONTSET
 	    if (current_fontset != NULL)
 	    {
-		if (c >= 0x10000 && sizeof(wchar_t) <= 2)
+#  ifdef SMALL_WCHAR_T
+		if (c >= 0x10000)
 		    c = 0xbf;		/* show chars > 0xffff as ? */
+#  endif
 		((wchar_t *)buf)[wlen] = c;
 	    }
 	    else
@@ -3136,11 +3124,11 @@ gui_mch_draw_menubar()
     /* Nothing to do in X */
 }
 
-/* ARGSUSED */
     void
 gui_x11_menu_cb(w, client_data, call_data)
-    Widget	w;
-    XtPointer	client_data, call_data;
+    Widget	w UNUSED;
+    XtPointer	client_data;
+    XtPointer	call_data UNUSED;
 {
     gui_menu_cb((vimmenu_T *)client_data);
 }
@@ -3153,13 +3141,12 @@ gui_x11_menu_cb(w, client_data, call_dat
  * Function called when window closed.	Works like ":qa".
  * Should put up a requester!
  */
-/*ARGSUSED*/
     static void
 gui_x11_wm_protocol_handler(w, client_data, event, dum)
-    Widget	w;
-    XtPointer	client_data;
+    Widget	w UNUSED;
+    XtPointer	client_data UNUSED;
     XEvent	*event;
-    Boolean	*dum;
+    Boolean	*dum UNUSED;
 {
     /*
      * Only deal with Client messages.
@@ -3172,7 +3159,7 @@ gui_x11_wm_protocol_handler(w, client_da
      * exit.  That can be cancelled though, thus Vim shouldn't exit here.
      * Just sync our swap files.
      */
-    if (((XClientMessageEvent *)event)->data.l[0] ==
+    if ((Atom)((XClientMessageEvent *)event)->data.l[0] ==
 						  wm_atoms[SAVE_YOURSELF_IDX])
     {
 	out_flush();
@@ -3185,7 +3172,7 @@ gui_x11_wm_protocol_handler(w, client_da
 	return;
     }
 
-    if (((XClientMessageEvent *)event)->data.l[0] !=
+    if ((Atom)((XClientMessageEvent *)event)->data.l[0] !=
 						  wm_atoms[DELETE_WINDOW_IDX])
 	return;
 
@@ -3196,13 +3183,12 @@ gui_x11_wm_protocol_handler(w, client_da
 /*
  * Function called when property changed. Check for incoming commands
  */
-/*ARGSUSED*/
     static void
 gui_x11_send_event_handler(w, client_data, event, dum)
-    Widget	w;
-    XtPointer	client_data;
+    Widget	w UNUSED;
+    XtPointer	client_data UNUSED;
     XEvent	*event;
-    Boolean	*dum;
+    Boolean	*dum UNUSED;
 {
     XPropertyEvent *e = (XPropertyEvent *) event;
 
@@ -3277,11 +3263,10 @@ gui_mch_start_blink()
     }
 }
 
-/* ARGSUSED */
     static void
 gui_x11_blink_cb(timed_out, interval_id)
-    XtPointer	    timed_out;
-    XtIntervalId    *interval_id;
+    XtPointer	    timed_out UNUSED;
+    XtIntervalId    *interval_id UNUSED;
 {
     if (blink_state == BLINK_ON)
     {
--- a/src/gui_xmdlg.c
+++ b/src/gui_xmdlg.c
@@ -448,7 +448,7 @@ fill_lists(enum ListSpecifier fix, Share
 
 	    items[i] = XmStringCreateLocalized(list[ENCODING][i]);
 
-	    if (i < n_items)
+	    if (i < (int)n_items)
 	    {
 		/* recycle old button */
 		XtVaSetValues(children[i],
@@ -481,7 +481,7 @@ fill_lists(enum ListSpecifier fix, Share
 
 	/* Destroy all the outstanding menu items.
 	 */
-	for (i = count[ENCODING]; i < n_items; ++i)
+	for (i = count[ENCODING]; i < (int)n_items; ++i)
 	{
 	    XtUnmanageChild(children[i]);
 	    XtDestroyWidget(children[i]);
@@ -544,9 +544,8 @@ fill_lists(enum ListSpecifier fix, Share
     }
 }
 
-/*ARGSUSED*/
     static void
-stoggle_callback(Widget w,
+stoggle_callback(Widget w UNUSED,
 	SharedFontSelData *data,
 	XmToggleButtonCallbackStruct *call_data)
 {
@@ -709,11 +708,10 @@ do_choice(Widget w,
     }
 }
 
-/*ARGSUSED*/
     static void
 encoding_callback(Widget w,
 	SharedFontSelData *data,
-	XtPointer dummy)
+	XtPointer dummy UNUSED)
 {
     XmString str;
     XmListCallbackStruct fake_data;
@@ -752,11 +750,10 @@ size_callback(Widget w,
     do_choice(w, data, call_data, SIZE);
 }
 
-/*ARGSUSED*/
     static void
-cancel_callback(Widget w,
+cancel_callback(Widget w UNUSED,
 	SharedFontSelData *data,
-	XmListCallbackStruct *call_data)
+	XmListCallbackStruct *call_data UNUSED)
 {
     if (data->sel[ENCODING])
     {
@@ -789,11 +786,10 @@ cancel_callback(Widget w,
     data->exit = True;
 }
 
-/*ARGSUSED*/
     static void
-ok_callback(Widget w,
+ok_callback(Widget w UNUSED,
 	SharedFontSelData *data,
-	XmPushButtonCallbackStruct *call_data)
+	XmPushButtonCallbackStruct *call_data UNUSED)
 {
     char    *pattern;
     char    **name;
--- a/src/gui_xmebw.c
+++ b/src/gui_xmebw.c
@@ -235,13 +235,12 @@ bump_color(unsigned short value)
     return tmp;
 }
 
-/*ARGSUSED*/
     static int
 alloc_color(Display	*display,
 	Colormap	colormap,
 	char		*colorname,
 	XColor		*xcolor,
-	void		*closure)
+	void		*closure UNUSED)
 {
     int status;
 
@@ -595,9 +594,10 @@ draw_unhighlight(XmEnhancedButtonWidget 
 		       XtHeight(eb), eb->primitive.highlight_thickness);
 }
 
-/*ARGSUSED*/
     static void
-draw_pixmap(XmEnhancedButtonWidget eb, XEvent *event, Region region)
+draw_pixmap(XmEnhancedButtonWidget eb,
+	    XEvent *event UNUSED,
+	    Region region UNUSED)
 {
     Pixmap	pix;
     GC		gc = eb->label.normal_GC;
@@ -641,7 +641,7 @@ draw_pixmap(XmEnhancedButtonWidget eb, X
     height = eb->core.height - 2 * y;
     if (h < height)
 	height = h;
-    if (depth == eb->core.depth)
+    if (depth == (int)eb->core.depth)
 	XCopyArea(XtDisplay(eb), pix, XtWindow(eb), gc, 0, 0,
 		width, height, x, y);
     else if (depth == 1)
@@ -731,9 +731,11 @@ draw_label(XmEnhancedButtonWidget eb, XE
 	eb->label.normal_GC = tmp_gc;
 }
 
-/*ARGSUSED*/
     static void
-Enter(Widget wid, XEvent *event, String *params, Cardinal *num_params)
+Enter(Widget wid,
+      XEvent *event,
+      String *params UNUSED,
+      Cardinal *num_params UNUSED)
 {
     XmEnhancedButtonWidget eb = (XmEnhancedButtonWidget) wid;
     XmPushButtonCallbackStruct call_value;
@@ -818,9 +820,11 @@ Enter(Widget wid, XEvent *event, String 
     }
 }
 
-/*ARGSUSED*/
     static void
-Leave(Widget wid, XEvent *event, String *params, Cardinal *num_params)
+Leave(Widget wid,
+      XEvent *event,
+      String *params UNUSED,
+      Cardinal *num_params UNUSED)
 {
     XmEnhancedButtonWidget eb = (XmEnhancedButtonWidget)wid;
     XmPushButtonCallbackStruct call_value;
@@ -976,9 +980,8 @@ set_size(XmEnhancedButtonWidget newtb)
     }
 }
 
-/*ARGSUSED*/
     static void
-Initialize(Widget rq, Widget ebw, ArgList args, Cardinal *n)
+Initialize(Widget rq, Widget ebw, ArgList args UNUSED, Cardinal *n UNUSED)
 {
     XmEnhancedButtonWidget  request = (XmEnhancedButtonWidget)rq;
     XmEnhancedButtonWidget  eb = (XmEnhancedButtonWidget)ebw;
@@ -1056,9 +1059,12 @@ Destroy(Widget w)
     free_pixmaps((XmEnhancedButtonWidget)w);
 }
 
-/*ARGSUSED*/
     static Boolean
-SetValues(Widget current, Widget request, Widget new, ArgList args, Cardinal *n)
+SetValues(Widget current,
+	  Widget request UNUSED,
+	  Widget new,
+	  ArgList args UNUSED,
+	  Cardinal *n UNUSED)
 {
     XmEnhancedButtonWidget  cur = (XmEnhancedButtonWidget) current;
     XmEnhancedButtonWidget  eb = (XmEnhancedButtonWidget) new;
@@ -1108,7 +1114,7 @@ SetValues(Widget current, Widget request
 		if ((win_x < 0) || (win_y < 0))
 		    return False;
 
-		if ((win_x > r_width) || (win_y > r_height))
+		if ((win_x > (int)r_width) || (win_y > (int)r_height))
 		    return False;
 		draw_highlight(eb);
 		draw_shadows(eb);
--- a/src/if_python.c
+++ b/src/if_python.c
@@ -1096,9 +1096,8 @@ static struct PyMethodDef VimMethods[] =
 
 /* Vim module - Implementation
  */
-/*ARGSUSED*/
     static PyObject *
-VimCommand(PyObject *self, PyObject *args)
+VimCommand(PyObject *self UNUSED, PyObject *args)
 {
     char *cmd;
     PyObject *result;
@@ -1242,9 +1241,8 @@ VimToPython(typval_T *our_tv, int depth,
 }
 #endif
 
-/*ARGSUSED*/
     static PyObject *
-VimEval(PyObject *self, PyObject *args)
+VimEval(PyObject *self UNUSED, PyObject *args)
 {
 #ifdef FEAT_EVAL
     char	*expr;
@@ -1894,9 +1892,8 @@ static PyTypeObject BufListType = {
 /* Buffer list object - Implementation
  */
 
-/*ARGSUSED*/
     static PyInt
-BufListLength(PyObject *self)
+BufListLength(PyObject *self UNUSED)
 {
     buf_T	*b = firstbuf;
     PyInt	n = 0;
@@ -1910,9 +1907,8 @@ BufListLength(PyObject *self)
     return n;
 }
 
-/*ARGSUSED*/
     static PyObject *
-BufListItem(PyObject *self, PyInt n)
+BufListItem(PyObject *self UNUSED, PyInt n)
 {
     buf_T *b;
 
@@ -2210,9 +2206,8 @@ static PyTypeObject WinListType = {
 
 /* Window list object - Implementation
  */
-/*ARGSUSED*/
     static PyInt
-WinListLength(PyObject *self)
+WinListLength(PyObject *self UNUSED)
 {
     win_T	*w = firstwin;
     PyInt	n = 0;
@@ -2226,9 +2221,8 @@ WinListLength(PyObject *self)
     return n;
 }
 
-/*ARGSUSED*/
     static PyObject *
-WinListItem(PyObject *self, PyInt n)
+WinListItem(PyObject *self UNUSED, PyInt n)
 {
     win_T *w;
 
@@ -2274,9 +2268,8 @@ static PyTypeObject CurrentType = {
 
 /* Current items object - Implementation
  */
-/*ARGSUSED*/
     static PyObject *
-CurrentGetattr(PyObject *self, char *name)
+CurrentGetattr(PyObject *self UNUSED, char *name)
 {
     if (strcmp(name, "buffer") == 0)
 	return (PyObject *)BufferNew(curbuf);
@@ -2295,9 +2288,8 @@ CurrentGetattr(PyObject *self, char *nam
     }
 }
 
-/*ARGSUSED*/
     static int
-CurrentSetattr(PyObject *self, char *name, PyObject *value)
+CurrentSetattr(PyObject *self UNUSED, char *name, PyObject *value)
 {
     if (strcmp(name, "line") == 0)
     {
--- a/src/version.c
+++ b/src/version.c
@@ -677,6 +677,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    184,
+/**/
     183,
 /**/
     182,
--- a/src/window.c
+++ b/src/window.c
@@ -1163,12 +1163,11 @@ win_split_ins(size, flags, newwin, dir)
  * WSP_NEWLOC may be specified in flags to prevent the location list from
  * being copied.
  */
-/*ARGSUSED*/
     static void
 win_init(newp, oldp, flags)
     win_T	*newp;
     win_T	*oldp;
-    int		 flags;
+    int		 flags UNUSED;
 {
     int		i;
 
@@ -1268,11 +1267,10 @@ win_count()
  * Must be called when there is just one window, filling the whole screen
  * (excluding the command line).
  */
-/*ARGSUSED*/
     int
 make_windows(count, vertical)
     int		count;
-    int		vertical;	/* split windows vertically if TRUE */
+    int		vertical UNUSED;  /* split windows vertically if TRUE */
 {
     int		maxcount;
     int		todo;
@@ -2353,11 +2351,10 @@ win_free_all()
  * Remove a window and its frame from the tree of frames.
  * Returns a pointer to the window that got the freed up space.
  */
-/*ARGSUSED*/
     static win_T *
 winframe_remove(win, dirp, tp)
     win_T	*win;
-    int		*dirp;		/* set to 'v' or 'h' for direction if 'ea' */
+    int		*dirp UNUSED;	/* set to 'v' or 'h' for direction if 'ea' */
     tabpage_T	*tp;		/* tab page "win" is in, NULL for current */
 {
     frame_T	*frp, *frp2, *frp3;
@@ -3500,10 +3497,9 @@ tabpage_index(ftp)
  * FAIL.
  * Careful: When OK is returned need to get a new tab page very very soon!
  */
-/*ARGSUSED*/
     static int
 leave_tabpage(new_curbuf)
-    buf_T	*new_curbuf;	    /* what is going to be the new curbuf,
+    buf_T	*new_curbuf UNUSED;    /* what is going to be the new curbuf,
 				       NULL if unknown */
 {
     tabpage_T	*tp = curtab;
@@ -3545,11 +3541,10 @@ leave_tabpage(new_curbuf)
  * Start using tab page "tp".
  * Only to be used after leave_tabpage() or freeing the current tab page.
  */
-/*ARGSUSED*/
     static void
 enter_tabpage(tp, old_curbuf)
     tabpage_T	*tp;
-    buf_T	*old_curbuf;
+    buf_T	*old_curbuf UNUSED;
 {
     int		old_off = tp->tp_firstwin->w_winrow;
     win_T	*next_prevwin = tp->tp_prevwin;
@@ -4157,10 +4152,9 @@ buf_jump_open_tab(buf)
 /*
  * allocate a window structure and link it in the window list
  */
-/*ARGSUSED*/
     static win_T *
 win_alloc(after)
-    win_T	*after;
+    win_T	*after UNUSED;
 {
     win_T	*newwin;
 
--- a/src/workshop.c
+++ b/src/workshop.c
@@ -204,12 +204,11 @@ workshop_get_editor_version()
  * Function:
  *	Load a given file into the WorkShop buffer.
  */
-/*ARGSUSED*/
     void
 workshop_load_file(
 	char	*filename,		/* the file to load */
 	int	 line,			/* an optional line number (or 0) */
-	char	*frameid)		/* used for multi-frame support */
+	char	*frameid UNUSED)	/* used for multi-frame support */
 {
 #ifdef WSDEBUG_TRACE
     if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
@@ -263,10 +262,9 @@ workshop_goto_line(
     load_window(filename, lineno);
 }
 
-/*ARGSUSED*/
     void
 workshop_front_file(
-	char	*filename)
+	char	*filename UNUSED)
 {
 #ifdef WSDEBUG_TRACE
     if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
@@ -538,9 +536,8 @@ workshop_adjust_marks(Widget *window, in
  * breakpoints have moved when a program has been recompiled and
  * reloaded into dbx.
  */
-/*ARGSUSED*/
     void
-workshop_moved_marks(char *filename)
+workshop_moved_marks(char *filename UNUSED)
 {
 #ifdef WSDEBUG_TRACE
     if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
@@ -575,11 +572,10 @@ workshop_get_font_height()
     return (int)h;
 }
 
-/*ARGSUSED*/
     void
 workshop_footer_message(
-	char		*message,
-	int		 severity)	/* severity is currently unused */
+	char	*message,
+	int	severity UNUSED)	/* severity is currently unused */
 {
 #ifdef WSDEBUG_TRACE
     if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
@@ -687,15 +683,14 @@ workshop_submenu_end()
  * command. The globals curMenuName and curMenuPriority contain the name and
  * priority of the parent menu tree.
  */
-/*ARGSUSED*/
     void
 workshop_menu_item(
 	char		*label,
 	char		*verb,
-	char		*accelerator,
+	char		*accelerator UNUSED,
 	char		*acceleratorText,
-	char		*name,
-	char		*filepos,
+	char		*name UNUSED,
+	char		*filepos UNUSED,
 	char		*sensitive)
 {
     char		 cbuf[BUFSIZ];
@@ -810,13 +805,12 @@ workshop_toolbar_end()
     workshopInitDone = True;
 }
 
-/*ARGSUSED*/
     void
 workshop_toolbar_button(
 	char	*label,
 	char	*verb,
-	char	*senseVerb,
-	char	*filepos,
+	char	*senseVerb UNUSED,
+	char	*filepos UNUSED,
 	char	*help,
 	char	*sense,
 	char	*file,
@@ -968,7 +962,9 @@ workshop_set_option(
 	    if (strcmp(option, "syntax") == 0)
 		vim_snprintf(cbuf, sizeof(cbuf), "syntax %s", value);
 	    else if (strcmp(option, "savefiles") == 0)
-		; /* XXX - Not yet implemented */
+	    {
+		/* XXX - Not yet implemented */
+	    }
 	    break;
 
 	case 'l':
@@ -1098,10 +1094,9 @@ workshop_hotkeys(
 /*
  * A button in the toolbar has been pushed.
  */
-/*ARGSUSED*/
     int
 workshop_get_positions(
-	void		*clientData,	/* unused */
+	void		*clientData UNUSED,
 	char	       **filename,	/* output data */
 	int		*curLine,	/* output data */
 	int		*curCol,	/* output data */
@@ -1526,9 +1521,8 @@ workshop_test_getselectedtext()
 	return NULL;
 }
 
-/*ARGSUSED*/
     void
-workshop_save_sensitivity(char *filename)
+workshop_save_sensitivity(char *filename UNUSED)
 {
 }